Compiling TechniquesModule description #41162 / Version 2
- 6 CP
- Portfolio examination
- Graded
- Winter and summer semester
- English
| Module / Version | #41162 / #2 |
|---|---|
| Validity | Since Winter semester 2026/27 |
| 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 | 5 | practical | 3 weeks |
| (Deliverable assessment) Course Work 1 - oral consultation | 25 | oral | 10 minutes |
| (Deliverable assessment) Course Work 2 - Semantic analysis | 5 | practical | 3 weeks |
| (Deliverable assessment) Course Work 2 - oral consultation | 25 | oral | 10 minutes |
| (Deliverable assessment) Course Work 3 - Code generation | 5 | practical | 3 weeks |
| (Deliverable assessment) Course Work 3 - oral consultation | 25 | oral | 10 minutes |
| (Deliverable assessment) Course Work 4 - Optimisation | 5 | practical | 2 weeks |
| (Deliverable assessment) Course Work 4 - oral consultation | 5 | oral | 5 minutes |
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: Winter and summer semester.
Maximum number of participants
The maximum capacity of participants is 30.
Registration procedures
Registration takes place via ISIS during the first week of lectures.
Recommended reading, lecture notes
Lecture notes
unavailable
Electronic lecture notes
available – https://www.tu.berlin/compl/studium-lehre
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 | WS 2026/27 | Wahlpflichtbereich › Kataloge › Informatik |
| Computer Engineering Computer Engineering (M. Sc.) - StuPO 2015 | WS 2026/27 | Wahlpflichtbereich › Studiengebiet A › Eingebettete Systeme und Rechnerarchitekturen / Embedded Systems and Computer Architectures |
| Computer Science Computer Science (B. Sc.) - StuPO 2015 | WS 2026/27 | Wahlpflichtbereich › Katalog Informatik |
| Computer Science Computer Science (B. Sc.) - StuPO 2025 | WS 2026/27 | Wahlpflichtbereich › Studiengebiete › Rechensysteme › Weitere Module |
| Computer Science (Informatik) Computer Science (Informatik) (M. Sc.) - StuPO 2015 | WS 2026/27 | Wahlpflichtbereich › Studiengebiet › Grundlagen der Informatik / Foundations of Computing |
| Electrical Engineering Electrical Engineering (M. Sc.) - StuPO 2015 | WS 2026/27 | Wahlpflichtbereich › Studiengebiete Fak. IV › Grundlagen der Informatik / Foundations of Computing |
| Information Systems Management Information Systems Management (B. Sc.) - StuPO 2015 | WS 2026/27 | Wahlpflichtbereich › Informatik |
| Information Systems Management Information Systems Management (B. Sc.) - StuPO 2021 | WS 2026/27 | Wahlpflichtbereich › Informatik |
Miscellaneous
Not specified