Duration
25h Th, 75h Proj.
Number of credits
Lecturer
Language(s) of instruction
English language
Organisation and examination
Teaching in the second semester
Schedule
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.
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.
Organisational adjustments related to the current health context
Courses are given using podcast. A live meeting is organized every week, at the scheduled time for the course. Q/A sessions are organized every week during teaching time.
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.
Assessment methods and criteria
Below you will find information on the evaluation methods planned for in-person and remote exams as well as those planned for hybrid sessions. Depending on how the health crisis evolves, the chosen method will be communicated to you no later than one month before the start of the exam session.
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 intermediate reports (3), 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.
- Same as in the first session. Students will have the opportunity to improve their compiler with respect to the first session.
Work placement(s)
Organizational remarks
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: Cyril Soldani, cyril.soldani@ulg.ac.be
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.