CS4410/6410: Compilers

Fall 2025

Contact information

:
Office email Office hours
Olin Shivers WVH 318 shivers@ccs Wed 1:30–2:30 & by appt

Lectures

Monday 2:50–4:30 Shillman 135
Wednesday 2:50–4:30 Shillman 135

Other

Course schedule (lectures, projects, exams) (This is the central file for course-related information.)

Piazza: https://piazza.com/northeastern/fall2025/cs44106410

Slides for intro-to-SML lecture.

Assignments

  1. Lexer (due Wed 9/17 midnight)

Resources

Books

MIPS and SPIM

SPIM is a simulator written by James Larus for the MIPS-II ISA, a real-world processor architecture that is a very clean RISC design.

ML

Improved Canonicaliser

Appel provides a module of code for the Tiger-compiler project called the "canonicaliser," which lowers a program in the IR language to a form closer to machine code. This code is hard to read, as the invariants of the lowered/canonicalised form are not expressed in the type of the result form. Well, and the code isn't commented, either.

I rewrote this code using a target data type that makes the new form explicit in the type structure. It is much clearer and type-driven (as well as voluminously commented). It also has a slightly better commutativity analysis.

The code comes in two forms. The first version is exactly as described above. Then I took that, and converted the improved code to use the original IR data type for the target, producing a version that is a drop-in replacement for Appel's code.

So, read the first version but use the second.