Basic knowledge of Algorithms, Data Structures and Finite Automata (course units: Algorithms and Data Structures and Theory of Computation).
Lectures (T) are mainly of an expository nature, but are also used to answer questions of general interest to the class. Practical (TP) sessions serve to consolidate the concepts presented in the lectures through pencil-and-paper exercises and programming exercises (using e.g. lex and yacc). They are also used to introduce the various project goals. Laboratory (PL) sessions provide additional support regarding the exercises proposed in the TP sessions, as well as support concerning the project.
To provide the student with an in-depth contact with methodologies and techniques for the generation of machine code from a program written in a high-level programming language. In particular, the student should come to: understand the goals and architecture of a compiler; understand the principles of lexical, syntax and semantic analysis, and be able to implement these phases of a compiler, both from scratch and using appropriate tools; understand some principles of final code generation.
In addition to these subject-related skills, students are expected to develop other skills, including analysis and synthesis, critical reasoning, practical application of the acquired knowledge, and an attention to quality. Autonomous learning, the ability to work in a team, oral and written communication, and problem solving skills are also to be fostered.
1. Goals and architecture of a compiler
2. Lexical analysis
3. Syntax analysis (top-down and bottom-up parsing)
4. Abstract syntax
5. Semantic analysis
6. Activation records
7. Intermediate representation
8. Code generation.
Andrew W. Appel. Modern Compiler Implementation in Java, 2nd ed,. Cambridge University Press, 2002.