Skip to main content Skip to navigation

CS325 Compiler Design

CS325 15 CATS (7.5 ECTS) Term 1

Availability

Option - CS, CSE, DM and Mathematics.

Prerequisites

CS126, CS259

Academic Aims

The module will provide a through introduction to the principles of compiler design, with an emphasis on general solutions to common problems as well as techniques for putting the extensive theory into practice.

Learning Outcomes

A successful student will have acquired the skills to understand, develop, and analyze recognizers for programming languages. The student will also be able to deploy efficient and methodical techniques for integrating semantic analysis into the afore-mentioned recognizers, and generate low-level code for most constructs that characterise imperative and functional programming languages.

Content

  • Languages and Grammars: regular expressions, context-free grammars, BNF.
  • Parsing: top-down and bottom-up techniques.
  • Semantic Analysis: attribute grammars, translation schemes, type inference, symbol tables.
  • Code Generation: run-time environment, intermediate code, register allocation, optimization.
  • Programming Paradigms: issues in the compilation of imperative, functional, and object-oriented languages.

Books

  • Basic Compiler Design by Torben Mogensen,DIKU, University of Copenhagen, (2010)
  • Engineering a Compiler by Keith Cooper, Linda Torczon, Morgan Kaufmann; 2 edition (2011)
  • Aho, Lam, Sethi, Ullman Compilers: Principles, Techniques, and Tools, Addison-Wesley, (2007/2013)
  • Andrew Appel: Modern Compiler Implementation in Java, Cambridge University Press, (2002)
  • Watt and Brown: Programming Language Processors in Java, Prentice Hall, (2000)
  • Grune, Bal, Jacobs, Langendoen: Modern Compiler Design, John Wiley and Sons, (2000)
  • Tremblay and Sorenson, The Theory and Practice of Compiler Writing, McGraw-Hill

Assessment

Two-hour examination (70%), coursework (30%)

Teaching

30 one-hour lectures plus 10 one-hour seminars