| Office | Office hours | ||
| Olin Shivers | WVH 318 | shivers@ccs | Wed Wed 1:30–2:30 & by appt |
| Tuesday | 3:25–5:05 | Robinson 109 |
| Friday | 3:25–5:05 | Robinson 109 |
Course schedule (lectures, projects, exams)
(This is the central file for course-related information.)
Piazza: https://piazza.com/northeastern/fall2026/cs44106410
Slides for intro-to-SML lecture.
…that is to say: what is the course policy on what is permitted, and what is considered cheating?
First, you may use AI coding assistants. But it's not recommended. You won't understand your code if you don't write it yourself. This is not a job; it's an educational task.
Second, you are permitted — in fact, you are strongly encouraged — to discuss issues related to the Tiger compiler project with other students in the class. In particular, you should use the course piazza page to discuss the class projects. You can even talk about ways to handle specific problems that have to be handled in the implementation of the compiler's various passes.
But you can't look at someone else's code (besides your partner's). You can't show your code to anyone besides your partner. You have to keep your discussion and descriptions limited to English and mathematics. That is the boundary — because you have to write your own code. If you go outside this boundary: you are cheating.
Even if we don't catch you: you are still cheating.
The course textbook is Modern Compiler Implementation in ML, by Andrew Appel. Try to get the edition that says "Reprinted with corrections, 1999" on page iv; previous editions had lots of errors. (This is, of course, not an issue today unless you're buying a very old, used copy.) You can order the book from Barnes & Noble or Amazon.
Appel's text comes in multiple versions: one for C, Java and ML. Make sure you get the ML version.
Appel maintains a web page for the text book, which includes various files to begin your compiler with, and a a list of errata for the different editions of the book. It will save you confusion later if you take 15 minutes and go through the errata, applying them to your copy.
You can also find some useful tutorials on the Net. Several are listed below.
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.