These are the main components in the CIS 341 tool chain:


Your project configuration and development environment depends on your machine's platform. Follow the platform-specific instructions for working on Eniac, or using OSX, linux , or Windows below.

For help with tool chain configuration, please post to Piazza.

The compiler we build will generate x86 assembly code, so if you want to run the programs natively, you must develop on a machine with and Intel or AMD processor.

On Eniac

You can do all of your development on Eniac, and we will be testing your projects there. It provides a linux environment, but the default installations of llc and ocamlc are out of date. The course account ~cis341/bin directory contains up-to-date versions of the course software.

When working on eniac, make sure that /home1/c/cis341/bin and /home1/c/cis341/share/bin are both in your PATH environment variable before /usr/bin. (You will need to edit your .login or .bashrc, etc., as appropriate to ensure that this is the case.)

Check that your set-up on Eniac is correct like this:

    > which llc
    llc --version
    LLVM (http://llvm.org/):
      LLVM version 9.0.0

    > which ocaml
    > ocaml
                Objective Caml version 4.06.0

OS X Only Setup

First, make sure that you have a c compiler and command line tools: Install Xcode via the App Store. Or install just the "Command Line Tools", which should be available through the Apple Developers Download Site (login with your Apple ID required).

Next, follow the instructions below (following the OS X specific parts).

On Linux and OS X (after the OS X only setup)

1. LLVM tools

From precompiled binaries (easier):

From source (harder): Follow the instructions here http://llvm.org/docs/GettingStarted.html .

2. OCaml and its tools

We recommend using OPAM. Follow the installation istructions from Real World OCaml.

Once opam is installed, upgrade to ocaml version 4.09.0 and then install ocamlbuild and menhir like this:

  > opam install ocamlbuild
  > opam install menhir

Using Microsoft Windows

We recommend using a virtual machine running linux. However, if you want to try to get the compilation infrastructure running on Windows, you can try the following instructions. Please contact us if you want to use Windows and we will do our best to help. (None of the course staff use Windows.)

LLVM / Clang

You should install following software before installing OCaml.


Other IDEs