2023

Compilers

Name: Compilers
Code: INF13213L
6 ECTS
Duration: 15 weeks/156 hours
Scientific Area: Informatics

Teaching languages: Portuguese
Languages of tutoring support: Portuguese, English
Regime de Frequência: Presencial

Sustainable Development Goals

Learning Goals

* Discuss the concept of compilers. [Familiarity]
* Understand the disposal of data in memory in execution time. [Familiarity]
* Translate between Abstract Syntax Trees and Intermediate Representation Trees. [Usage]
* Use abstract machines in code generation. [Usage]
* Understand the various forms of optimization that can be applied to a program, during it's compilation. [Familiarity]
* Identify the need and advantages or disadvantages of including garbage collection in a programming language. [Assessment]
* Determine the differences between the compilation process of imperative, functional and object-oriented languages. [Usage]
* Write a compiler for Abstract Syntax Trees which uses various optimization techniques and generates code for an abstract machine, starting by the translation to Intermediate Representation. [Assessment]

Contents

1. Execution models
1.1. Activation records
1.2. Memory organization
2. Intermediate representation
3. Code generation
3.1 Abstract machines
3.2 Just-in-time compilation
4. Optimizations
4.1. Basic blocks and traces
4.2. Instruction selection
4.3. Liveness analysis
4.4. Register alocation
5. Advanced topics
5.1. Garbage collection
5.2. Compilation of object-oriented languages
5.3. Compilation of functional languages
5.4. Polymorphic types
5.5. Dynamic linking

Teaching Methods

Theoretical classes with presentation of contents, explanation of applications and illustration of examples. Practical classes with resolution of exercises and development of examples.
The assessment consists of a set of biweekly or two-frequency tests or a final exam.

Teaching Staff