Undergraduate Course: Compiling Techniques (INFR10053)
|School||School of Informatics
||College||College of Science and Engineering
|Credit level (Normal year taken)||SCQF Level 10 (Year 3 Undergraduate)
||Availability||Available to all students
|Summary||This course describes the phases of a modern programming language compiler with an emphasis on widely-used techniques. The course project will require students to implement a complete compiler for a simple educational programming language, targeting an abstract machine such as
* Introduction: structure of a compiler
* Lexical analysis: tokens, regular expressions, Lex
* Parsing: context-free grammars, predictive and LR parsing, Yacc
* Abstract syntax: semantic actions, abstract parse trees
* Semantic analysis: symbol tables, bindings, type-checking
* Stack frames: representation and abstraction
* Intermediate code: representation trees, translation
* Basic blocks and traces: canonical trees and conditional branches
* Instruction selection: algorithms for selection, RISC and CISC
* Liveness analysis: solution of dataflow equations
* Register allocation: colouring by simplification, coalescing
* Advanced Topics: automatic parallelisation, popular open-source compilers: GCC, LLVM
Relevant QAA Computing Curriculum Sections: Compilers and Syntax Directed Tools
Entry Requirements (not applicable to Visiting Students)
||Other requirements|| This course is open to all Informatics students including those on joint degrees. For external students where this course is not listed in your DPT, please seek special permission from the course organiser.
This course has the following mathematics prerequisites:
1 - General background: integers/real numbers, set theory: union, intersection,...
2 - Graph theory, in particular, directed/undirected graphs, cyclic/acyclic graphs, labeled graphs, trees, subgraph isomorphism, graph colouring.
3 - Algebraic structures, in particular, lattices and join/meet.
Information for Visiting Students
|High Demand Course?
Course Delivery Information
|Not being delivered|
On completion of this course, the student will be able to:
- Ability to analyse compilation tasks and to apply standard compilation techniques
- Ability to develop, implement and apply modifications to standard compilation techniques and algorithms wherever this is necessary.
- Ability to understand and implement design decisions in modern compilers.
|* Andrew W. Appel, Modern Compiler Implementation, Cambridge University Press, 1998. Three versions of this book are available which present code fragments from the compiler in the languages C, Standard ML and Java. Students should use whichever version of the book they prefer.|
* Alfred V. Aho, Ravi Sethi, Jeffrey D, Ullman, Compilers: Principles, Techniques and Tools. Addison Wesles, 1986.
* Steven Muchnick, Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997
* Reinhard, Wilhelm, Dieter Maurer, Compiler Design. Addison Wesley, 1995.
* Charles N. Fischer, Richard J. LeBlank, Jr., Crafting a Compiler in C. Benjamin/Cummings, 1991.
* Keith Cooper, Linda Torczon, Engineering a Compiler, Morgan Kaufmann
|Course organiser||Dr Christophe Dubach
Tel: (0131 6)50 3092
|Course secretary||Mrs Victoria Swann
Tel: (0131 6)51 7607