Compiler Design

The objectives are to teach students a understanding of some of the standard passes in a general purpose compiler and to provide hands-on experience in implementing a compiler for a subset of a high-level language such as Java.

Important Links

Topics:

  • Introduction to language translators and overview of the compilation process.
  • Lexical analysis: specification of tokens, token recognition, conflict resolution.
  • Parsing: Overview of CFG, Parse trees and derivations, left recursion, left factoring, top-down parsing, LALR parsing, conflict resolution, dangling-else.
  • Syntax directed translation. Semantic analysis, Type checking, intermediate code generation.
  • Runtime environments: activation records, heap management Code optimization: basic blocks, liveness, register allocation.
  • Advanced topics: Overview of machine dependent and independent optimizations.

Textbook(s)

  • Compilers: Principles, Techniques, and Tools, Alfred Aho, Monica Lam, Ravi Sethi, Jeffrey D. Ullman, Addison-Wesley, 2007
  • Modern compiler implementation in Java, Second Edition, Andrew W. Appel, Jens Palsberg, Cambridge University Press, 2002.

References

  • Computer Organization and Design: The Hardware/Software Interface, David Patterson and John Hennessy, Morgan Kaufmann, 1998