CIS 351

Tools

Winter 2022

Overview

The purpose of this lab is for you to get the different tools we will use throughout the semester set up and working. Note: Labs will generally be done in pairs. However, this one should be completed solo to ensure that everyone has access to the software they will need to be successful in this course.
Preparation
  • Sign up for a GitHub account if you don't already have one. (We will be using GitHub and GitHub Classroom to manage assignments.)
  • Make sure you can access your EOS account. If you don't have an account, or otherwise can't access your account, contact HPC support before the beginning of lab (hpcsupport@gvsu.edu).
  • Set up a public/private SSH keypair and upload your public key to GitHub. (See this video for instructions.)
  • Review basic git usage.
Accessing EOS/Arch Remotely
Some of the tools we will use this semester will work only in GVSU's EOS/Arch environment. You can access these machines from anywhere through your browser at https://cislab.hpc.gvsu.edu/. Remember: Select the "RDP" option if you need a GUI environment; select the "SSH" environment if a text-only interface is sufficient. (In this class, you will almost always want the "RDP" option.)
GitHub Classroom
GitHub Classroom is a service provided by GitHub that creates a separate git repo for each student (or team for team-based assignments). Most assignments that require the submission of a file (including this one) will use GitHub Classroom. This week's lab is an individual assignment. To get started:
  1. Watch this video for an overiew.
  2. Follow this GitHub Classroom link to generate your personal repository for this week's lab.
  3. Clone the generated Git repository.
JLS
This semester, we will be using a digital logic simulator called JLS.

All the necessary code is contained in a single .jar file.

  • If you are using EOS/Arch, you will find JLS.jar in /home/kurmasz/public/bin. The easiest way to run JLS in EOS/Arch is to put this directory in your path. (For most of you, the best way to do this is to add the line export PATH=$PATH:/home/kurmasz/public/bin to the end of your .bashrc.) There is a script named jls in this directory that sets up the java classpath and launches JLS. This directory also contains other scripts that will make your life in this course much easier. If you object to adding this directory to your path, you can also launch JLS with this command: java -jar /home/kurmasz/public/bin/JLS.jar /JLS.jar.
  • If you want to run JLS on your own machine, you can download the jar file here. (Please do not email Prof. Poplawski for a copy of JLS.)
  1. Launch JLS (either in EOS/Arch or on your own machine), open isPrime.jls from the new repo, and complete the isPrime circuit demonstrated in Video 1. Do not modify the names of the input and output.
DLUnit
We will use a tool called DLUnit to run automated tests on your JLS circuits. Specifically, DLUnit allows you to write and execute JUnit tests for your circuits.

To run DLUnit

  • in EOS/Arch:
    1. Make sure /home/kurmasz/public/bin is in your PATH
    2. Use the terminal to cd into your repository for this lab.
    3. Compile the test: dlunit_compile IsPrimeTest.java
    4. Run DLUnit: dlunit isPrime.jls IsPrimeTest.class.
  • on your own machine
    1. Download DLUnit.jar.
    2. Use a terminal cd into your repository for this lab.
    3. Compile the test: javac -cp DLUnit.jar IsPrimeTest.java
    4. Run java -jar DLUnit.jar isPrime.jls IsPrimeTest.class
  1. Use DLUnit to run IsPrimeTest against isPrime.jls.
  2. Use DLUnit to verify that your isPrime circuit passes the sample test cases.

IsPrimeTest does not contain a complete set of tests. Part of your task is to write a complete set of test cases.

  1. Edit IsPrimeTest.java and add a test case for each input. (You do not need tests cases for 0 and 1.)
  2. Use DLUnit to verify that your isPrime circuit is correct. (Fix your circuit if any of your test cases fail.)
Automated Testing in GitHub

I will use a GitHub feature called GitHub Actions to run automated tests on your submission. You will not have access to these tests. If my automated tests fail, then your tests are incomplete. You need to add a failing test to your test suite, then fix the bug in your assignment. To run the automated tests:

  • Commit and push your repository.
  • Click on the "Actions" tab on your repository's web page.
  • Click on the link that says "GitHub Classroom Workflow". It will be on the left.
  • Look for a blue banner in the middle of the page with a drop-down list that says "Run Workflow". Click on this list, then click on the green button that says "Run Workflow".
  • After a delay of a few seconds, you will see a new line under the blue banner with a yellow dot to the left. Wait for the test to complete.
  • When the test is complete, the yellow dot will turn into either a green check or a red "X". If you get a red "X", you need to add tests, then fix any bugs in your submission.
  1. When your project passes your test suite, commit and push your circuit, then run the automated tests. (Fix any bugs as necessary.)

You should be using your tests to test your assignments, not mine. You should not be running the automated tests more than three times per day. Excessive use of GitHub Actions may result in a reduced grade. Attempting to hide/disguise the number of times you've run the autograder is a violation of GVSU's Academic Honesty Policy.

Submission
When your circuit passes the Automated tests, make sure your have a passing commit with a commit message that contains [Grade Me].

Done Early?

If you get done early (if there are 30 minutes or more left in the lab period), I suggest you get started on Lab 2. Specifically,

  1. Watch the first 7-1/2 minutes of this video, then
  2. Construct the first circuit described in Lab 2 (the one containing just an LED.)

Updated Thursday, 6 January 2022, 2:20 PM

W3c Validation