Credits: 7.5 hp, Advanced level
Study period: LP1 2018 (Sep-Oct)
Elective for: D4, C4, E4, F4, Pi4
Course responsible: Görel Hedin
Student representatives: TBA
Maps: Lectures (MA:3 and MA:7) and the exam (MA:10) are in "Matteannexet". Computer labs (E:Alfa, E:Beta, E:Mars, E:Hacke) are in "E-huset". See map.
Formal course plan: In English and in Swedish.
In this course you will learn about compiler construction: the main phases in a compiler like scanning, parsing, static-semantic analysis, and code generation; compiler formalisms like context-free grammars and attribute grammars; compiler tools like parser generators and static aspect-oriented programming; program representations like abstract syntax trees and intermediate code; and run-time systems that handle programs during execution. During the course labs you will implement a small compiler.
Compiler construction includes general techniques that are useful in a variety of applications, not just for constructing compilers for programming languages. In industry it is common to develop domain-specific languages for data description and scripting. Source-to-source translation and program analysis are other common tasks that use techniques from compiler construction. Learning about compiler construction is also key to obtaining deep insight into programming languages.
The course will make use of the compiler generation tool JastAdd, which has been developed at the department and which is used by researchers and in industry.