Simone Campanoni

Tenure-track assistant professor
Department of Computer Science at Northwestern University

Simone Campanoni

Department of Computer Science
Northwestern University

CS 322: Compiler Construction

Description

The compiler is the programmer's primary tool. Understanding the compiler is therefore critical for programmers, even if they never build one. Furthermore, many design techniques that emerged in the context of compilers are useful for a range of other application areas. This course introduces students to the essential elements of building a compiler: parsing, context-sensitive property checking, code linearization, register allocation, etc. To take this course, students are expected to already understand how programming languages behave, to a fairly detailed degree. The material in the course builds on that knowledge via a series of semantics preserving transformations that start with a fairly high-level programming language and culminate in machine code.

Syllabus
Department page

Material

This class takes materials from two different books (listed in the syllabus) as well as a few research papers. The result is a set of slides, notes, and code. Some lectures rely on code and notes (not slides).
All the slides used in the 2019-2020 class are below. The rest of the material is available only on Canvas.
Materials are improved every year. They are updated on this website (atomically) only at the end of the class.

Week number First lecture Second lecture
Week 0 Welcome, L1,
Framework
Parsing,
From L1 to x86_64
Week 1 L2,
Liveness analysis
Interference graph, Spilling,
Graph coloring
Week 2 Panels about Homework #0
(L1 compiler)
Impossible,
Advanced graph coloring
Week 3 Panels about Homework #1
(Liveness)
L3
Week 4 Panels about Homework #2
(Interference graph and spiller)
An alternative register allocator: puzzle solving
Week 5 Panels about Homework #3
(L2 compiler)
IR,
Back-end missing pieces
Week 6 Panels about Homework #4
(L3 compiler)
The Time-Squeezer research compiler,
LA
Week 7 Panels about Homework #5
(IR compiler)
LB,
The HELIX research compiler
Week 8 LC, LD,
Competition rules
Panels about Homework #6
(LA compiler)
Week 9 Competition! Panels about Homework #7
(LB compiler)
and #8 (LC compiler)

Hall of Fame

Students design and build a complete compiler able to translate an almost-C language to Intel x86-64 machine code. At the end of the class, the resulting compilers compete and the names of the students that designed and built the best compilers are reported below.

Year Name Picture
2019 - 2020 Shu-Hung You Hall of fame 2020
2018 - 2019 Vijay Kandiah and
Chenqi Guo
Hall of fame 2019
2017 - 2018 Matt C. Cheung Hall of fame 2018
2016 - 2017 Zhiping Xiu Hall of fame 2017

External links:
LinkedIn profile LinkedIn Follow SimoneCampanoni on Twitter Twitter GitHub profile GitHub

Share this page with: