Credits: 7.5 hp, Advanced level
Study period: LP1 2023 (Aug-Oct)
Elective for: D4, C4, E4, F4, Pi4
Course responsible: Görel Hedin
Student representatives: See Moodle.
Formal course plan: In English and in Swedish.Welcome to the course! The first lecture is on Monday, Aug 28, at 15:15 in MA:5. See the Week by Week tab for what to do.
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.