1st Cycle Studies
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.
- Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman. Compilers – Principles, Techniques, and Tools, Addison-Wesley, 1986. (2nd edition published in 2006)
- Andrew W. Appel. Modern Compiler Implementation in C, Cambridge University Press, 1998.
- Dick Grune, Henri E. Bal, Ceriel J. H. Jacobs, and Koen G. Langendoen, Modern Compiler Design, John Wiley & Sons, Ltd, 2000. (2nd edition published in 2012).
- Rui Gustavo Crespo. Processadores de Linguagens, da concepção à implementação. IST Press. 2001. http://istpress.ist.utl.pt/lprocess.html
Andrew W. Appel. Modern Compiler Implementation in Java, 2nd ed,. Cambridge University Press, 2002.