Compilation
Cod: 21018
Department: DCET
ECTS: 6
Scientific area: Computer Engineering
Total working hours: 156
Total contact time: 26

The curricular unit covers the specification and formal treatment of programming languages, with a view to creating programs that interpret, compile, or process documents in these languages.

1. Lexical analysis
2. Syntactical Analysis
3. Code generation
4. Code optimization

Students are expected to be able to understand and implement diverse stages of a compiler, from its specification up to the implementation. Therefore, they should be able to
Understand mathematical structures that enable the specification of programming languages;
Specify formally a programming language;
Implement a compiler, an interpreter or a processor of that same language, by having resource of the most suitable tools.

Languages processing. Compilers and Interpreters. Tasks of a compiler. Phases of the compiler.
Lexical analysis. Syntactic analysis. Semantic analysis. Code Generation. Code Optimization.

Compilers: principles, techniques and tools, 2nd Ed., Aho, Lam, Setti, Ullman, Addison-Wesley, 2007.
Flex & Bison, Levine. O'Reilly, 2009.
Compiladores: Da Teoria à Prática, Pedro Reis Santos e Thibault Langlois. FCA, 2014.

E-learning.

Continuous assessment is privileged: 2 digital written documents (e-folios) during the semester (40%) and a final digital test, Global e-folio (e-folio G) at the end of the semester (60%). In due time, students can alternatively choose to perform one final exam (100%).

Pré-requisitos: conhecimentos de programação (u.c. 21178 – Laboratório de Programação) e dos conceitos formais de línguas (u.c. 21078 – Linguagens e Computação)

Apresentação pessoal do docente