Code: | EIC0028 | Acronym: | COMP |
Keywords | |
---|---|
Classification | Keyword |
OFICIAL | Programming |
Active? | Yes |
Web Page: | http://moodle.up.pt/course/view.php?id=699 |
Responsible unit: | Department of Informatics Engineering |
Course/CS Responsible: | Master in Informatics and Computing Engineering |
Acronym | No. of Students | Study Plan | Curricular Years | Credits UCN | Credits ECTS | Contact hours | Total Time |
---|---|---|---|---|---|---|---|
MIEIC | 155 | Syllabus since 2009/2010 | 3 | - | 6 | 56 | 162 |
Provide concepts which allow to:
- understand the languages’ compilation phases, in particular for imperative and object-oriented (OO) languages;
- specify the syntax and semantics of a programming language;
- understand and use the data structures and the main algorithms used to implement compilers.
The skills and learning outcomes will allow students to:
- develop and implement in software language processing systems of artificial languages and information textually specified under certain lexical and grammar rules;
- design and implement in software the various compiler stages, namely:
- regular expressions and finite automata;
- syntactic and semantic analyzers;
- semantic analyzers;
- code optimization;
- code generators having processors or virtual machines as target;
Imperative programming languages, object-oriented programming languages.
Data structures and algorithms.
Theory of Computation.
- Introduction. Compilation phases and typical structure of a compiler.
- Lexical analysis. Regular expressions and finite automaton. - Syntax analysis. Grammars. Syntax analysis’ algorithms. Error handling.
- Semantic analysis. Type checking.
- Execution environments. Memory organization and schemes for parameter passing.
- High and Low-level intermediate representations. Intermediate code generation techniques.
- Register allocation.
- Code optimizations and final code generation techniques.
Lectures: presentations, complemented by examples, demonstrations and clues for the lab work. Labs: discussions and problem solving related to the practical work.
Designation | Weight (%) |
---|---|
Participação presencial | 0,00 |
Teste | 40,00 |
Trabalho laboratorial | 60,00 |
Total: | 100,00 |
Designation | Time (hours) |
---|---|
Elaboração de projeto | 50,00 |
Estudo autónomo | 56,00 |
Frequência das aulas | 56,00 |
Total: | 162,00 |
Finalizing the lab assignment with a minimum grade of 10 (out of 20).
Maximum of three absenses in the TP classes.
FIRST ROUND (“Época Normal):
Final Grade = ROUND(0,60*AD + 0,2*T1 + 0,2*T2)
- AD: grade obtained in the distributed evaluation (lab assignment) [0..20]
- T1: grade obtained in the first test [0..20]
- T2: grade obtained in the second test [0..20]
Each student will pass in the course in the “época normal” if he/she attained the conditions for admission to exams (AD >= 10 and at the most 3 absenses from the TP classes), obtained a minimum score in each individual test (T1 and T2) of 7 marks, and an average grade of the tests (T1 and T2) equal to or greater than 8 marks, and obtained a Final Grade equal to or greater than 10 marks.
SECOND ROUND (“Época de recurso):
Final Grade = ROUND(0,60*AD + 0,40*EX)
- AD: grade obtained in the distributed evaluation (lab assignment) [0..20]
- EX: grade obtained in the exam [0..20]
Each student will pass in the course in the “época de recurso” if he/she attained the conditions for admission to exams (AD >= 10 and at the most 3 absenses from the TP classes), obtained a minimum grade of 8 marks on the Exam (EX), and obtained a Final Grade equal to or greater than 10.
During the UC, the students work on a project which requires a substantial percentage of the topics addresses in the UC. Usually, there have been two options for the projects:
(a) Development of a complete mini-compiler. Usually, this project requires the various stages of a compiler having a simplified programming language as starting point. An abstract grammar in EBNF of the input language is usually given to the students. The compiler usually involves a code generation stage targeting the Java virtual machine (JVM).
(b) Development of a language translator or a language processor/interpreter. In this case, the projects involve syntactic analysis of the programs in the input language, its intermediate representations, and the code generation in the target language or the interpretation using the intermediate representation.
There are two checkpoints during the semester. These checkpoints are used to acquire the status of the work done, of the options taken, and of the distribution and planning of the work to be done by the group members.
The practical lab assignment is mandatory. Due to its duration and complexity it must be completed within the lective semester. Finalizing the lab assignment with a minimum grade of 10 (out of 20).
FIRST ROUND:
- Midterm Exams: T1 and T2.
SECOND ROUND:
- Exam (EX).
The final grade (mark) is obtained as presented in section: "Final Mark".
The classification of the distributed component (AD) cannot be improved in the present academic year and it is used in the two rounds ("normal" and "recurso"). The grade obtained in the component related to the two midterm exams (T1 and T2) can be improved with the final exam (EX) or in the next occorrence of the UC. The grade obtained in the component related to the final exam (EX) can be improved in the next occurrence of the UC.
Practical Lab assignment:
- Development of the lexical, syntactical and semantic analysis’ phases and of the compiler’s code generation for a simple imperative language.
- This assignment should be done in groups of 4 students at the maximum.
Tests and exams are examinations with limited consultation.
The students that have passed in the course in the previous academic year (2012/2013) can avoid a new distributed component (AD) classification. In this case, the AD grade obtained in 2011/2012 will be used in the equations to calculate the final grade in the course.