Home
Welcome to Compilers!
We use Modern Compiler Implementation in C 1998 by Andrew W. Appel (The Tiger Book) as the textbook. You can download both the Chinese edition and the English edition of the book, but please DO NOT DISTRIBUTE them. The textbook errata can be found here.
The Tiger Book
News
Sep. 14, 2026: WeChat Group
Welcome to compilers! This is our WeChat group. Please scan the QR code below to join it. Also try to inform your classmates if you can :)
Schedule
| Week | Tuesday | Friday |
|---|---|---|
| Week 1 | 2026-09-15 LEC 1 What Are Compilers Slides: 导论.pptx | 2026-09-18 LEC 2 Lexical Analysis: Regular Expressions Slides: 词法分析-I |
| Week 2 | 2026-09-22 LEC 3 Lexical Analysis: Implementation of R.E Slides: 词法分析-II | 2026-09-25 LEC 4 Introduction to Parsing Slides: 语法分析-I |
| Week 3 | 2026-09-29 LEC 5 Top-Down Parsing | 2026-10-02 National Day Holiday |
| Week 4 | 2026-10-06 Mid-Autumn Festival Holiday | 2026-10-09 LEC 6 Introduction to LR Parsing |
| Week 5 | 2026-10-13 LEC 7 Constructing LR Parsing Generators | 2026-10-16 LEC 8 AST for Tiger |
| Week 6 | 2026-10-20 LEC 9 Bindings in Tiger | 2026-10-23 LEC 10 Type Checking |
| Week 7 | 2026-10-27 LEC 11 Activation Records | 2026-10-30 LEC 12 Static Link & Frames in Tiger Compiler |
| Week 8 | 2026-11-03 LEC 13 Introduction to LLVM IR | 2026-11-06 LEC 14 Translation |
| Week 9 | 2026-11-10 LEC 15 Instruction Selection | 2026-11-13 Midterm Exam |
| Week 10 | 2026-11-17 LEC 16 LLVM-based Instruction Selection | 2026-11-20 LEC 17 LLVM-based Instruction Selection part2 |
| Week 11 | 2026-11-24 LEC 18 Global Optimization | 2026-11-27 LEC 19 Register Allocation |
| Week 12 | 2026-12-01 LEC 20 Register Allocation part2 | 2026-12-04 LEC 21 Register Allocation for Trees & Garbage Collection |
| Week 13 | 2026-12-08 LEC 22 Garbage Collection (II) | 2026-12-11 LEC 23 Garbage Collection (III) & Modern GC in Java |
| Week 14 | 2026-12-15 LEC 24 Functional Programming Languages | 2026-12-18 LEC 25 OBJECT-TIGER |
| Week 15 | 2026-12-22 Lec 26 AI Compiler | 2026-12-25 Lec 27 Review |
| Week 16 | 2026-12-29 Finalterm Exam | 2026-1-1 New Year’s Day Holiday |
General Information
Announcements
For announcements and assignments, the Web is our authoritative form of communication. We expect students to check the Compilers home page for both news and schedule regularly, every couple of days. If you hear a rumor, check it there.
Textbook
We use Modern Compiler Implementation in C 1998 by Andrew W. Appel (The Tiger Book) as the textbook. You can download both the Chinese edition and the English edition of the book, but please DO NOT DISTRIBUTE them. The textbook errata can be found here.
Staff
Lectures:
| Name | Office | |
|---|---|---|
| Mingyu Wu (吴明瑜) | mingyuwu@sjtu.edu.cn | Room 3-403, Software Building |
Office hours: by appointment via Email/WeChat or ask after class.
TAs:
| Name | Office | |
|---|---|---|
| Bojun Ren (任柏俊) | renbojun@sjtu.edu.cn | Room 3-403, Software Building |
| Yuhang Hao (郝宇航) | yuhanghao@sjtu.edu.cn | Room 3-403, Software Building |
Office hours: by appointment via Email/WeChat or ask after class.
Prior Materials
If you notice errors of any kind in the materials, from minor typos to major blunders, please report them to TAs. We will post corrections here.
Exams:
| Year | Semester | Title | Paper | Solution |
|---|---|---|---|---|
| 2016 | Fall | final exam | Download | Download |
| 2017 | Fall | middle exam | Download | Download |
| 2017 | Fall | final exam | Download | 😈 No |
| 2018 | Fall | middle exam | 👉 | Download |
| 2018 | Fall | final exam | 👉 | Download |
| 2019 | Fall | middle exam | 👉 | Download |
| 2019 | Fall | final exam A | Download | Download |
| 2019 | Fall | final exam B | Download | Download |
| 2021 | Fall | final exam A | Download | Download |
| 2022 | Fall | middle exam | Download | Download |
| 2022 | Fall | final exam | Download | Download |
| 2023 | Fall | middle exam | Download | Download |
| 2023 | Fall | final exam | Download | Download |
| 2024 | Fall | middle exam | Download | Download |
| 2024 | Fall | final exam | Download | Download |