cod. 1009064

Academic year 2023/24
1° year of course - First semester
Academic discipline
Informatica (INF/01)
Discipline informatiche
Type of training activity
72 hours
of face-to-face activities
9 credits
course unit

Learning objectives

Students will be introduced to the main problems related to the development of a compiler for a programming language. For each of these problems, the corresponding theoretical results, tools and techniques leading to an algorithmic solutions will be highlighted.
Knowledge and understanding.
The classical subdivision of the compiling process in its phases will lead to a better understanding of the corresponding theoretical results and implementation techniques.
Applying knowledge and understanding.
Compiler principles and techniques have applications beyond the filed of formal language translation, spanning to natural language processing as well as the analysis, checking and transformation of (semi-) structured documents.
Making judgements.
The complexity of the considered problem naturally leads to a comparison of different solution approaches and tools; students are stimulated to a critical comparison of the many design and implementation alternatives.
Communication skills.
The preparation of a seminar to deepen one of the topics of the course allows students to refine their communication skills, both in written form and orally.
Learning skills.
The study of a problem as complex as formal language translation is an excellent example of a synergy between important theoretical results and sophisticated algorithmic techniques.


It is assumed that the students have a good knowledge of at least an (imperative) programming language, as well as of the main algorithmic techniques for the design and development of efficient data structures.

Course unit content

Introduction: interpreters and compilers
Lexical analysis
Syntax analysis (parsing)
Static semantics
Intermediate representations (IR)
Analysis and optimization of IR

Full programme


Keith Cooper, Linda Torczon
Engineering a Compiler, 2nd Edition
Morgan Kaufmann, 2011

Teaching methods

Lectures and guided exercises

Assessment methods and criteria

Learning outcome.
Students will need to show knowledge of the components of a compiler, the underlying theoretical results and implementation techniques, as well as some tools for the automatic generation of scanners and parsers for programming languages.
Exam: at least 21 days before the exam, each student will have assigned a topic among those discussed during the course, as well as additional didactic material to prepare a seminar. The oral exam will consist in the presentation of the seminar (max 15 minutes) followed by a few open questions, both on the seminar topic and on the other topics discussed during the lectures.

Other information