Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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.

tiger book cover

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 :)

WeChat Group QR Code

Schedule

WeekTuesdayFriday
Week 12026-09-15
LEC 1 What Are Compilers
Slides: 导论.pptx
2026-09-18
LEC 2 Lexical Analysis: Regular Expressions
Slides: 词法分析-I
Week 22026-09-22
LEC 3 Lexical Analysis: Implementation of R.E
Slides: 词法分析-II
2026-09-25
LEC 4 Introduction to Parsing
Slides: 语法分析-I
Week 32026-09-29
LEC 5 Top-Down Parsing
2026-10-02
National Day Holiday
Week 42026-10-06
Mid-Autumn Festival Holiday
2026-10-09
LEC 6 Introduction to LR Parsing
Week 52026-10-13
LEC 7 Constructing LR Parsing Generators
2026-10-16
LEC 8 AST for Tiger
Week 62026-10-20
LEC 9 Bindings in Tiger
2026-10-23
LEC 10 Type Checking
Week 72026-10-27
LEC 11 Activation Records
2026-10-30
LEC 12 Static Link & Frames in Tiger Compiler
Week 82026-11-03
LEC 13 Introduction to LLVM IR
2026-11-06
LEC 14 Translation
Week 92026-11-10
LEC 15 Instruction Selection
2026-11-13
Midterm Exam
Week 102026-11-17
LEC 16 LLVM-based Instruction Selection
2026-11-20
LEC 17 LLVM-based Instruction Selection part2
Week 112026-11-24
LEC 18 Global Optimization
2026-11-27
LEC 19 Register Allocation
Week 122026-12-01
LEC 20 Register Allocation part2
2026-12-04
LEC 21 Register Allocation for Trees & Garbage Collection
Week 132026-12-08
LEC 22 Garbage Collection (II)
2026-12-11
LEC 23 Garbage Collection (III) & Modern GC in Java
Week 142026-12-15
LEC 24 Functional Programming Languages
2026-12-18
LEC 25 OBJECT-TIGER
Week 152026-12-22
Lec 26 AI Compiler
2026-12-25
Lec 27 Review
Week 162026-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:

NameE-MailOffice
Mingyu Wu (吴明瑜)mingyuwu@sjtu.edu.cnRoom 3-403, Software Building

Office hours: by appointment via Email/WeChat or ask after class.


TAs:

NameE-MailOffice
Bojun Ren (任柏俊)renbojun@sjtu.edu.cnRoom 3-403, Software Building
Yuhang Hao (郝宇航)yuhanghao@sjtu.edu.cnRoom 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:

YearSemesterTitlePaperSolution
2016Fallfinal examDownloadDownload
2017Fallmiddle examDownloadDownload
2017Fallfinal examDownload😈 No
2018Fallmiddle exam👉Download
2018Fallfinal exam👉Download
2019Fallmiddle exam👉Download
2019Fallfinal exam ADownloadDownload
2019Fallfinal exam BDownloadDownload
2021Fallfinal exam ADownloadDownload
2022Fallmiddle examDownloadDownload
2022Fallfinal examDownloadDownload
2023Fallmiddle examDownloadDownload
2023Fallfinal examDownloadDownload
2024Fallmiddle examDownloadDownload
2024Fallfinal examDownloadDownload