CS691F Programming Languages

| Introduction | Logistics | Policies | Schedule | Software | Acknowledgements |

Software

We use the OCaml programming language for most of the programming assignments in this course. Follow the directions on the page to install the right version of OCaml and some course-specific software that you'll need to complete the programming assignments.

  1. Install OCaml version 4.00.1 and OCaml Package Manager (OPAM) version 1.0.0:
    • On Mac OS X, install Homebrew and then, from the Terminal, run:
      $ brew install opam
      
    • On 64-bit Ubuntu Linux, run the following commands from a terminal:
      $ sudo add-apt-repository ppa:avsm/ppa
      $ sudo apt-get update
      $ sudo apt-get install ocaml opam
      
    • Alternatively, you can follow the OPAM Quick Install guide.
  2. Install the course software by running these commands from a terminal:
    $ opam repository add cs691f https://github.com/arjunguha/cs691f-opam.git
    $ opam install cs691f
    
  3. The course software installs a program called cs691f into ~/.opam/system/bin/. If OPAM installed correctly, this directory should be in your path. To check, run this command from a terminal:
    $ cs691f help
    
    You should see output similar to the following:
    Usage: cs691f COMMMAND [args]
    
      cs691f compile File    Compile File.ml.
      cs691f run File        Run the program File.ml.
      cs691f test File       Run the tests in File.ml.
      cs691f clean           Removes files created by 'cs691f compile'.
      cs691f help            Displays this message.
     

Installing from Source

If you're running 32-bit Linux or Cygwin, you'll need to install OCaml and OPAM from source:

  1. Ensure you have git and the usual build tools installed.
  2. To install OPAM:
    $ git clone https://github.com/OCamlPro/opam.git
    $ cd opam
    $ git checkout 1.0.0
    $ ./configure
    $ make
    $ sudo make install
    
  3. To install OCaml:
    	
    $ git clone https://github.com/ocaml/ocaml.git
    $ cd ocaml
    $ git checkout 4.00.1
    $ ./configure
    $ make world.opt
    $ make install (may require root privileges)
    

Credit:Thanks to Joseph Collard for the directions on building from source.