Princeton University
Computer Science Dept.

Computer Science 320
Compiling Techniques

Professor Andrew Appel

Exam study guide

Spring 2012


Midterm Exam Study Guide

These exercises from Modern Compiler Implementation are very much like the problems that may appear on the exam:

Lexical analysis: Exercises 2.1, 2.2, 2.3, 2.4, 2.5, 2.8
Grammars and Parsing: Exercises 3.3abcfg, 3.4, 3.5, 3.6, 3.12, 3.13
Type-checking: Not well covered in the book, but work some examples of typing and subtyping derivations (and reread the MacQueen notes).

Some old midterm exams: 2011, 2009, 2007, 2002, 2001, 2000.
WARNING: Alpha-conversion and constant-folding (assignment 2) are newly added to the course this year, so they won't be covered on old exams! Make sure you understand them.
WARNING: The material on closure conversion and lambda-lifting (Danvy paper, first 10 pages), is in scope, but not covered on old exams!

Final Exam Study Guide

Some old midterm exams: 2001, 2003, 2010.

Everything listed above for midterm, as well as:
Activation records: Ex. 6.1, 6.3
Instruction selection: Ex. 9.1, 9.2.
Liveness analysis: Ex. 10.1, 10.4, 10.5
Register allocation: Ex. 11.1, 11.2a,b, 11.3, 11.4
Garbage collection: Ex. 13.1, and understand in detail Algorithms 13.2, 13.3, 13.8, 13.9 and Figures 13.12, 15.2
Object-oriented languages: Ex. 14.1, 14.3, 14.4; be able to draw pictures like Program 14.3 (on page 297);
Functional languges: Ex. 15.1
Dataflow analysis: Ex. 17.1, 17.2, 17.5
Loop optimizations: 18.1, 18.2, 18.6
Static Single-Assignment: Chapter 19 (except 19.2); Exercises 19.3, 19.5, 19.7, 19.8, 19.11, 19.12.
Instruction scheduling: 20.1, 20.3
Decoupled Software Pipelining: If I gave you a loop like the one in Figure 1(a) of the DSWP paper, could you draw the diagrams in Figure 1(b) and 1(c), and the programs in Figure 3?


Back to COS 320 front page