Compilers

Year
3
Academic year
2016-2017
Code
01000287
Subject Area
Computer Science
Language of Instruction
Portuguese
Mode of Delivery
Face-to-face
Duration
SEMESTRIAL
ECTS Credits
6.0
Type
Compulsory
Level
1st Cycle Studies

Recommended Prerequisites

Basic knowledge of Algorithms, Data Structures and Finite Automata (course units: Algorithms and Data Structures and Theory of Computation).

Teaching Methods

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.

Learning Outcomes

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.

Work Placement(s)

No

Syllabus

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.

Head Lecturer(s)

Carlos Manuel Mira da Fonseca

Assessment Methods

Assessment
Project: 40.0%
Exam: 60.0%

Bibliography

  1. Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman. Compilers – Principles, Techniques, and Tools, Addison-Wesley, 1986. (2nd edition published in 2006)
  2. Andrew W. Appel. Modern Compiler Implementation in C, Cambridge University Press, 1998.
  3. 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).
  4. 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.