Compiler Construction I
|Dozent:||Dr. Michael Petter & Dr. Axel Simon|
|Ort/Zeit:||Mo 14:00-16:00 in 00.13.009A|
|Beschreibung: ||Introduction to Compilerconstruction - how to translate an imperative language.|
A Compiler is an essential part of the system software stack. Its job consists in translating programs from a high-level programming language like C or Java into a sequence of machine instructions of an actual processor. Compilers are comparatively complex programs. Their construction involves ideas and approaches from many different areas of computer science. The first two phases, i.e. lexical and syntactical analysis of the input program, are a major application for formal methods. Later on, e.g. during code generation, we treat methods for register allocation via approximative graph colouring.
The lecture is divided into the following topics:
- Outline of compiler construction
- Lexikal analysis:
From regular expressions to NFAs
Scannerdesign with NFAs
- Syntactical analysis
Contextfree languages & pushdown automata
Item-Pushdownautomata & Recursive Descent Parsing
Shift-Reduce Parsing & LR(1) Parser
- Semantical analysis
Code generation schemes
Finally we may find time for less standard techniques for compilers, as e.g. the type inference of programs.
- Attention: There will be only one exam at the end of the semester, and no repetition exam in the winter!
- You are allowed to bring a DIN A4 sheet of paper with notes on both sides.
- In case you did not pass, you have the opportunity to take "Programming Languages" or "Program Optimization" next semester or alternatively repeat the exam next summer.
- We will provide two printouts of the lecture slides in case there is some information you forgot to add to your A4 sheet. We will also provide some copies of the RCMa specification document.
Wilhelm, Seidl, Hack: Compiler Design: Syntactic and Semantic Analysis
for TUM students, the German edition is downloadable for free through the TUM/LRZ-Proxy.
The instructions and the code generation schemes are summarized in the R-CMa specification.
... in the TTT archives.
- 7.4.14 Compiler architecture, basics in regular expressions and finite automata
- 14.4.14 Thompson's algorithm, Berry-Sethi algorithm naive and sophisticated, on-the-fly powerset construction
- 28.4.14 Assembling the Scanner, basics in derivation trees, context-free grammars and pushdown automata
- 5.5.14 Top-Down Parsing with Item-Pushdown automata; a deterministic Item-pushdown via LL(1) parsing
- 19.5.14 Bottom-Up Parsing with Shift-Reduce Parser, piggy-backing an LR(0) or LR(1) Automaton
- 26.5.14 Attribute Grammars
- 2.6.14 Symbol Tables
- 16.6.14 Types
- 23.6.14, 30.6.14, 7.7.14 Code Generation 1-3