Click on a lecture to get the slides.
All of the slides
are in
|
| Date | Subject | Student Prep | Notes | Suggested Exercises |
1/20/09 | Introduction to Compilers and MiniSVG | | 01-Intro.ppt.pdf | |
| 1/22/09 | Introduction to Lexical Analysis | Ch. 1, Ch. 2 through 2.6 | 02-lexing-MiniSVG.txt | Exercise 2.6.2 and 2.6.3 |
| 1/27/09 and 1/29/09 | CFGs, parse trees, top-down predictive parsing | Ch. 2.2 thru 2.5, Ch 4 through 4.4 | 03-parsing-MiniSVG.txt, 03-CFG-Intro.ppt.pdf, 04-predictive-parsers.txt, 04-Predictive-Parsers.ppt.pdf | Exercises 2.4.6, 4.4.1 |
| 2/3/09 and 2/5/09 | MiniJava and MIPS | BNF for MiniJava, Appendix A from Patterson and Hennessy book, written by Jim Larus A.1 through A.5, A.10 - MIPS details, A.11 - Short Conclusion and MARS Tutorial Part 1 | 05-predparse-n-MiniJava.txt, 05-Predparse-n-MiniJava.ppt.pdf, 06-MIPS-n-pattstackframe.txt, 06-MIPS-Patt-stackframe.ppt.pdf | |
| 2/10/09 and 2/12/09 | ambiguity, the expression evaluation compiler, Lexical analysis, JLex and JavaCUP | Ch 3 thru 3.8, Ch. 4.9, skim JLex Manual and JavaCUP manual | 07-expr-eval-ambiguity.txt, 07-expr-eval-ambiguity.ppt.pdf, 08-lex-with-JLex.txt, 08-lex-with-JLex.ppt.pdf | JLex tutorial |
| 2/17/09 and 2/19/09 | Bottom-up syntactic analysis, Abstract Syntax Tree and the Visitor Design Pattern | Ch 2.8, visitor design pattern wikipedia entry, Ch 4.5, SableCC thesis Ch. 6 | 09-AST-visitor.txt, 09-AST-visitor.ppt.pdf | Exercises 4.5.1 and 4.5.3 from book |
| 2/24/09 and 2/26/09 | Synthesized and inherited attributes, Code generation to MIPS and regression testing | Ch 5 through 5.4.3, Wikipedia regression testing entry | 10-visitor-attr-MIPS.txt, 10-visitor-attr-MIPS.ppt.pdf, 11-MIPS-regress.txt, DotVisitor.java, DotVisitorV2.java, DotVisitorV3.java | Exercises 5.1.1, 5.2.2, 5.3.1 from book |
| 3/3/09 | Assignment statements, l-values and r-values, symbol table intro | Ch 2.7, 2.8.3 | 12-assign-n-print.txt | In the C statement *(p->q) = *x + y; identify all the l-values and r-values. |
| 3/10/09 | Review | | 13-midterm-review.txt | |
| March 12, in class | Midterm | Prepare by studying sample exercises in assigned reading, do sample exercises in posted class notes and schedule, do examples we went over in class, do exercises in sample midterm questions, and create a ONE-sided 8.5x11 cheat sheet. | midterm-2007.pdf, midterm-2008.pdf, NOTE: LR parse tables and semantic analysis will NOT be on the 2009 midterm. MIPS code generation for the evaluation of expressions, assignment statements, and printlns WILL be. | |
| March 16 through 20 | Spring Break | | | |
| March 23 through 27 | Control-flow, boolean expression, semantic analysis | Ch 6.6 for 3/24, | 14-IR-control-flow.ppt.pdf, 14-control-flow-bool-expr.txt | Exercise 6.6.2, 6.6.6, and draw and annotate parse trees using the semantic rules in 6.6.5. |
| March 30 through April 2 | Symbol tables and semantic analysis | Ch 2.7, 2.8.3, 6.5 for 3/31, 4/2 canceled due to blizzard | 15-semantic-analysis.txt, 15-symtab-semantic.ppt.pdf, 14b-control-flow-bool-expr.txt | Using the rules in Figure 2.38 to translate the following: { int x; { int x; { int x; x; } x; } x; }. |
| April 7 through April 9 | Functions, function calls, and nested procedures | Patt calling convention, Ch 6.9, 7.1, 7.2, 7.3 through 7.3.6 | 16-functions.txt, 16-functions.ppt.pdf, 17-nested-scope.txt, 17-nested-scope.ppt.pdf | 7.2.3a, 7.2.3b, 7.2.4, 7.3.1 |
| April 14 and 16 | LR Parsing | Ch. 4.5 through 4.7.4 | AmbiguousGrammarExamples.tar, 18-LR-table-build.txt, 18-LR-table-build.ppt.pdf | Exercise 4.7.2. Create the LR(0) parse table if possible. If not create LR(1) parse table. |
| April 21 and 23 | Arrays and classes | Ch. 6.3, 6.4.3, 6.4.4, 7.4 | 20-arrays-n-classes.txt, 20-arrays-n-classes.ppt.pdf, 21-arrays.txt | Exercise 6.4.3 |
| April 28 and 30 | Other language features | 2D Array Layout in C++, Arrays of Arrays in Java | 22-other-language-features.txt | Exercise 6.4.5; Describe how symbol table construction, type checking, and code generation could be extended to implement inheritance in MiniJava. |
| May 5 and 7 | x86 code generation and review | | 23-x86-backend.txt, 23-x86-backend.ppt.pdf | See slides. |
| May 13, 9:10-11:10 am | Final Exam | | 2007 Final, 2008 Final | | |