CS 434T: Compilers
This tutorial covers the principles and practices for the design and implementation of compilers and interpreters. Topics include all stages of the compilation and execution process: lexical analysis; parsing; symbol tables; type systems; scope; semantic analysis; intermediate representations; run-time environments and interpreters; code generation; program analysis and optimization; and garbage collection. The course covers both the theoretical and practical implications of these topics. As a project course, students will construct a full compiler for a simple object-oriented language.
Full Syllabus
Class Details
Instructor: | Stephen Freund | |
Office: | TPL 302 | |
Office Hours: | Monday 12:45-1:30, 2:30-4:00, Thursday 2:30-4:00 | |
email: | freund@cs.williams.edu | |
phone: | 413-597-4260 |
Calendar
Week 1: Overview and Lexical Analysis
Reading |
|
---|---|
|
|
Assignment |
|
Week 2: Lexical Analysis, Grammars, Top-Down Parsing
Reading |
|
---|---|
|
|
Assignment |
HW 2 PA 1 Lab tutorial |
Week 3: Bottom-Up Parsing, Error Recovery
Reading |
|
---|---|
|
|
Assignment |
HW 3 Some tests for PA 1: Sample Test Script PA1 Test Suite |
Week 4: ASTs and Symbol Tables
Week 5: Scopes, Types, Type Checking
Reading |
|
---|---|
|
|
Assignment |
HW 5 IndentingPrintStream.java (feel free to use in your pretty printer) Symbol Table Design Symbol Table Example |
Week 6: Object Types, Subtyping, and TAC
Reading |
|
---|---|
|
|
Assignment |
HW 6 |
Week 7: TAC, Object Representation, Type-Based Optimizations
Reading |
|
---|---|
|
|
Assignment |
|
Week 8: TAC, Code Generation, Intro to Optimization
Reading |
|
---|---|
|
|
Assignment |
|
Week 9: Introduction to Dataflow Analysis
Reading | Dragon 9 - 9.2 |
---|---|
|
|
Assignment |
|
Week 10: Dataflow Analysis Foundations
Reading |
|
---|---|
|
|
Assignment |
|
Week 11: More Optimization, Code Generation
Reading | Dragon 8.9 – 8.9.2 |
---|---|
|
|
Assignment |
|
Week 12: Register Alloc, GC, JITs
Reading |
|
---|---|
|
|
Assignment | HW 12 |
Resources
IC Programming Project
Scala Documentation
Additional Tools
Williams CS GitLab
Random Items
- More later…
Other
- The Dragon Book’s Errata Page
- Online notes from an old course on C, Unix, and Software Tools (for more Unix hints / FAQs)
- CS136 Style Guide