News

  • 28.09.2012: The results of the second exam are online.
  • 21.09.2012: The second exam on Sep. 24 will be only in AH 4, and will start at 10:00. The exam review will be on Oct. 4th, 9:00-10:30, in I2's seminar room.
  • 13.07.2012: The results of the first exam are now online and can be found below! The inspection of the exams will take place in 5056 on Thursday, July 19th, 10-12 o'clock.
  • 11.07.2012: Tomorrow, at 15:45 the first CB exam will take place in AH 4 + 5.
    • Matr. No. 22... -  283253 (including): AH 4
    • Matr. No 283431 - 32... as well as BIT-students and students participating in master exams during bachelor studies: AH 5
  • 11.07.2012: Solution of Exercise 6 Question 3 is now uploaded.
  • 10.07.2012: The list of students admitted to the exam is now online.
  • 09.07.2012: The first exam (on 12 July) will start at 15:45. The review is scheduled for 19 July, 10:00-12:00, in room 5056.
  • 02.07.2012: Added solution to sheet 8, task 2 for download (see exercise section).
  • 06.06.2012: Exercise sheet 9 will be shortened because the contents of the exercise will be not discussed until the Wednesday-lecture. The sheet will be available for download on Wednesday at latest.
  • 07.05.2012: Added test cases for the lexer (see exercise section below)
  • 02.05.2012: Updated exercise sheet (Ex. 2: as your grammar should generate a sequence of tokens, the inputs are given correspondingly)!
  • 18.04.2012: There is no exercise class on April 23. The next exercise class will be on April 30.
  • 18.04.2012: a corrected version of exercise sheet 1 was uploaded. The changes are: in 2a) the αs should be pairwise disjoint and in 4) the generated list of tokens was wrong.
    Thank you for the comments.
  • 27.02.2012: page set up


Schedule

Type

Day

Time

Place

Start

Lecturer

V3

Wed

10:00-11:30

AH 6

4 April

Thu

15:00-16:30

AH 5

5 April

Ü2

Mon

10:00-11:30

AH 2

16 April


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 (lex, yacc)


Prerequisites

Basic knowledge of the relevant undergraduate courses of the first two years (Vordiplom/Bachelor) 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

1

4 April

Introduction

2

5 April

Lexical Analysis I

(Introduction)

3

12 April

Lexical Analysis II

(Extended Matching Problem)

4

25 April

Lexical Analysis III

(Practical Aspects)

5

26 April

Syntax Analysis I

(Introduction)

6

2 May

Syntax Analysis II

(LL(k) Grammars)

7

3 May

Syntax Analysis III

(LL(1) Parsing)

8

9 May

Syntax Analysis IV

(Transformation to LL(1) & Bottom-Up Parsing)

9

10 May

Syntax Analysis V

(LR(k) Grammars)

10

16 May

Syntax Analysis VI

(LR(0) Parsing)

11

23 May

Syntax Analysis VII

(SLR(1) & LR(1) Parsing)

12

24 May

Syntax Analysis VIII

(LALR(1) Parsing & Practical Issues)

13

6 June

Semantic Analysis I

(Attribute Grammars)

14

13 June

Semantic Analysis II

(Circularity Check)

15

14 June

Semantic Analysis III

(Attribute Evaluation)

16

20 June

Code Generation I

(Intermediate Code)

17

21 June

Code Generation II

(The Compiler)

18

27 June

Algorithmic Differentiation I [Naumann]

19

28 June

Algorithmic Differentiation II [Naumann]

20

4 July

Algorithmic Differentiation III [Naumann]

21

11 July

Question time

22

12 July

First Exam (15:45-18:00; 120 min)


Exercise sheets

Exercise sheets will be made available on Mondays. The deadline for handing in your solution is on Monday, before the exercise class begins. 

During the exercises we will implement our very own compiler for a simple while-language While. The target code will be Jasmin (which can be found here).

Please hand in your solutions for this programming project via e-mail to fgretz(at)cs.rwth-aachen.de.


Exam

  • First exam: Thursday, 12 July, 15:45-18:00, AH 4 & 5 (duration: 120 min)
  • Review of first exam: Thursday, 19 July, 10:00-12:00, 5056
  • Second exam: Monday, 24 September, 10:00-12:00, AH 4 (duration: 120 min)
  • Review of second exam: Thursday, 4 October, 09:00-10:30, I2 seminar room

 

 


Evaluation results


Further information

  • The course will entirely be given 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.
  • The form of the exam (oral/written) will be announced in the beginning of the course.


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