Compiler Construction

News

  • 05.05.2017: Questions concerning the lectures or exercises can be posted in the L2P forum or mailed to cb2017 at i2.informatik.rwth-aachen.de
  • 13.02.2017: we are online!

Schedule

Type Day Time Hall Start Lecturer
Lecture Tue 14:15 – 15:45 AH 6 2 May Noll
  Thu 14:15 – 15:45 AH 1 4 May Noll
Exercise Tue 12:15 – 13:45 AH 2 9 May Junges, Matheja, Volk

Contents

The goal of this course is to introduce foundational methods and techniques for implementing compilers for high-level (procedural) programming languages. The following topics will be discussed:

  • Lexical analysis of programs (Scanner)
  • Syntactic analysis of programs (Parser)
  • Semantic analysis of programs
  • Code generation
  • Tools for compiler construction

Prerequisites

Basic knowledge of the relevant undergraduate courses of the first two years is required:

  • Programming (essential concepts of imperative and object-oriented programming languages and elementary programming techniques)
  • Data structures and algorithms (lists, stacks, queues, trees and associated algorithms)
  • Formal languages and automata theory (regular and context-free languages, finite and pushdown automata)

Slides

No. Date Subject Slides Handout Exercises Practical exercises
1 2 May Introduction  l1 l1    
2 4 May Lexical Analysis I (Simple Matching Problem) l2 l2 ex0  
3 9 May Lexical Analysis II (Extended Matching Problem) l3 l3 ex1 prog1
code
4 11 May Lexical Analysis III (Practical Aspects)  l4 l4    
5 16 May Syntax Analysis I (Introduction) l5 l5 ex2 prog2
code
6 18 May Syntax Analysis II (LL(k) Grammars) l6  l6     
7 23 May Syntax Analysis III (LL(1) Parsing) l7 l7 ex3  
8 30 May Syntax Analysis IV (LR(k) Grammars) l8 l8 ex4  
9 1 June Syntax Analysis V (LR(0) and SLR(1) Parsing) l9 l9    
10 13 June Syntax Analysis VI (LR(1) Parsing & Handling of Ambiguities) l10  l10  ex5 prog3
code
11 20 June Syntax Analysis VII (Practical Issues) & Semantic Analysis I (Attribute Grammars) l11 l11  ex6  
12 22 June Semantic Analysis II (Circularity of Attribute Grammars) l12 l12     
A 27 June Program Analysis and Transformation from a
Practitioner’s Point of View (Jonathan Streit, itestra)
      prog4
code
B 29 June Language Concepts in Old and Recent Programming Languages (Stephan Herold, itestra)        
13 4 July Semantic Analysis III (Circularity Check) l13 l13    
14 6 July Semantic Analysis IV (Attribute Evaluation) l14 l14    
15 11 July Code Generation I (Intermediate Code) l15 l15  ex7 prog5
code
16 13 July Code Generation II (The Translation) l16 l16    
17 18 July Code Generation III (Jumping Code & Static Data Structures) l17 l17  ex8 prog6
code
18 20 July Code Generation IV (Dynamic Data Structures) l18 l18    
19 25 July Code Generation V (Compiler Backend) l19 l19    

Exam

  • First exam: Friday, 4 August, 14:00-16:00, AH 1/2/4
  • Review: TBA
  • Second exam: Tuesday, 19 September, 11:00-13:00, AH 2/3
    • We partitioned all participants into two groups based on their matriculation number as follows:
      000 001 — 330 000 in lecture hall AH2330 001 — 999 999 in lecture hall AH3
  • Review: TBA

An exam from previous years is found in the learning materials section of the L2P.

Evaluation results

Further information

  • The lectures and exercise classes will be given partly in German. The slides and other course material will be in English. There are no lecture notes (yet); the course material will consist of slides.

Additional background literature

  • A. Aho, M.S. Lam, R. Sethi, J.D. Ullman: Compilers – Principles, Techniques, and Tools; 2nd ed. Addison-Wesley, 2007.
  • A.W. Appel, J. Palsberg: Modern Compiler Implementation in Java. Cambridge University Press, 2002.
  • D. Grune, H.E. Bal, C.J.H. Jacobs, K.G. Langendoen: Modern Compiler Design. Wiley & Sons, 2000.
  • R. Wilhelm, D. Maurer: Übersetzerbau, 2. Auflage. Springer, 1997.

Interesting Links