CS4/510 Compilers and Interpreters Spring 2021

Instructor: Andrew Tolmach

Course Information

Textbook

  • Most of the course will be based on the on-line textbook by Jeremy Siek, "Essentials of Compilation: The Incremental, Nano-pass Approach." Here is the latest local OCaml version of this book, modified up through Chapter 3 (April 12 1pm). (A recent public release of the Racket version can be found here.)

    Homework

    Schedule

    Highly subject to change!
    Reading chapter references are to "Essentials of Compilation."
    Date Reading Topics Recording Other
    Mar 29 Introduction Recording Rough lecture notes Tablet dump CS320 Lecture on compiler Structure
    Mar 31 Ch. 1 Preliminaries; OCaml Recording Ocaml examples OCaml tool summary Tablet dump
    Apr 5 Ch. 2 Integers and Variables Recording
    Apr 7 Ch. 2 Integers and Variables Recording Tablet dump
    Apr 12 Ch. 3 Review of Ch. 2; Register Allocation Recording
    Apr 14 Ch. 3 Register Allocation Recording Tablet dump
    Apr 19 & 21 Ch. 4 Booleans and Control Flow
    Apr 26 & 28 Ch. 9 Assignment and Loops
    May 3 (none) Midterm: no class
    May 5 TBD Optimization
    May 10 & 12 Ch. 5 Tuples and Garbage Collection
    May 17 & 19 Ch. 6 Functions
    May 24 & 26 Ch. 8 Dynamic Typing
    May 31 (none) Memorial Day: no class
    June 2 TBD Efficient Interpretation
    June 7-11 Final exam week

    Resources

    We will be using the Ocaml language, linux or MacOS operating system, and X86-64 computer architecture for the homework in this course. The current version of OCaml is 4.12.0, but any version 4.08.1 or greater should work.
  • You may choose to work (remotely) on the CS department linux machines, where OCaml 4.08.1 is installed. New students can obtain access to the CS linux machines via their MCECS account, which can be activated using CRAM.
  • OCaml download/installation instructions.
  • Official OCaml Language and Library Reference.
  • Alternative OCaml Library API Documentation.
  • Functional Programming in OCaml textbook.
  • Additional OCaml learning resources.
  • Notes on X86-64 programming
  • Debugging assembly code with gdb

  • General Books on Compilers