Syllabus academic year 2011/2012
(Created 2011-09-01.)
COMPILER CONSTRUCTIONEDA180
Credits: 7,5. Grading scale: TH. Cycle: G2 (First Cycle). Main field: Technology. Language of instruction: The course might be given in English. EDA180 overlaps following cours/es: EDA200. Optional for: D4, D4is, D4pv, E4, E4pv, F4, F4pv, Pi4, Pi4pv. Course coordinator: Univ. lektor Lennart Andersson, lennart.andersson@cs.lth.se, Computer Science. Prerequisites: EDAA01 Programming - Second Course or EDA027 Algorithms and Data Structures. Recommended prerequisits: Object-oriented Programming in Java. Assessment: Written examination. Project report. To qualify for the written examination, students must have completed their programming assignments. The project must be completed within three months after the final lecture. The final grade for the entire course is based on the result of the written examination. Parts: 3. Home page: http://cs.lth.se/eda180.

Aim
The fundamental theories and methods used in Compiler Construction are central to the discipline of Computer Science, and widely applicable in both research and software construction.

The course aims to give knowledge of the principal structure of a compiler and about the basic theories and methods used to implement the different parts of the compiler. It should give an understanding for how the theories and the methods can be used in related areas like translation between different source languages, analysis of program properties, interpretation, and analysis of other artificial languages. The course also includes how advanced object-oriented techniques, such as design patterns and aspect-oriented
programming can be applied to compiler construction.

Knowledge and understanding
For a passing grade the student must

Skills and abilities
For a passing grade the student must

Contents
The architecture of a compiler. The definition of programming languages: regular expressions, context-free grammars, abstract grammars, static semantics, dynamic semantics. Methods: scanning, parsing, static-semantic analysis, translation to intermediate code and to native code. Runtime systems: memory allocation, automatic memory management (garbage collection). Tools: Scanner-generators, parser-generators, abstract syntax-tree generators. Object-oriented techniques: design patterns (Interpreter, Visitor), static aspect-oriented programming. Application areas for compiler construction.

Literature
Recommended textbook: Appel, A W: Modern Compiler Implementation in Java. Cambridge University Press 2002. ISBN: 052182060X.

Parts

Code: 0105. Name: Laboratory Work.
Higher education credits: 1,5. Grading scale: UG. Assessment: Completed laboratory exercises. Contents: Laboratory work during the first study period of the course.

Code: 0205. Name: Project Work.
Higher education credits: 1,5. Grading scale: UG. Assessment: Completed project work and a project report. The project must be finished within three months after the last lecture. Contents: A project work during the second study period of the course.

Code: 0305. Name: Written Examination.
Higher education credits: 4,5. Grading scale: TH. Assessment: Written examination. The final grade of the entire course is based on the result of this exam. To qualify for the written exam, students must have completed their laboratory work. Contents: A written examination after the first study period of the course.