Compiler construction
Kontakt
Sekretariat
Contact
Secretary
Compiler construction
6 CP, 3 lectures + 1 tutorial, held every two years in the winter semester
Compilers are indispensable for software development. Understanding how they work is very important for students who wish to study the subject of ‘programming’ in depth. The module is therefore aimed in particular at students who wish to specialise in the field of practical Computing Science. It provides knowledge of the structure and functioning of a key component of computer systems’ system software. However, compiler design techniques are used not only in the development of system software, but also in certain application systems.
Module objectives/learning outcomes:
Students should
□ become familiar with the structure of a compiler and the tasks involved in the individual phases of compiling a programming language,
□ acquire knowledge of common methods used in all phases of a compiler,
□ be able to understand and evaluate the typical characteristics, as well as the advantages and disadvantages, of various methods in the different phases of a compiler,
□ recognise the links between concepts from automata theory and formal languages and compiler design,
□ be able to apply the methods learnt to the individual compilation phases in practice,
□ be able to understand and evaluate the use of a compiler generator,
□ learn to develop solutions to small tasks in teams of 2–3 students and to present the results to the group.
□ Carry out a small compiler/interpreter project using current compiler construction tools.
module content:
The module covers all phases of a ‘classical’ compiler: scanner, parser, semantic analysis, intermediate code generation, code optimisation and machine code generation. Common methods are presented for each phase, with alternative approaches to parsing (LL parsers vs. LR parsers) also being covered. In the area of code optimisation, various techniques for register optimisation with different prerequisites are also presented. The structure of the lecture essentially follows the book by Aho, Lam, Sethi and Ullman, which is regarded as a classic text on compiler design.
In the practical sessions, the methods presented are explored in greater depth through small examples, which students must complete independently.
In the practical component of the module, an interpreter and the front-end of a compiler are developed for a reduced language using a compiler generator (typically ANTLR).