- 12/23: A copy of the final exam and a sample solution are posted below. You can pick up your exam at the CSE office main desk when they are open. Best wishes for the holidays and for a great new year!
Lectures: MWF 12:30-1:20, EE 037
Sections: Th 1:30 (AA) Loew 216, Th 2:30 (AB) Loew 202.
Instructor: Hal Perkins, CSE 548, perkins[at]cs, office hours MW 2-3, CSE 002; plus in my regular office when I'm there and the door is open.
TA: Hadi Esmaeilzadeh, hadianeh[at]uw, office hours Tue 2-3, Fri 3-4, CSE 002.
Class discussion list
Class email list archives
Dropbox for assignment and project submission
Homework 1. Due Wed., Oct. 13, either on paper at the beginning of class, or online by 11 pm.
Homework 2. Due Mon., Oct. 25, either on paper at the beginning of class, or online by 11 pm.
Homework 3. Due Wed. Nov. 3, either on paper at the beginning of class or online by 11 pm. No late assignments accepted after 11 pm, Nov. 3 so we can hand out solutions in sections Nov. 4 before the midterm on Nov. 5.
A list of final exam topics
This quarter's final: examsample solution
Some old final exams: wi10 (solution) wi09 (solution) au08 wi08 au07
A list of midterm topics.
This quarter's midterm: examsample solution
Some old midterms: wi10 (solution) wi09 (solution) au08 wi08 (solution) au07 sp99 sp98 (solution notes)
In addition, old CSEP501 exams (the PMP compiler course) might also be useful for studying.
Schedule to be updated as the quarter progresses. Slides will be posted normally no later than the evening before class and links will likely be broken before then. Readings should be done before the associated class.
1. Sept. 29: Course introduction. slides
S1. Sept. 30: no section
2. Oct. 1: Intro & history (concl.)
3. Oct. 4: Regular expressions and scanners (intro). Read ch. 1, secs. 2.1-2.4. slides
4. Oct. 6: Scanners (concl.)
S2. Oct. 7: Project, scanners and regular expressions
5. Oct. 8: Intro to parsing. Read sec. 3.1-3.2. slides
6. Oct. 11: LR (bottom-up) parsing start. Read sec. 3.4. slides
7. Oct. 13: LR parsing (cont.)
S3. Oct. 14: Parsing
8. Oct. 15: LR parsing (concl.);
9. Oct. 18: LR conflicts and table construction. Read Sec. 3.5 and computation of First and Follow sets in Sec. 3.3.4. slides
10. Oct. 20: LR construction extended example
S4. Oct. 21: First/follow sets, parsers
11. Oct. 22: IRs slides; AST and visitor pattern slides
12. Oct. 25: AST and visitor pattern slides;
13. Oct. 27: Visitor pattern (damage control from Monday); LL parsing & recursive descent. slides
S5. Oct. 28: No sections this week.
14. Oct. 29: LL grammars and parsing
15. Nov. 1: Static semantics and type checking slides
16. Nov. 3: Attribute gramars; symbol tables (cont.)
S6. Nov. 4: Midterm review
17. Nov. 5: Midterm in class
18. Nov. 8: Types, semantics wrapup.
19. Nov. 10: x86 overview slides
X. Nov. 11: no section, Veteran's Day holiday
20. Nov. 12: x86
21. Nov. 15: x86 function calling conventions
22. Nov. 17: Code shape I - basic constructs. slides
S7. Nov. 18: No sections today - Football Thursday. Extra office hours in lab during section times.
23. Nov. 19: Code shape
24. Nov. 22: Code shape II - objects and dynamic dispatch slides
25. Nov. 24: Class canceled - snow happened in Seattle
X. Nov. 25-26: No section or lecture. Many turkeys meet their demise.
26. Nov. 29: Running minijava - project details slides
27. Dec. 1: Running minijava; Backend overview slides
S8. Dec. 2: Project, misc. topics.
28. Dec. 3: Instruction selection and scheduling
29. Dec. 6: Register allocation by graph coloring
30. Dec. 8: Optimization survey slides
S9. Dec. 9: Wrapup and review
32. Dec. 10: Compiling dynamic langauges slides
Dec. 15 (Wed): Review session, 4:30, CSE 403
Dec. 16 (Thur): Final exam, 8:30-10:20 am, EE 045.
| Computer Science & Engineering|
University of Washington
Seattle, WA 98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to Hal Perkins]
- Time and place: Tue, Thu 2:00-3:50pm, Boelter 5440.
- Professor: Jens Palsberg, 4732 Boelter Hall (email@example.com).
- Teaching assistant: John Bender (TA Office).
- Office hours. Jens: upon request, send me email. John: TBA.
- Course topics: compiler structure; lexical and syntactic analysis; semantic analysis and code generation; theory of parsing.
- Course objective: understand compilers and build one yourself!
- Requisites: CS 32, 35L, 131, 181.
- The discussion website is Piazza. Piazza gets you help fast and efficiently from classmates, the TA, and the professor. Please post your questions on Piazza instead of emailing questions to the TA or the professor.
- Book: Andrew Appel with Jens Palsberg, Modern Compiler Implementation in Java, 2nd edition. Cambridge University Press, 2002.
- Paper: Massimiliano Poletto and Vivek Sarkar, Linear Scan Register Allocation, ACM TOPLAS 21(5):895-913, 1999.
- Lectures: (Lecture Notes, black and white)
1. Thu Oct 2, Tue Oct 7: Introduction, lexical analysis. Appel Ch. 1-2, Notes Ch. 1-2. 2. Thu Oct 9: LL parsing. Appel Ch. 3.1-3.2, Notes Ch. 3. 3. Tue Oct 14: JavaCC and JTB. Notes Ch. 5. 4. Thu Oct 16, Tue Oct 21: Semantic analysis. Appel Ch. 5+14, Notes Ch. 6, The MiniJava Type System. 5. Thu Oct 23, Tue Oct 28: Translation. Appel Ch. 7, 8, Notes Ch. 7. 6. Thu Oct 30: Liveness analysis. Appel Ch. 10, Notes Ch. 8. 7. Tue Nov 4, Thu Nov 6: Register allocation. Appel Ch. 11, Notes Ch. 8. The paper on linear scan register allocation. 8. Thu Nov 13: Activation records. Appel Ch. 6, Notes Ch. 9. 9. Tue Nov 18: Review of Midterm material. 10. Tue Nov 25: Discussion of Homework 3. 11. Tue Dec 2: Discussion of Homeworks 4+5. 12. Thu Dec 4: LR parsing. Appel Ch 3.3, Notes Ch. 4. 13. Tue Dec 9: Control-flow analysis. 14. Thu Dec 11: Review of Final Exam material.
- Homework: homework 1, homeworks 2-5.
- Getting started on Homework 2.
- Sample Main.java
- Homework 2+3 survival guide.
- The MiniJava Type System.
- Homework submission tips.
- Submit your homework via CCLE; grading policies.
Deadlines: (late homework will not be accepted) 1. LL(1) parsing 5 %, due Fri Oct 17, at 11am. 2. Type checking of MiniJava     15 %, due Fri Nov 7, at 11am. 3. MiniJava -> Vapor 15 %, due Wed Nov 26, at 11am. 4. Vapor -> Vapor-M 10 %, due Fri Dec 12, at 11am. 5. Vapor-M -> MIPS 10 %, due Fri Dec 12, at 11am.
- Midterm exam (15 %), solution. Thu Nov 20, 2:00pm - 3:30pm, in class. Closed book. The midterm exam covers the book (ch.3.1-3.2) and the lecture notes (ch.3).
- Final exam (30 %), solution. Wed Dec 17, 3:00pm - 6:00pm, in the class room. Closed book. The final exam covers the book (ch.5-8,10,11), the lecture notes (ch.6-9), the paper on linear scan register allocation, and homework 2-6.
- Related Computer Science Curriculum 2008 (CS2008) bodies of knowledge:
- Related IEEE/ACM Software Engineering 2004 (SE2004) bodies of knowledge:
- CMP.ct.7 State-based and table driven construction techniques
- CMP.ct.9 Grammar-based input processing (parsing)
- FND.mf.7 Finite State Machines, regular expressions
- FND.mf.8 Grammars