CIS 301: Logical Foundations of Programming

Git Hub

Distribution of starting files for assignements and assignment submission will be organized through Git Hub. You need to complete the following steps:

  • Create a GitHub account (if you already have an account, you can reuse your existing account)
  • Ensure that Git is installed on your computer as appropriate for your operating system (e.g., use GitBash for Windows)
  • Register your GitHub account with the CS 301 TAs using this form to ensure your own personal 301 HW GitHub repo is created for you. Note that your eID is the username you enter for any university computer system, it is the prefix to your email address. It is not the 9 digits on the top of your student ID, that is your WID. If you have entered your WID instead, you will need to go back and fill out the form again.
  • Wait for invitation from CS 301 TAs
  • Accept invitation
  • Follow the instructions in Homework 0 to create your repo and link it to GitHub

Sireum Logika

Logika is a program verifier and a natural deduction proof checker for propositional, predicate, and programming logics. Logika is part of a much larger analysis and verification framework developed by Robby called Sireum.

It is crucial that you get set up to use Logika during the first week of class. We will use Logika every week in class, and almost all homework assignments will use it.

You will need to setup the Sireum IVE (Integrated Verification Environment) which contains Logika.

Logika can be used in a nice IntelliJ-based Integrated Verification Environment (Sireum/Logika IVE) (this is what we recommend for doing all your classroom exercises and homework).

The general steps for installation are:

  • Watch the initial installation video
  • Watch the second installation video

When watching the above videos, you will to perform the following downloads:

  • Download the IVE appropriate for your operating system from the download website
  • Download the examples project. Download as a zip file

After completing the instructions in the videos, you should check that you have a java run time installed (“java -version” at a command prompt will tell you the version of java installed). If your version is 1.8.0_144 or older you will need to update the Java installation before continuing.

By following the videos above in order, you should be able to “install” the Sireum IVE and integrate the examples project. You may notice a lot of instructions on the Sireum Installation page. These steps are not necessary–Do not follow them as they may contain obsoltete information.

It is normal to see modal dialog boxes asking you to choose settings

  • If prompted to import settings, select DO NOT Import Settings
  • If prompted to accept the EULA, scroll throught it and accept it
  • If prompted for other settings, accept the default
  • Intellij will need to connect to the internet, if spammed by your fire-wall about permissions, allow Intellij to talk to the internet

NOTE for Mac users. The videos are for windows. You will also need to:

  • Read the instructions for Mac installation in Section of the Logika documentation

Creating New Projects/File

The examples and homework come with project structures and files already created. However, there’s a good chance that you will want to create your own project/files from scratch to work on examples in class or to solve FTYD exercises. Here’s a video that shows you how you can create an empty project and an empty file to work on such examples.

Sireum on Departmental Resource

While several “Desktops” (the computers in 1118, 1117, 1114) have a Sireum icon in their applications lists, conflicts between the Summer’s hardware, architecture and Sireum updates have not been been resolved and these “links” will not work. As of 16 August your best bet to install Sireum on departmental resources is to install it on your CIS remote windows desktop.

The Department is working to resolve these issues.

Installation of Sireum IVE on the CIS Remote Windows Desktop(RWD).

  • It is possible to install the IVE on the CIS RWD
  • The RWD already has Git and an appropriate JDK
  • You must install Sireum and the examples in your C:/users/your_eid/ folder. If you install them on the C: drive they will get wiped

ONCE YOU HAVE INSTALLED SIREUM, DO NOT UPDATE INTELLIJ! Intellij will occasionally give you pop-ups sying a new version is available and press to update. Ignore these. Sireum will not be rolled to a new version of Intellij until Summer 2019 and most likely WILL NOT WORK with “upgraded” versions. If you update Intellij and Sireum breaks, you will have to reinstall Sireum.


Z3 is a high-performance Satisfiability Modulo Theories (SMT) solver being developed at the Research in Software Engineering (RiSE) group in Microsoft Research.

We will use Z3 early in the course and then we will refer to it throughout the rest of the course. There is a web-based Online version which you will use to verify your homework.

Use of Git and GitHub in CS 301

Our use of Git and GitHub is intended to familiarize you with the steps necessary to manage a single branch repository that is synchronized between the “official” remote repository and one or more local copies of that repo. From the command line, you are expected to be able to:

  • make a local copy of the remote repo(sitory) (git clone <remoteURL>)
  • make changes to the local repo (git add .)
  • commit changes to the local repo (git commit –m “some message”), and
  • push changes to the remote (git push origin master)

To facilitate local-to-remote repository communication. We suggest you set up SSH keys on the computers you use and register them with Github.

If you choose to work with multiple local repositories (say one on your personal computer hard drive and another on a USB you carry), you are responsible for synchronizing them. You will need to use the Git pull command to update each local repository to the “state” that remote is in BEFORE you start working in the local repository.

Standard work flow – Ensure your local repo is up to date with the remote

If you:

  • ONLY ever use one physical copy for the local repo, AND
  • NEVER make changes to the remote repo through the web interface

THEN your local is up to date If you need to make a new local repo, clone the remote to your machine.

If you are not sure that the local matches the remote, or you know it does not,

  • Pull from the remote ( git pull origin master)
  • Open a Git Bash terminal
  • Navigate to your repo
  • Type “git pull orign master”
  • Resolve any merge conflicts (hopefully there are none). If you aloways follow this work flow there should be none.
  • Make changes to files and folders as necessary for your homework

Standard work flow – Commit your changes to the local repo

  • Open a Git Bash terminal
  • Navigate to your repo
  • Type “git add .” to add all changes to the list to commit
  • Type “git commit –m “some message” ” to commit the changes to the local repo. Try and use a meaningful message

Standard work flow – Push your changes to the remote

  • Open a Git Bash terminal
  • Navigate to your repo
  • Type “git push origin master” to add all changes to the list to commit

Optional : Check the Github site for the commit

Standard work flow – Cloning

Occasionally you may need to make a new copy the remote repo. This could be because you are working from a different computer. It could be because something has gone terribly wrong with your existing repo and it will not commit or push to GitHub (very rare). When you need to create a new local repo:

  • Open a Git Bash terminal
  • Navigate to the folder/directory you want to put the new local repo
  • In a browser,
  • surf to the GitHub repo,
  • click “Download or Clone …”
  • select your protocol
  • “Copy” the URL so you can use it
  • In the Git Bash terminal, Type “git clone <URL>”

Standard work flow – If your local repo stops working with GitHub

In past semesters some students have experienced problems where their local repo stopped communicating GitHub. Inevitably, this occurs when one needs to push a big commit, like an entire homework, and it is close to the due-time.

First try making a “new-local”, then copy-replace the changed files from the “old-local” to the “new-local”. Git add, commit and push. This generally fixes the problem as the “corruption” is typically in hidden .git files not in the user content files.(Be sure to delete the “old local”).

If there are still problems, you may have an expired credential. The solution is to make a new credential (SSH key, token, saved password, etc.). We cannot guess which type of credential has expired and are not experts at their creation; you will have to figure this out.

Finally, you can upload files and edit files directly via the GitHub web interface. This should be your last resort. You will need to commit your changes and remember to clone the new commit(s) to a new local directory.

GIT integration and tools

Students are free to integrate Git with Intellij or any number of third party apps (GitGui, GitExtensions, etc). The TAs can offer limited-to-no help on using these tools. As students, you are responsible to know the commands for cloning, adding files/changes, committing and pushing for your local repository.