Hall)
103
Instructor:
薛智文 Chih-Wen
Hsueh
Contact: cwhsueh@csie.ntu.edu.tw,
x322, DTH 322
Office Hours: TH 5 9, or by
appointment, DTH 322
TAs:
陳柏年
, 朱百一
, 柯典嘉, 蔡承佑 taC@newslab.csie.ntu.edu.tw,
x408, DTH 408
Office Hours: TBA, or by
appointment, DTH 408
Course Plan (subject to
change):
- Introduction (ch#1, reading ch1.6 and ch#2 by yourself is
expected.)
- Lexical analysis (Scanner) (ch#3.1–3.4, 3.6, 3.7,
3.5, 3.8):
- regular expressions, finite state automata, LEX
- Syntax analysis (Parser) (ch#4.1–4.7):
- context-free grammar, top-down parsing, LL(1), bottom-up
parsing, SLR, LR(0), LR(1), LALR(1)
- Syntax-directed translation (ch#5.1–5.6, 4.8,
4.9):
- Syntax-directed translation, using ambiguous grammar, YACC
- Symbol tables (ch#2.7, 6.5):
- data structures for symbol tables, type checking
- Intermediate code generation
(ch#6.1–6.4,6.6–6.8):
- intermediate code, declarations, ex-pressions, advanced
data structure, control flow, procedure/function, other statements
- Run time storage organization
(ch#7.1–7.4):
- stack, access to nolocal data, heap
- Optimization (ch#8.4,8.5,8.6,9.1,9.2,8.7):
- basic blocks, flow graphs, machine-independent
optimizations
- How to write a compiler
- Advanced topics1:
- garbage collection (ch#7.5–7.8), parallelism
(ch#10, ch#11), ...
Homeworks: 作業遲交每一天扣 10%,
抄襲(被抄襲)均不計分.
Final Project: 抄襲(被抄襲)均不計分.
Final project:
Due: 12:00am, June 18 (Thursday) 2009
Reference :
http://www.iis.sinica.edu.tw/~tshsu/compiler2007
NOTE: Some percentage of scores will be deducted each day for a
late submission.
Unless I agreed in person,
projects submitted later than 12:00am, June 18 (Thursday) 2009
will not be graded!
Schedule (subject to change):
No. |
Date |
Topics |
Notes |
1 |
Feb 19 |
Introduction; |
|
2 |
Feb 26 |
Scanner (I); |
|
3 |
March 5 |
Scanner (II); LEX |
Announcing HWK#1
|
4 |
March 12 |
Parser: Introduction; Top-down parsing (I) |
|
5 |
March 19 |
Top-down parsing (II); |
HWK#1 due |
6 |
March 26 |
Bottom-up parsing (I) (II) |
Announcing HWK#2 |
7 |
April 2 |
溫書假 |
|
8 |
April 9 |
Bottom-up parsing (II) (III) |
HWK#2 due; Announcing HWK#3 |
9 |
April 16 |
Mid-term exam |
covering lectures 1–8, |
10 |
April 23 |
Syntax-directed translation |
|
11 |
April 30 |
YACC and data structures |
HWK#3 due |
12 |
May 7 |
Intermediate-code generation (I) |
|
13 |
May 14 |
Intermediate-code generation (II) |
|
14 |
May 21 |
Run-time environments |
Announcing HWK#4, Final Project |
15 |
May 28 |
端午節
|
|
16 |
June 4 |
Optimization |
|
17 |
June 11 |
Putting everything together |
HWK#4 due |
18 |
June 18 |
Final project due |
|
Prerequisites:
Assembly language, high-level
programming language (C-like language), data structures, and automata.
Textbook:
"Compilers Principles, Techniques, and
Tools," by A.V. Aho, M. S. Lam, R. Sethi, and J.D. Ullman,
2007 (2
nd edition) Addison Wesley.
Evaluation:
-
homeworks (25%): one homework
per 2 to 3 lectures.
-
mid-term exam (35%);
-
final project (40%): check points, documents, presentation, and
testing;
-
class participation and performance. [10%]
Reference: