CS502: Compiling and Programming Systems
Course Description
Covers the theory behind the different components of a compiler, programming
techniques to put the theory into practice, and the interfaces used to
modularize the compiler. The core requirement for the course is the construction
of a compiler for a simple but nontrivial language of the Algol family
with nested scope and heap-allocated records, supplemented by written exercises,
and exams. The project is organized to demonstrate important techniques
that are now in common use: abstract syntax trees to avoid dangling syntax
with semantics, separation of instruction selection from register allocation,
sophisticated copy propagation to allow greater flexibility to earlier
phases of the compiler, and careful containment of target-machine dependencies
to one module.
Advanced material will also be included where time allows, such as garbage
collection, compilation of object-oriented and functional languages, dataflow
analysis, loop optimizations, parser error recovery, code-generator generators,
byte-code interpreters, static single-assignment form, instruction scheduling
and software pipelining, parallelization techniques, and cache-locality
optimizations such as prefetching, blocking, instruction-cache layout,
and branch prediction. Extra credit and elective options allow students
to explore these topics concretely as extensions of the base course project.