CS252r: Advanced Functional Language Compilation

Fall 2012: Maxwell Dworkin 323, Mon-Wed-Fri 3-4pm

Greg Morrisett

Homework 1: Due Monday Sep 17

This homework is all about the mechanics of getting our environment set up. It will also force you to write a little bit of Coq code.

Feel free, and in fact I highly encourage you, to work with classmates to complete this assignment. Just make sure that you each complete the steps so you can set up and build the code for the course.

Use Piazza to post questions, or come see me if you get stuck. If you can't find me, try the good people in MD 309.

  1. Sign up for Piazza.
  2. Download and install OCaml.
  3. Download and install Coq 8.4.
  4. Download and install Proof General (for Emacs) or the CoqIDE, or God forbid, some vim hacks.
  5. If you don't already have a SEAS account, get one here
  6. Send mail to the instructor with your SEAS account name so that we can add you to the GIT repository
  7. Clone the GIT repository here: https://code.seas.harvard.edu/252r-coq-compile/252r-coq-compile
  8. Modify your .emacs file according to the README file in the repository.
  9. Run setup.sh to clone a copy of G.Malecha's library.
  10. Run make to build the sources for our compiler so far.
  11. In a file CpsSemantics.v, write an interpreter for the CPS language, following the basic ideas in the LambdaSemantics module found in the Lambda.v file.
  12. Mail your CpsSemantics.v to the instructor.

For advanced students: