News
- 06.04.2011: Updated results after exam review online! If you could not make it to the review and want to examine your second exam, please do not hesitate to contact us.
- 06.04.2011: The results of the second exam are online.
- 04.04.2011: The exam review for the second exam takes part on Wednesday, 06.04.2011, from 16 to 17.30 in room 5054.
- 08.02.2011: Updated results after exam review online!
- 03.02.2011: Notice that the exam review will be tomorrow, 04.02.2011, from 15.30 to 17.30 in room 5052. (Campus)
- 03.02.2011: The results of the exam are online.
- 31.01.2011: The lecture hall allocation for the exam tomorrow is as follows: AH II Matr.No. 256000-288030 (only 6 Credit exam!), AH III Matr. No. 288200-307078 + all students taking the 8 Credit exam
- 21.01.2011: In addition to the presentation of the solution for Ex. 11 there will be a question time at the exercise class on Wednesday, 26.01.2011. Please send your questions via e-mail beforehand.
- 12.01.2011: You can find an overview of the exam permissions below.
- 15.12.2010: The 9th exercise is the last compulsory exercise for BOTH Bachelor and Master students. The course will be worth 6 Credits then. Any Master students interested in an 8 Credit course, please contact us seperately. Diploma students: In order to get a "Übungsschein" ALL further exercises are compulsory.
- 06.12.2010: Due to delayed exercise announcement we decided to shorten the current sheet. Two exercises have been shifted to next weeks sheet.
- 28.10.2010: The lecture on Tuesday, 02. Nov., will begin 15 minutes later because of the Fachschaftvollversammlung.
- 20.10.2010: Due to some requests: The registration for the compiler construction exam can be found here.
- 17.09.2010: page set up
Schedule
Type | Day | Time | Place | Start | Lecturer |
V3/4 | Tue | 14:00-15:30 | AH 2 | Oct 19 | |
Thu | 13:30-15:00 | AH 1 | Oct 14 | ||
Ü2 | Wed | 10:00-11:30 | AH 2 | Oct 20 |
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
Lecture | Date | BSc/MSc/Diplom | Subject | Slides | Handout |
1 | Thu Oct 14 | B/M/D | Introduction | ||
2 | Tue Oct 19 | B/M/D | Lexical Analysis I
(Introduction) | ||
3 | Thu Oct 21 | B/M/D | Lexical Analysis II
(The Matching Problem) | ||
4 | Tue Oct 26 | B/M/D | Lexical Analysis III
(First-Longest-Match Analysis) | ||
5 | Thu Oct 28 | B/M/D | Lexical Analysis IV
(Practical Aspects) | ||
6 | Tue Nov 2
at 14:15 | B/M/D | Syntactic Analysis I
(Introduction) | ||
7 | Thu Nov 4 | B/M/D | Syntactic Analysis II
(Top-Down Parsing) | ||
8 | Tue Nov 9 | B/M/D | Syntactic Analysis III
(LL(k) Grammars) | ||
9 | Thu Nov 11 | B/M/D | Syntactic Analysis IV
(LL(1) Parsing) | ||
10 | Tue Nov 16 | B/M/D | Syntactic Analysis V
(LR(k) Grammars) | ||
11 | Thu Nov 18 | B/M/D | Syntactic Analysis VI
(LR(0) Parsing) | ||
12 | Tue Nov 23 | B/M/D | Syntactic Analysis VII
(SLR(1) Parsing) | ||
13 | Thu Nov 25 | B/M/D | Syntactic Analysis VIII
(LR(1) Parsing) | ||
14 | Tue Nov 30 | B/M/D | Syntactic Analysis IX
(Practical Issues) | ||
15 | Thu Dec 2 | B/M/D | Semantic Analysis I
(Attribute Grammars) | ||
16 | Tue Dec 7 | B/M/D | Semantic Analysis II
(Circularity of Attribute Grammars) | ||
17 | Thu Dec 9 | B/M/D | Semantic Analysis III
(Circularity Test & Attribute Evaluation) | ||
18 | Tue Dec 14 | B/M/D | Semantic Analysis IV
(L-Attributed Grammars)/
Code Generation I (Introduction) | ||
19 | Thu Dec 16 | B/M/D | Code Generation II
(Intermediate Code) | ||
20 | Tue Dec 21 | B/M/D | Code Generation III
(Translation to Intermediate Code) | ||
21 | Tue Jan 11 | D | Error Handling in Top-Down Parsing &
Strongly Noncircular Attribute Grammars | ||
22 | Thu Jan 13 | D | Evaluation of Strongly Noncircular Attribute Grammars | ||
23 | Tue Jan 18 | D | Code Generation IV
(Implementation of Static Data Structures) | ||
24 | Thu Jan 20 | D | Code Generation V
(Implementation of Dynamic Data Structures) | ||
25 | Tue Jan 25 | D | Generation of Machine Code | ||
26 | Thu Jan 27 | D | Code Optimization | ||
27 | Tue Feb 1, 14:00-16:00 | B/M/D | 1st Exam | ||
28 | Wed Mar 23, 14:00-16:00 | B/M/D | 2nd Exam | ||
Exercise sheets
Exercise sheets will be made available on Wednesdays. The deadline for handing in your solution is on Wednesdays, before the exercise class begins.
- Exercise 0 (due Wed., 20.10.2010)
- Exercise 1 (due Wed., 27.10.2010)
- Exercise 2 (due Wed., 03.11.2010) updated!
- Exercise 3 (due Wed., 10.11.2010)
- Exercise 4 (due Wed., 17.11.2010) updated!
- Exercise 5 (due Wed., 24.11.2010) (Correction 5.4b)
- Exercise 6 (due Wed., 01.12.2010)
- Exercise 7 (due Wed., 08.12.2010) shortened!
- Exercise 8 (due Wed., 15.12.2010)
- Exercise 9 (due Wed., 22.12.2010)
- Exercise 10 (due Wed., 19.01.2011)
- Exercise 11 (due Wed., 26.01.2011)
Klausurzulassung (Bachelor/Master 6 Credits!)
See www.infostudium.de for a discussion forum for computer science students at RWTH.
Exam
- First Exam: Results 6 Credits
- First Exam: Results 8 Credits
- Second Exam: Results 6 Credits
- Solution: 6 + 8 Credit Exam (01.02.2011)
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
- General:
- Lexical Analysis:
- Syntactic Analysis:


