| CARVIEW |
CS352
Compilers: Principles And Practice
Spring 2025, 3 credits. Instructor: Prof. Tiark Rompf
Announcements will be posted on Piazza. Homework submission and grading will be done through Brightspace.
Lectures are Tuesday and Thursday, 3:00-4:15pm in LWSN 1142.
Teaching assistants are:
- Yueyang Tang, tang619@purdue.edu
- Shao-Yu Huang, huan1464@purdue.edu
PSO sessions are:
- Wednesday 12:30pm to 1:20pm, HAAS 257
- Thursday 4:30pm to 5:20pm, HAAS 257
- Friday 10:30am to 11:20am, HAAS 257
Midterm will be held on Thursday Mar 13th during the normal class hours.
About the Course
In a nutshell: The theory and practice of programming language translation, compilation, and run-time systems, organized around a significant programming project to build a compiler for a simple but non-trivial programming language.
Parts of the class are based on the Advanced Compiler Construction class taught by Michel Schinz at EPFL. The corresponding class materials (lecture slides, programming assignments, etc) are used with permission.
Grades: Final grades will be based on results for the programming assignments (30%), midterm (30%), and final exam (40%). Achieving a minimum of 20% in each of the three components is necessary (but not sufficient!) for a passing grade.
Late Work Policy: No late submissions will be accepted. Any travel, including interview trips, load from work or other classes, or simply not being able to get your program to run will not be grounds for extensions or exceptions.
Academic integrity: For general policies about academic integrity etc. Please see here. You are expected to read that page and will be held accountable according to its contents.
Attendance: This is an in-person class. Attendance is encouraged but not required. Most students profit from in-class discussions. But if you prefer to learn on your own that’s fine, too. Lectures won’t be recorded but slides will be made available online. You’re welcome to take notes in class, but strictly no audio or video recordings.
Recommended Books
- Modern compiler implementation in Java, Second Edition, Andrew W. Appel, Cambridge University Press, 1998.
- An Incremental Approach to Compiler Construction, Abdulaziz Ghuloum, 2006.
- Engineering a Compiler, Second Edition, Keith D. Cooper, Linda Torczon, 2007.
- Compilers: Principles, Techniques, and Tools, Aho, Lam, Sethi, Ullman, Addison-Wesley, 2007.
Supplementary Resources
Lecture Notes
A set of lecture notes is available here:
Course Schedule
The following schedule is tentative and subject to change.
- Jan 19 Project 1 due (1 week)
- Jan 26 Project 2 due (1 week)
- Feb 9 Project 3 due (2 weeks)
- Feb 23 Project 4 due (2 weeks)
- Mar 9 Project 5 due (2 weeks)
- Mar 13 Midterm exam
- Spring break (Mar 17 to Mar 22)
- Apr 6 Project 6 due (2 weeks)
- Apr 27 Project 7 due (3 weeks)
Slides
Week 1
Week 2
Week 3
Week 4-5
Week 6-7
- Closure Conversion (pdf)
Week 8
- Optimizations (pdf)
Week 9
- Dataflow Analysis (pdf)
Week 12-14
Week 15-16
Week 17
- Object-Oriented Languages (pdf)
Projects
- Project 1: Arithmetic (due 11:59pm Sunday Jan 19)
- Project 2: Branches, Loops, and Error Handling (due 11:59pm Sunday Jan 26)
- Project 3: Type Checking - Functions - Heap Allocation (due 11:59pm Sunday Feb 9)
- Project 4: CMScala to CPS Translation (due 11:59pm Sunday Feb 23)
- Project 5: Value Representation (due 11:59pm Sunday Mar 9)
- Project 6: Optimization (due 11:59pm Sunday Apr 6)
- Project 7: Garbage Collection (due 11:59pm Sunday Apr 27)