Syllabus
A programming languages course studying compilers and interpreters for Winter 2026.
This course is being taught by Max Bernstein.
Broad strokes
Students will follow Abdulaziz Ghuloum’s excellent compiler construction tutorial (PDF), building their own Scheme compilers from scratch. They will learn:
- how to build a simple compiler
- how to build an interpreter
- how functional languages represent programs and data
- how program formats and progamming languages can be a programming interface (API, ABI, …)
- optionally, x86-64 assembly
Students will gain an intuition for program semantics that does not often come from using off-the-shelf components.
Prerequisites
A basic data structures course (trees, recursion, hash maps, graphs), a good grasp on the programming language of their choice, some familiarity with C, Rust, or Java.
Schedule
The course has students building, in lock step, a bytecode compiler for Scheme and an interpreter for that bytecode. They incrementally build a unified programming system that grows in features as the weeks progress:
- A single integer
- Arbitrary integers
- Booleans, characters, the empty list
- Unary primitives
- Binary primitives
- Let and local variables
- Conditional expressions
- Heap allocation
- Procedure calls
- Closures and closure conversion
- Tail calls
- Complex constants and
quote - Mutable variables and closures
- Alpha conversion
- Building core utilities such as
let*,letrec, andcondon top of existing builtins - Foreign function interface
- Variable arity procedures
- Apply
(see Assignments for details)
Students will write and share test suites for both their interpreters and their compilers. Students will have access to a reference interpreter and a reference compiler to test their assumptions.
Students will submit intermediate versions of their compilers with documentation as homework assignments. Students will be graded on functional correctness, style, and documentation.
Students will learn to read documentation as well as source code. Students will learn to tinker; to write throw-away code for experiments.
Grading
Grades will be based entirely on homework assignments. There will be no exams.
There will be five homeworks, due every other week. Each homework is 20% of the final grade.
Homeworks are graded 90% on functional correctness, 8% on documentation, and 2% on style.
Optional extensions
- IR design
- Target x86-64
- Optionally, with destination-driven code generation
- Meta-compilation (custom, Java tools, or RPython/PyPy)
- Optimization and benchmarking
- CEK
- A garbage collector
- CPS
- Optionally, with Cheney on the MTA
- Checkpoint/restore and heap image serialization
- Type inference
Students should build one extension to their compiler, propose it, execute it, and write a public blog post about it (like they do in the Cornell compilers course). Students may pair on the extension.
Course mechanics
Seminar style. Four in-person meetings, with spot online meetings as needed. Students may gather for open project time with an instruction “nearby” to answer questions. We will have an online forum such as Piazza for interstitial questions.
Students may discuss problems and solutions in broad strokes but not share code.