Go to:
You are in:: Start > CC3001
Site map
FC6 - Departamento de Ciência de Computadores FC5 - Edifício Central FC4 - Departamento de Biologia FC3 - Departamento de Física e Astronomia e Departamento GAOT FC2 - Departamento de Química e Bioquímica FC1 - Departamento de Matemática


Code: CC3001     Acronym: CC3001     Level: 300

Classification Keyword
OFICIAL Computer Science

Instance: 2023/2024 - 1S Ícone do Moodle

Active? Yes
Web Page: http://www.dcc.fc.up.pt/~pbv/aulas/compiladores
Responsible unit: Department of Computer Science
Course/CS Responsible: Bachelor in Computer Science

Cycles of Study/Courses

Acronym No. of Students Study Plan Curricular Years Credits UCN Credits ECTS Contact hours Total Time
L:B 0 Official Study Plan 3 - 6 48 162
L:CC 68 study plan from 2021/22 3 - 6 48 162
L:F 3 Official Study Plan 2 - 6 48 162
L:G 0 study plan from 2017/18 2 - 6 48 162
L:M 0 Official Study Plan 2 - 6 48 162
L:Q 0 study plan from 2016/17 3 - 6 48 162

Teaching Staff - Responsibilities

Teacher Responsibility
Pedro Baltazar Vasconcelos

Teaching - Hours

Theoretical classes: 1,71
Laboratory Practice: 1,71
Type Teacher Classes Hour
Theoretical classes Totals 1 1,71
Pedro Baltazar Vasconcelos 1,71
Laboratory Practice Totals 2 3,42
Pedro Baltazar Vasconcelos 1,71
Hugo Miguel Oliveira Romualdo Simões 1,71

Teaching language



Study and implementation of principles of construction of compiler and interpreters for imperative programming languages.

Learning outcomes and competences

At the end of this course students should be able to:
1) Understand the decomposition of a compiler in phases: lexical analysis, syntactical analysis, semantic analysis, intermediate code generation and machine code generation
2) Understand the concept of concrete and abstract syntax and intermediate language representations
3) Implement a compiler for a small imperative programming language following the phases of point 1)

Working method


Pre-requirements (prior knowledge) and co-requirements (common knowledge)

Basic knowlege of imperative and functional programming.
Basic knowlege of assembly language (e.g. MIPS).
Models of computation (regular expressions, finite automata and context free grammars).


Introduction to programming language execution principles. Compilers vs interpreters. Lexical analysis. Scanner generators. Syntactic analysis (LL,LR, LALR parsers). Parser generators. Syntax oriented compilation. Attribute grammars. Semantic analysis: symbol table, type checking. Activation records. Three address code translation. Code generation: flow analysis, register allocation. 

Mandatory literature

Torben Mogensen; Basics of Compiler Design, 2010
Appel Andrew W. 1960-; Modern compiler implementation in ML. ISBN: 978-0-521-60764-3 pbk

Complementary Bibliography

Andrew W. Appel; Modern compiler implementation in C. ISBN: 0-521-58390-X
Louden Kenneth C.; Compiler construction. ISBN: 978-0-534-93972-4 hbk

Teaching methods and learning activities

Lectures for exposure of concepts suported by slides projections and interactive demonstration.

Practical classes in laboratories for solving proposed worksheets and monitoring the practical projects:

Practical project for teams of 2 students: construction of a compiler for a simplified imperative language.

GitHub Classroom will be used for colaboration betwen students and for managing practical projects.


Physical sciences > Computer science

Evaluation Type

Distributed evaluation with final exam

Assessment Components

designation Weight (%)
Exame 60,00
Trabalho laboratorial 10,00
Trabalho prático ou de projeto 30,00
Total: 100,00

Amount of time allocated to each course unit

designation Time (hours)
Elaboração de projeto 68,00
Estudo autónomo 50,00
Frequência das aulas 14,00
Trabalho laboratorial 28,00
Total: 160,00

Eligibility for exams

To be eligible for exam the student should be present at the two assement moments for the practical project.

Calculation formula of final grade

Final mark = 10%*W + 15*P1 + 15%*P2 + 60%*E


W : Submssion of weekly exercise sheets
P1: Mark for the 1st project milestone
P2: Mark for the 2nd project mileston
E : Mark obtained in exam

To obtain aproval the student must achive a minimum of 40% mark on the exam.

Special assessment (TE, DA, ...)

The assement parameters are the same as for ordinary students.
Eligibility for exam of worker students requires only the presentation of the two assement phases of the practical project.

Classification improvement

Students may attend the exam and improve their grade in that assement parameter, but maintain the grade of the project component and practical exercises of their first aproval.
Recommend this page Top
Copyright 1996-2024 © Faculdade de Ciências da Universidade do Porto  I Terms and Conditions  I Acessibility  I Index A-Z  I Guest Book
Page created on: 2024-04-25 at 02:17:20 | Acceptable Use Policy | Data Protection Policy | Complaint Portal