AssignmentsIn this course students get to implement an SVG interpreter for a small subset of SVG (scalable vector graphics) and a compiler for a subset of Java called MiniJava. All the programming in this class will be done with a partner and in Java. During the course of these significant programming assignments (PA#), we will work with many common data structures, implement algorithms, and practice the visitor design pattern. We will also learn about lexing, parsing, and semantic analysis.
Each homework assignment (HW#) will only contain a few questions with the goal of reinforcing the material covered in the reading assignments and in class. The homework questions also represent the kinds of questions that will be in the midterm and the final.
|Post Date||Assignment||Documentation||Due Date||Submission Method||Percentage of Course Grade||1/18/09||HW1||Review of regular expressions, context free grammars, and the run-time stack, Dr. Massey's lecture notes on NFA to DFA conversion, note that lambda and epsilon both indicate an empty string, Regular expressions, Deterministic finite state machines, Nondeterministic finite state machines, context-free grammar, stack frame example||1/27/09||turn in before class starts||2%|
|2/1/09||HW2||Syntax-directed translation||2/10/09||turn in before class starts||2%|
|2/2/09||PA2||MiniJava and MIPS Warmup||2/17/09||checkin||5%|
|2/19/09||HW3||Visitor design pattern: Email an example visitor that counts all of the AST node types in the ASTs you are constructing for PA3 (e.g. IntegerExp #3, etc.). Your example should be packaged in a jar file, and your email should indicate how to run the example on constant integer expressions.||2/24/09||turn in before class starts||2%|
|2/18/09||PA3||MiniJava Expression Evaluator||3/3/09||checkin||5%|
|3/3/09||PA4||MiniJava: expressions, assignments and printfs||3/10/09||checkin||5%|
|3/13/09||HW4||Control Flow: Exercises 6.6.1a and 6.6.4 in book||3/24/09||turn in before class starts||2%|
|3/26/09||HW5||PA5 test cases: with your partner, submit via email to Michelle 2 correct and 2 error test cases for PA5, submit the input files, make sure you get the expected output by running the test input files through the reference compiler||3/31/09||turn in before class starts||2%|
|3/23/09||PA5||Control flow and boolean expressions||4/7/09||checkin||5%|
|4/16/09||HW6||Parse tables: show the LR(1) state diagram and the LR(1) parse table for the grammar S -> S S + | S S * | a.||4/28/09||turn in before class starts||2%|
|4/20/09||PA7||Arrays and classes||5/4/09||checkin||5%|
|4/16/09||Extra Credit||Extend your compiler (can be done with partner) (a) to handle a language feature that MiniJava doesn't currently have or we didn't implement in class (strings, floats, file I/0 and/or standard input, inheritance), (b) to perform register allocation, or (c) to generate x86 assembly for a subset of MiniJava. The extended compiler will need to be accompanied by a 2 page writeup describing what you did. For example, if you do register allocation, you can describe the register allocation strategy you used and show how performance improves.||5/8/09||checkin||up to 5% extra|