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.
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.
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.
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 contents summary
Introduction: interpreters and compilers
Syntax analysis (parsing)
Intermediate representations (IR)
Analysis and optimization of IR
Keith Cooper, Linda Torczon
Engineering a Compiler, 2nd Edition
Morgan Kaufmann, 2011
Lectures and guided exercises
Assessment methods and criteria
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.