Syllabus academic year 2008/2009
(Created 2008-07-17.)
COMPILER CONSTRUCTIONEDA180

Higher education credits: 7,5. Grading scale: TH. Level: G2 (First level). Language of instruction: The course will be given in Swedish. EDA180 overlap following cours/es: EDA200 och EDA200. Optional for: D3, D3dpd, D3ps, E4, E4ps, F4, F4tvb, Pi4. Course coordinator: Univ. lektor Lennart Andersson, lennart.andersson@cs.lth.se, Inst f datavetenskap. Prerequisites: EDA027 Algorithms and Data Structures or EDAA01 Programming - Second Course. 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://www.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.