News | Syllabus | Textbooks | Resources | Homework submission
Lectures: | Tuesday, 6 PM – 9 PM, 106 West Village G |
Instructor: | Jesse Tov |
Email: | concat ["jesse", ".", "tov+", "csg262", "@", "gm", "ail.com"] |
Office hours: | Monday, 4 PM – 6 PM, 308 West Village H (or by appointment) |
Mar. 28 | Homework 8 is posted. |
Mar. 18 | Homework 7 is posted. |
Mar. 12 | Homework 6 is posted. |
Feb. 18 | Homework 5 is posted. |
Feb. 13 | Homework 4 is posted. |
Feb. 4 | Homework 3 is posted. |
Jan. 29 | Homework 2 is posted. |
Jan. 15 | Homework 1 is posted. |
Jan. 9 | Homework 0 is posted. Because I intend to hand out solution sets in lecture immediately after this is due, you may not use any of your late days on this assignment. |
Jan. 9 | Please subscribe to the course mailing list. |
Jan. 7 | I've posted a FAQ. What am I missing? |
Each student will write a small compiler in Standard ML. Topics include lexical analysis, parsing, abstract syntax trees, symbol tables, type checking, intermediate code, simple code improvement, register allocation, and code generation.
# | Date | Title | HW in | HW out |
1 | Jan. 8 | Introduction/SML | finger (0) | |
2 | Jan. 15 | Lexical analysis and SML-LEX | finger (0) | lexer (1) |
3 | Jan. 22 | LL parsing | ||
4 | Jan. 29 | LR parsing and SML-YACC | lexer (1) | parser (2) |
5 | Feb. 5 | Semantic analysis | parser (2) | semantic (3) |
6 | Feb. 12 | Frame analysis | ||
7 | Feb. 19 | Translation to IR 1 | semantic (3) | frame (4) |
8 | Feb. 26 | Midterm; Translation to IR 2 | translate (5) | |
- | Mar. 4 | Spring break | ||
9 | Mar. 11 | Instruction selection | frame (4) & translate (5) | codegen (6) |
10 | Mar. 18 | Data-flow analysis | codegen (6) | liveness (7) |
11 | Mar. 25 | Register allocation | liveness (7) | regalloc (8) |
12 | Apr. 1 | Garbage collection? | ||
13 | Apr. 8 | ? | regalloc (8) | integration (9) |
14 | Apr. 15 | Final Exam | integration (9) |
Homework is due before lecture (6 PM) on Tuesday. Each student has 5 free late days that may be used at will, up to 2 per homework. Please let me know before the submission time when you plan to use one. Barring exceptional circumstances, other late homework will not be accepted.
The only required textbook is Modern Compiler Implementation in ML, by Andrew Appel. You will probably need this book on hand to do the homework exercises. Try to get the edition that says "Reprinted with corrections, 1999" on page iv, because that has fewer errors than the earlier editions. Check out the list of errata, because applying it to your book now may save you confusion later.
I also recommend reading an introduction to Standard ML. I learned from Elements of ML Programming by Jeffrey Ullman; many others like ML for the Working Programmer by Lawrence Paulson. For any SML resources you use, make sure they cover SML '97, as SML '91 is significantly different.
Please use the submission script located on the CCS login machines at /course/csg262/bin/submit-csg262. If your code for homework 3 is in a directory hw3, submit it with the UNIX command:
% /course/csg262/bin/submit-csg262 submit 3 hw3
You can run /course/csg262/bin/submit-csg262 help to see more options, which will allow you to confirm, delete, or get a copy of your submission.
Last updated 28 March 2008.