Course Syllabus

High-level programming languages like Scheme make programming a breeze, but how do they work? There's a big gap between Scheme and machine instructions for modern computers. Learn how to translate Racket (a dialect of Scheme) programs all the way to Intel x86 assembly language.

Most compiler courses teach one phase of the compiler at a time, such as parsing, semantic analysis, and register allocation. The problem with that approach is it is difficult to understand how the whole compiler fits together and why each phase is designed the way it is. Instead, each week we implement a successively larger subset of the Racket language and a statically typed version of it. The very first subset is a tiny language of arithmetic statements, and by the time we are done the language includes first-class functions.

Prerequisites: B521 or C311. Fluency in Racket is highly recommended as students will do a lot of programming in Racket. Prior knowledge of an assembly language helps, but is not required.

Textbook: The notes for the course are available here. If you have suggestions for improvement, please either send an email to Jeremy or, even better, make edits to a branch of the book and perform a pull request. The book is at the following location on github:

  https://github.com/IUCompilerCourse/Essentials-of-Compilation

Lecture: Tuesday and Thursday, 9:30am to 10:45am, in WH 121 (Woodburn Hall).

Office hours:

  • Michael Vollmer (vollmerm): Monday 1pm-3pm, in Luddy 3027.
  • Jeremy Siek (jsiek): Tuesday 11am-12pm, Thursday 1:30pm-3pm, in Luddy 3016 (may spill over into Luddy 3014)

Topics:

  • Instruction Selection
  • Register Allocation
  • Static type checking
  • Conditional control flow
  • Mutable data
  • Garbage collection
  • Procedures and calling conventions
  • First-class functions and closure conversion
  • Dynamic typing
  • Generics
  • High-level optimization (inlining, constant folding, copy propagation, etc.)

Grading:

Course grades are based on the following items. For the weighting, see the Canvas panel on the right-hand side of this web page.

  • Participation
    • Class attendance
    • Piazza questions and answers
    • Office hours attendance
  • Assignments
  • Midterm Exam (in class)
  • Final Exam

Assignments:

Organize into teams of 2-4 students. Assignments will be due bi-weekly on Mondays at 11:59pm. Teams that include one or more graduate students are required to complete the challenge exercises. Turn in your assignments by creating a github at IU repository and giving access to Michael Vollmer. Assignments will be graded based on how many test cases they pass. The test suite used for grading will be made available on Sunday night, one day prior to the due date. The testing will be done on the silo machine (linux). The testing will include both new tests and all of the tests from prior assignments. Assignments may be turned in up to one week late with a penalty of one letter grade. Students are responsible for understanding the entire assignment and all of the code that their team produces. The midterm and final exam are designed to test a student's understanding of the assignments. The Final Project is due Dec. 7 and may be turned in late up to Dec. 12.

Email Discussion Group: on Piazza

Resources:

Course Summary:

Date Details Due