Person in charge: | (-) |
Others: | (-) |
Credits | Dept. | Type | Requirements |
---|---|---|---|
9.0 (7.2 ECTS) | CS |
|
ALCC
- Prerequisite for DCSFW EC1 - Prerequisite for DIE , DCSYS , DCSFW PRED - Prerequisite for DIE , DCSYS PS - Prerequisite for DCSFW TC - Prerequisite for DIE , DCSYS |
Person in charge: | (-) |
Others: | (-) |
The aim of this subject is to cover the contents specified in the most widely used language processors, and the following specific objectives:
Estimated time (hours):
T | P | L | Alt | Ext. L | Stu | A. time |
Theory | Problems | Laboratory | Other activities | External Laboratory | Study | Additional time |
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
---|---|---|---|---|---|---|---|---|---|---|
2,0 | 0 | 0 | 0 | 0 | 2,0 | 0 | 4,0 | |||
Compiler structure and stages.
Why study compilers? The reasons the course is organised the way it is. |
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
---|---|---|---|---|---|---|---|---|---|---|
12,0 | 0 | 4,0 | 0 | 4,0 | 12,0 | 0 | 32,0 | |||
Review of context-free grammars and stack automata.
Concrete and abstract syntax trees, ascending and descending parsing techniques, the PCCTS tool, other applications.
|
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
---|---|---|---|---|---|---|---|---|---|---|
8,0 | 0 | 12,0 | 0 | 12,0 | 8,0 | 0 | 40,0 | |||
Block-structured languages, passing parameters, type checking, explicit and implicit type conversion. Other programming paradigms.
|
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
---|---|---|---|---|---|---|---|---|---|---|
9,0 | 0 | 0 | 0 | 0 | 9,0 | 0 | 18,0 | |||
Interpreters as a useful tool and way of defining the semantics of a language.
Internal and intermediate representations: in tree form, three address code, code for stack machines. Virtual machines: Advantages and disadvantages. The Q-machine. Access to local and non-local names: static chains, and displays. |
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
---|---|---|---|---|---|---|---|---|---|---|
14,0 | 0 | 10,0 | 0 | 10,0 | 14,0 | 0 | 48,0 | |||
Coding simple instructions. Compiling boolean expressions, structured types, static and dynamic arrays, procedures and functions as parameters. Adaptation to an object-oriented approach.
|
|
T | P | L | Alt | Ext. L | Stu | A. time | Total | ||
---|---|---|---|---|---|---|---|---|---|---|
6,0 | 0 | 0 | 0 | 0 | 6,0 | 0 | 12,0 | |||
Basic blocks, flow control diagrams, life of variables, use and definition of variables, optimisation examples (common sub-expressions, dead code, constant propagation, induced constants and variables in loops).
|
Total per kind | T | P | L | Alt | Ext. L | Stu | A. time | Total |
54,0 | 0 | 28,0 | 0 | 28,0 | 57,0 | 0 | 167,0 | |
Avaluation additional hours | 3,0 | |||||||
Total work hours for student | 170,0 |
The objectives pursued stimulate students in their personal work.
. The lab classes enable students to carry out their practical work and to ask questions and discuss about it.
There is a lab sheet providing explanations and setting out the exercises to be performed for the first practical exercises with the PCCTS tool
. With regard to other exercises, there is plenty of material available for producing the compiler.
No distinction is made between theory classes and problem classes, given that the latter are concentrated in just a few periods during the course. A rigid distinction between theory and problems would prove to inflexible for weekly scheduling purposes.
There are various lists of problems and students will know beforehand which ones they will be required to solve in class.
. Students should attempt to solve the problems on their own before dealing with them in class. In addition, there is abundant material available on the course Web site : notes, slides, modules, practical problems, questions from past exam exams (solved and unsolved), lists of frequent questions, etc.
The course material lets students monitor their progress both in class and outside it. Students can therefore plan their studies in a way that takes other obligations and restrictions into account.
There will be a written exam on theory (T), with exercises and short questions. The grade for practical work (P) is based on two practical exercises P1 and P2. Both will consist on modifications of the practical work done by the own student, in order to determine his mastery of the work. P1 will be set at about half of the course and P2 on the last weeks of the course.
The grade P will be obtained as
P= max(P2, ((P1+P2)/2) )
If, because of technical reasons, it were impossible to do the tests, the grade would be obtained from a written exam of the practical work.
The final grade (Fin) will be based on T and P such as to strike a balance between theory and practice.
Fin := 0.6*T + 0.4*P
Knowledge of structured programming, and data and algorithm structures; languages, automata and formal grammars; computer structure.