CS 5363: TL09 Compiler Project, Compiler Extensions

Deadline: 6:45pm, Thursday, December 3, 2009

TL09 and Compiler Extensions

In the previous phase of the project you have completed a non-optimizing compiler for the core TL09 language that can produce semantically equivalent MIPS assembly code. In this phase, you have the opportunity to earn up to 200 additional points towards an 'A' by extending your compiler to support additional language features and/or add additional optimizations.

This phase is intentionally less tightly specified and more open ended than those of Phase I and Core. Below is a list of possible extensions and the amount of points that can be earned by successfully completing each extensions. Please include, in the extensions/README file, the list of extensions attempted, their status, information on how to enable/disable the extension (if possible), and a list of relevant items included extensions/docs directory.

Extensions

Language Extensions

Create a revised language description (including lexical categories, context-free grammar, informal type rules, and informal semantics---as appropriate) containing one or more of the following optimizations. Implement the features so that the compiler in the "extensions" folder can correctly compile the revised language. Create a test plan describing how the language extensions will be tested, what test cases will be used, and what the result of the testing is.

Optimizations and Compiler Extensions

Below is a list of several transformations and optimizations that can be implemented in your compiler project for additional credit. In addition to implementing the code, you should provide a description of the algorithm used (with citations if appropriate), and a description of the testing done (including test inputs and outputs checked).

Testing Combinations of Extensions

If you implement more than one extension. Develop a plan, test cases, and documentation of test results (as appropriate) that provide confidence that compiler still works correctly when extensions are combined. (20 points per extension, beyond the first one, covered by the test plan)

Input/Output Specification

The compiler should produce the same outputs as required for Core project. In addition, for each machine independent optimization pass, there should be (an) additional output(s) showing the state of the relevant IR's before and after each optimization (e.g., the ILOC/CFG output from core and an ILOC dump--perhaps using the same output routine---after translating into SSA and then another after translating back out of SSA).

Grading Criteria

For each extension, students will earn the points listed above according to the following rubric:

The points listed above add up to more than 200 points. Students may attempt up to 300 points worth of extensions but only up to 200 points may be earned.

No points will be awarded for any extensions unless the core compiler works correctly. The core compiler will be considered to work correctly if it...

Submission Mechanics and Packaging

Please refer to the the submission instructions for information on how to prepare the subversion repository containing your source code for grading. The files for this phase of the project should be placed in the extensions. This means that the version of the compiler in the core directory must still faithfully implement the unextended core TL09 language. The extensions/README file should contain a list of what extensions are implemented. Detailed documentation related to extensions should be included as separate text files, OpenOffice documents, or PDF's in an extensions/docs directory.

Testing

You are also required to adequately test your compiler optimizations and language extensions. Please submit your test cases along with your source code and document the current state of your compiler based on your own testing. In your documentation for each extensions, please include a description of which test cases you developed to specifically test those extensions.

If you implement multiple optimizations, it is advisable to include a command-line switch that activates/deactivates individual optimizations when feasible. This will allow, for example, full points to be assigned for "optimization 1" even if "optimization 2" crashes for some test cases. Otherwise, you may lose points for "optimization 1" because "optimization 2" breaks a test case. Additional points are giving for having tests and a test plan that includes testing combinations of as well as individual optimization switches.

Errata/Clarifications

There may need to be corrections, clarifications, or other modifications to these instructions, you are responsible for monitoring the class web site and listening during lecture for announcements related to this assignment.