2024-2025 / INFO0085-1

Compilers

Duration

25h Th, 75h Proj.

Number of credits

 Master MSc. in Computer Science, professional focus in computer systems security5 crédits 
 Master MSc. in Computer Science and Engineering, professional focus in management5 crédits 
 Master Msc. in computer science and engineering, professional focus in intelligent systems5 crédits 
 Master MSc. in Computer Science, professional focus in management5 crédits 
 Master MSc. in Computer Science and Engineering, professional focus in computer systems and networks5 crédits 
 Master MSc. in Computer Science, professional focus in intelligent systems5 crédits 
 Master in mathematics, research focus6 crédits 
 Master in mathematics, teaching focus6 crédits 

Lecturer

Pascal Fontaine

Language(s) of instruction

English language

Organisation and examination

Teaching in the second semester

Schedule

Schedule online

Units courses prerequisite and corequisite

Prerequisite or corequisite units are presented within each program

Learning unit contents

This course addresses the practical and theoretical aspects of compiler construction. The course will include the following topics:



  • Definition and general structure of a compiler
  • Lexical analysis: regular expressions, analysis based on deterministic and non deterministic finite automata, implementation 
  • Syntax analysis: context-free grammar, top-down and bottom-up parsing, implementation
  • Semantic analysis: concept, syntax-directed translation, scope and type checking, symbol table
  • Intermediate code generation: intermediate representations, SSA form, code optimization, introduction to LLVM
  • Final code generation: instruction selection, register allocation, memory management, code optimization
  • Practicals : design and implementation of a complete compiler

Learning outcomes of the learning unit

At the end of the course, the student will have a good theoretical and practical knowledge of the general structure of a compiler and will be able to implement from scratch a compiler for a simple language.

The techniques reviewed in the course are not only useful for full compiler constructions, but, among other many uses, they can be used to develop domain specific languages (as found in a huge amount in software),

This course contributes to the learning outcomes I.1, I.2, II.1, II.2, III.1, III.3, IV.3, VI.2, VI.3, VII.1, VII.2, VII.3, VII.4, VII.5 of the MSc in computer science and engineering.

Prerequisite knowledge and skills

Prerequisites: INFO2009 (Introduction to computer science), INFO0902 (data structures and algorithms), INFO0016 (Introduction to the theory of computation) or similar courses.

Planned learning activities and teaching methods

Lectures are given in English.  Ex-cathedra lectures on the theory as well as on the more practical aspects (related to the project). Project: The students (by groups of two) design and implement a complete compiler for a mini-language.

Mode of delivery (face to face, distance learning, hybrid learning)

Face-to-face.

Course materials and recommended or required readings

The contents of the course, as well as the assignments and useful links, will be made available on the eCampus space for the course.

Exam(s) in session

Any session

- In-person

oral exam

Written work / report


Additional information:

First session: the students will be evaluated on the basis of:

  • The practical assignment: the implementation of a compiler for given small language. The project will be divided into four deadlines. At each deadline, the source code provided by the students will be tested automatically by the submission platform on some standardized tests. The evaluation of the assignment will be based on the performance at the different submission steps, the final report and the final source code. NB: Typically, grades for the assignment are assigned to the whole group.  However, in some particular cases (e.g., when there are evidences that a member of a group has not participated enough in the project), the grade may be assigned individually, reflecting the personal involvement of each member of a group.
  • Individual oral exam: This exam will focus on the compiler developed during the assignment and on the lecture material. The objective of the oral exam is to ensure that the student has correctly assimilated the concepts discussed during the lectures and that he participated in the practical assignment.
Second session:

  • Same as in the first session. Students will have the opportunity to improve their compiler with respect to the first session.

Work placement(s)

Organisational remarks and main changes to the course

The contents of the lectures, as well as the assignments and useful links, will be made available on the eCampus space for the course.

Contacts

Teacher: Pascal Fontaine, 04 366 28 75, Pascal.Fontaine@uliege.be
Assistant: Florent De Geeter, Florent.DeGeeter@uliege.be

Association of one or more MOOCs

Items online

e-Campus space
All materials and links are available on the e-Campus space of the course.

Course web page
Lecture slides and instructions for the project are available on this web page.