Lectures meet 2:40–3:30pm Monday, Wednesday, and Friday in Gates Hall G01. The Zoom channel is posted on Canvas and CMSX.

Videos for lectures can also be found at the video channel for the course.

Most of the lecture notes are available as a single printable document.

Lecture Date Topic/notes Readings, videos Assignments, etc.
1 Jan 24 Course overview [ slides | video ], Dragon 1–1.4  
Parsing
2 Jan 26 Lexical analysis and regular expressions [ video ], Appel 1, Dragon 3–3.3 [JFlex examples]  
3 28 Automating lexical analysis [ video ] HW1 out 1/27
4 31 Grammars and parsing [ video | slides], Appel 3.1, Dragon 4–4.3  
5 Feb 2 Top-down (LL) parsing [ video | slides], Appel 3.2, Dragon 4.4 HW1 due
6 4 Bottom-up parsing [ video ]  
7 7 LR parsing and parser generators [ video ], Appel 3.4, Dragon 4.6–4.8 PA1 due (2/7 add deadline)
8 9 ASTs and errors [ video | example | slides ], Appel 3.5, 4.1–4.2  
Semantic analysis
9 Feb 11 Semantic analysis and symbol tables [ video | slides ] HW2 due
10 14 Type systems [ video ]  
11 16 Xi type system [ video | old notes ], Dragon 6.5, Appel 4.3 PA2 due
12 18 Modules and visitors Appel 4.3  
Code generation
13 Feb 21 Intermediate representations [ video | slides ], Appel 7.1-3, Dragon 6.1–2 HW3 due
14 23 Syntax-directed translation [ video ], Appel 7.1-3, Dragon 6.1–2  
15 25 IR lowering [ video | old notes ]  
Feb 28 February break
16 Mar 2 Control-flow graphs and traces [ video | slides ], Appel 8.1  
17 4 Instruction selection [ slides | video ], Appel 8.2 PA3 due, PA4 out
18 7 Calling conventions [ video | old notes ], Appel 9.1–3, Poletto/Sarkar  
Optimization and program analysis
19 Mar 9 Overview of optimization [ video ], Muchnick 11, Dragon 9.1  
20 11 Live variable analysis [ video ], Appel 10, Dragon 9.2.5, C&T 9.2–9.2.3  
21 14 Dataflow analysis [ video ], Dragon 9.2, Muchnick 8.2  
22 16 Iterative solving [ video ], Dragon 9.3, Muchnick 8.3–8.4  
Thu Mar 17 Prelim 1: online, any 24 hours during March 17–19
Mar 18 Prelim 1
23 21 MOP, conditional constant propagation [ video ], Muchnick 12.6, Appel 19.3 (3/21 drop deadline)
24 23 Register allocation [ video ], Appel 11.1–3, Dragon 8.8.4 PA4 due, PA5 out
25 25 Reaching definitions, webs, SSA
Lab: Assembling and disassembling x86-64 1: [ doc | example code ]
[ video ], Appel 19, Muchnick 8.1, 8.10–8.11, C&T 9.3  
26 28 Control-flow analysis [ video ], Appel 17.2,18.1  
27 30 Induction variable optimizations [ video | old notes ], Appel 18.2–3, Muchnick 14.1  
28 Apr 1 Abstract interpretation [ video ], Appel 17.5, Muchnick 10, Dragon 12.4  
Apr 4 Spring break
Apr 6 Spring break
Apr 8 Spring break
29 11 Redundancy elimination [ video ], Appel 17.2-3, 18.4–5, Muchnick 14.2, Muchnick 12.4, C&T 8.3.2, Dragon 9.4-5 HW4 out 4/6
30 13 Pointer analysis, interprocedural analysis Appel 20.1–3  
advanced language features and language runtimes
31 Apr 15 Subtyping [ video ], Appel 4.3  
32 18 Object layout and method dispatch [ video ], Appel 14 PA5 due, PA6 out
33 20 Multiple inheritance [ video | more notes | slides ]  
34 22 First-class functions [ video ], Appel 15  
35 25 More functional-language features [ video ], Appel 15 HW4 due
36 27 Type inference    
37 29 Parametric polymorphism [ video ], Appel 16  
38 May 2 Run-time discrimination and non-local control flow    
Tue May 3 Prelim 2: online, any 24 hours during May 3–5
May 4 Prelim 2
39 6 Memory management and garbage collection Appel 13  
40 9 Linking and shared libraries slides  
Mon May 16 PA6 due