Compiling TechniquesModule description #41162 / Version 1
- 6 CP
- Portfolio examination
- Graded
- Summer semester
- English
This module description is not valid in the current semester (Winter semester 2026/27).
Current version (v2)
| Module / Version | #41162 / #1 |
|---|---|
| Validity | Summer semester 2024 – Summer semester 2026 |
| Available language(s) | English, German |
| Credit points | 6 |
| Person responsible for the module | Steuwer, Michel |
| Grading | Graded |
| Exam format | Portfolio examination |
| Language(s) of instruction | English |
Affiliation
| Faculty | Fakultät IV |
|---|---|
| Institute | Institut für Softwaretechnik und Theoretische Informatik |
| Academic chair | 34353200 FG Programmiersprachen |
Contact
| Office | EN 21 |
|---|---|
| Contact person | Steuwer, Michel |
| E-mail address | lehre@compl.tu-berlin.de |
| Website | https://www.tu.berlin/compl/studium-lehre |
Learning outcomes
On completion of this course, the student will be able to:
* understand the design of modern compilers
* analyse compilation tasks and apply standard compilation techniques
* design, implement and apply modifications to standard compilation techniques and algorithms
* implement a fully functional compiler following modern compiler design principles
* understand the design of modern compilers
* analyse compilation tasks and apply standard compilation techniques
* design, implement and apply modifications to standard compilation techniques and algorithms
* implement a fully functional compiler following modern compiler design principles
Content
In this course, students learn about the phases of a modern programming language compiler, with an emphasis on techniques widely used in practice. Students will learn about implementing compiler passes in a real compiler framework. The course project will require students to implement a complete compiler from scratch for a simple programming language, targeting a real machine assembly.
* Introduction: structure of a compiler
* Lexical analysis: tokens, regular expressions, Lex
* Parsing: context-free grammars, predictive and LR parsing
* Abstract syntax: semantic actions, abstract parse trees
* Semantic analysis: symbol tables, bindings, type-checking
* Intermediate code: intermediate representations, SSA, translations
* Liveness analysis: solution of dataflow equations
* Instruction selection: algorithms for selection, RISC and CISC
* Register allocation: colouring by simplification, coalescing
* Real assembly language: ARM, MIPS, RISC-V, or similar
* Advanced Topics may include: automatic parallelisation, popular open-source compilers: GCC, LLVM, MLIR
* Introduction: structure of a compiler
* Lexical analysis: tokens, regular expressions, Lex
* Parsing: context-free grammars, predictive and LR parsing
* Abstract syntax: semantic actions, abstract parse trees
* Semantic analysis: symbol tables, bindings, type-checking
* Intermediate code: intermediate representations, SSA, translations
* Liveness analysis: solution of dataflow equations
* Instruction selection: algorithms for selection, RISC and CISC
* Register allocation: colouring by simplification, coalescing
* Real assembly language: ARM, MIPS, RISC-V, or similar
* Advanced Topics may include: automatic parallelisation, popular open-source compilers: GCC, LLVM, MLIR
Module components
Compulsory area
The following courses are mandatory for this module:
Workload and credit points
Compiling Techniques (Lecture)
| Workload description | Multiplier | Hours | Total |
|---|---|---|---|
| Attendance | 15 | 2 h | 30 h |
| Pre/post processing | 15 | 2 h | 30 h |
| 60 h | |||
Compiling Techniques (Internship)
| Workload description | Multiplier | Hours | Total |
|---|---|---|---|
| Attendance | 15 | 4 h | 60 h |
| Pre/post processing | 15 | 4 h | 60 h |
| 120 h | |||
The workload of the module adds up to 180 hours. The module therefore comprises 6 credit points.
Description of teaching and learning methods
This module consists of a weekly lecture that teaches the foundations of modern compiler design. The main component of this module is a practical project in which the students individually implement a fully working compiler. Labs will assist the students in their practical work.
Requirements for participation and examination
Desirable prerequisites for participation in the courses:
The modules "Algorithmen und Datenstrukturen" as well as "Rechnerorganisation" and "Systemprogrammierung", as well as a solid programming skills in Python are required.
Mandatory requirements for the module examination registration:
This module has no examination requirements.
Completion of the module
| Grading | Graded |
|---|---|
| Exam format | Portfolio examination |
| Type of portfolio examination | 100 points in total |
| Language | English, German |
Test elements
| Name | Points/Weight | Category | Duration/Extent |
|---|---|---|---|
| (Deliverable assessment) Course Work 1 (Lexical analysis & parsing) | 30 | practical | 3 Weeks |
| (Deliverable assessment) Course Work 2 (Semantic analysis) | 30 | practical | 3 Weeks |
| (Deliverable assessment) Course Work 3 (Code generation) | 30 | practical | 3 Weeks |
| (Deliverable assessment) Course Work 4 (Optimisation) | 10 | practical | 2 Weeks |
Duration of the module
The following number of semesters is estimated for taking and completing the module: 1 semester(s).
This module can be started in the following semesters: Summer semester.
Maximum number of participants
This module is not limited to a number of students.
Registration procedures
See https://compl.tu-berlin.de as well as the first lecture.
Recommended reading, lecture notes
Lecture notes
unavailable
Electronic lecture notes
available – https://compl.tu-berlin.de
Recommended literature
No recommended literature given
Assigned programs
This module version is used in the following programs:
| Program / program version | Semester(s) | Curriculum component |
|---|---|---|
| Computer Engineering Computer Engineering (B. Sc.) - StuPO 2015 | SS 2025 | Wahlpflichtbereich › Informatik |
| WS 2025/26 | Wahlpflichtbereich › Informatik | |
| SS 2026 | Wahlpflichtbereich › Informatik | |
| Computer Engineering Computer Engineering (M. Sc.) - StuPO 2015 | SS 2025 | Wahlpflicht Studiengebiete Fak. IV › Eingebettete Systeme und Rechnerarchitekturen / Embedded Systems and Computer Architectures |
| WS 2025/26 | Wahlpflicht Studiengebiet B › Eingebettete Systeme und Rechnerarchitekturen / Embedded Systems and Computer Architectures | |
| SS 2026 | Wahlpflicht Studiengebiet B › Eingebettete Systeme und Rechnerarchitekturen / Embedded Systems and Computer Architectures | |
| Computer Science Computer Science (B. Sc.) - StuPO 2015 | SS 2025 | Wahlpflichtbereich › Wahlpflichtbereich Katalog Informatik |
| WS 2025/26 | Wahlpflichtbereich › Wahlpflichtbereich Katalog Informatik | |
| SS 2026 | Wahlpflichtbereich › Wahlpflichtbereich Katalog Informatik | |
| Computer Science (Informatik) Computer Science (Informatik) (M. Sc.) - StuPO 2015 | SS 2025 | Wahlpflicht Studiengebiete Fak. IV › Grundlagen der Informatik / Foundations of Computing |
| WS 2025/26 | Studiengebiete › Grundlagen der Informatik / Foundations of Computing | |
| SS 2026 | Studiengebiete › Grundlagen der Informatik / Foundations of Computing | |
| Electrical Engineering Electrical Engineering (M. Sc.) - StuPO 2015 | SS 2025 | Wahlpflicht Studiengebiete Fak. IV › Eingebettete Systeme und Rechnerarchitekturen / Embedded Systems and Computer Architectures |
| WS 2025/26 | Wahlpflicht Studiengebiete Fak. IV › Grundlagen der Informatik / Foundations of Computing | |
| SS 2026 | Wahlpflicht Studiengebiete Fak. IV › Grundlagen der Informatik / Foundations of Computing | |
| Information Systems Management Information Systems Management (B. Sc.) - StuPO 2015 | SS 2025 | Wahlpflichtbereich › Informatik |
| WS 2025/26 | Wahlpflichtbereich › Informatik | |
| SS 2026 | Wahlpflichtbereich › Informatik | |
| Information Systems Management Information Systems Management (B. Sc.) - StuPO 2021 | SS 2025 | Wahlpflichtbereich › Informatik |
| WS 2025/26 | Wahlpflichtbereich › Informatik | |
| SS 2026 | Wahlpflichtbereich › Informatik |
Miscellaneous
Not specified