Final Projects and Reports
You will submit your compiler and report through Moodle, as for homeworks.
The report should have between 4 and 10 pages (depending on your formatting). You can use any software to typeset it, including Latex, OpenOffice, or a standard ASCII editor, but submit the result should either as a PDF file or pure ASCII.
For an example student report, see project reports for software analysis and verification 2007.
The report should have the following structure, resembling a technical report or a research paper.
Pick a title that mentions the phrase such as “implementation of a compiler”.
Describe in a 5-10 sentences that you wrote a compiler and highlight those aspects of your compiler that you find most interesting (e.g. “Our compiler performs performs data-flow analysis to prove certain assertions and folding of double negations during parsing.”).
Describe why compilers are useful and why what you did is (or is not) meaningful.
Pick an example small program and show how it is compiled. If the output or input is too large, show only one part of it. If there is any interesting feature of your compiler or anything you are proud of, pick an example that illustrates this.
List the phases of the compiler and the high-level structure of your source code.
(For Each Compiler Phase)
For each phase (lexical analysis, parsing, type checking, code generation, analysis, …), include a section describing it.
If you directly follow something from a textbook or lecture notes, simply cite that source (including the page number in book or lecture number), you do not need to describe it. If it was not entirely obvious how to go from the source to what you did, then explain what you did.
Focus on more difficult parts and make the straightforward sections short.
If the phase describes something that you came up with yourself, then describe this.
For the type checking phase, describe the type rules.
For data-flow analysis phase, document how you were thinking about the problem and explain why your implementation work or should work (or how it could work if, for some reason, you did not manage to finish it).
Make a table that lists names of at least 10 benchmarks (tests), preferably larger and more interesting ones. For each benchmark, show its length in lines of code, list the compilation time, and the running time of the benchmark. Describe the version of Scala and Java that you used to run the compiler and the benchmarks, as well as the basic properties of the machine on which you ran the benchmarks.
Limitations and Future Work
Describe any limitations of your current implementation and suggests how they could be overcome.
If there is any additional source of work that you are aware of and that helped you write the compiler, describe it here.
Summarize your experience in building a compiler
Put all references in this section. Each reference should have (if appropriate) an author, title, conference name or publisher, and publication year.