CS536-F21 Intro to PLs and Compilers
|
Room: Wendt Commons 311 Tue, Thu 100-215 Instructor Aws Albarghouthi aws@cs.wisc.edu Office hours: Tue 215-315 Room 6363, Computer Sciences Teaching assistants Xin Yu, xyu273@wisc.edu Brianna Sorenson, besorenson@wisc.edu TA office hours: Mon, 12-1pm, CS 3277 and Thu, 11am-12pm, CS 3225 |
Course description
Introduction to the theory and practice of compiler design. Comparison of features of several programming languages and their implications for implementation techniques. Several programming projects required.Prereq: CS 367 and either CS 354 or 552.
Course info | Assignments | Resources | Canvas | Piazza (ask questions here)
Textbook and Notes:
- There are links to an extensive set of notes, as well as to copies of the PowerPoint presentations used in class in the table of lectures below.
- The course has no required textbook. If you would like to
have a textbook to consult for another viewpoint on the subject,
the one I recommend is
- Cooper, K. and Torczon, L., Engineering a Compiler. Morgan-Kaufmann.
Sample midterm: midterm / solution
Sample final: final / solution
Lectures
Note: Dates for topics, particularly for the second half of the course, should be considered tentative.Slides for every week will be available on Mondays in pdf and ppt formats.
| Week | Dates | Topics | Slides | Notes | Assigned | Exercises/examples |
|---|---|---|---|---|---|
| 1 | 9/9 | Course overview | pdf | ppt | ppt-a | notes | P1 | |
| 2 | 9/14,16 | Finite-state machines | pdf | ppt | ppt-a | notes | Automata Tutor | NFAs | pdf | ppt | ppt-a | notes | Examples (ppt | pdf) | H1, Sol |
| 3 | 9/21,23 | Scanner generators | pdf | ppt | ppt-a | notes | Context-free grammars | pdf | ppt | ppt-a | notes | P2 |
| 4 | 9/28,30 | Context-free grammars (ambiguity) | pdf | ppt | ppt-a | notes | ||
| Syntax-directed translation | pdf | ppt | ppt-a | notes | H2, Sol | |||
| 5 | 10/5,10/7 | Java CUP | pdf | ppt | ppt-a | notes | Examples | |
| Invited talk: Rustc by Mark Mansi | P3 | ||||
| 6 | 10/12,14 | Parsing | pdf | ppt | ppt-a | notes | ||
| Topdown parsing | pdf | ppt | ppt-a | notes | ||||
| 7 | 10/19,21 | Topdown parsing (cont'd) | pdf | ppt | notes | H3 , Sol | |
| SDT for predictive parsing | pdf | ppt | notes | ||||
| 8 | 10/26,28 | Review Session | P4 | ||
| Midterm Exam | |||||
| 9 | 11/2,4 | Static-semantic analysis | pdf | ppt | notes | ||
| Types | pdf | ppt | H4, Sol | |||
| 10 | 11/9,11 | Runtime environments | pdf | ppt | notes | ||
| Parameter passing | pdf | ppt | notes | P5 | |||
| 11 | 11/16,18 | Variable accesses | pdf | ppt | notes | ||
| Code generation 1 | pdf | ppt | notes | H5 , Sol | |||
| 12 | 11/23,25 | cancelled | pdf | ppt | notes | ||
| Thanksgiving 🦃 | |||||
| 13 | 11/30, 12/1 | Code generation 2 | pdf | ppt | notes | P6 | |
| Code generation 3 | pdf | ppt | notes | ||||
| 14 | 12/7,9 | Optimization | pdf | ppt | notes | ||
| SSA, CFG, data-flow |
pdf-1 |
pdf-2 |
ppt-1 ppt-2 | notes | ||||
| 15 | 12/14 | Review | |||
| 12/18/2021 | Final exam | 10:05AM - 12:05PM | Weeks 9-15 |