Assignment 7: Garter:   Design Your Own Language Extension
1 Part I:   Written Specification
2 Part II:   Implementation

Assignment 7: Garter: Design Your Own Language Extension

Part I Due: Fri 12/02 at 11:59pm, Part II Due: 12/14 at 11:59pm

NOTE: This final, 2-part assignment, must be completed with a partner. We are releasing it early so that you have ample time to find a partner if you don’t already have one. If you have not found a partner by class time on Monday, November 21, e-mail the professor Max New and he will pair you with someone else who does not have a partner.

Thus far in the class we have provided you with a specification for a new language feature or analysis and you have implemented it according to the provided specification. For this final project you will take over, and both design the language extension and implement it. The assignment is broken up into two parts: first you will submit a written document specifying the syntax, semantics and an outline for how to implement a new language feature. Then you will extend the compiler end-to-end to support your new feature and implement tests to demonstrate your new language in action.

Here are a couple of recommended features for you to choose from that should be feasible and that the professor and GSI/IAs will be most prepared to help with. We will be providing additional background resources on these topics on Piazza to help you with your design.

If you would like to choose a different language feature to implement, e-mail the professor to confirm that it is sufficient and feasible. Whatever language feature you choose it should involve an extension to the parser and a non-trivial extension to the remainder of the compiler.

You may choose to base your extension off of either your diamondback or egg-eater compiler, or something in between such as diamondback with arrays added but not closures. You do not need to perform register allocation for your final compiler.

1 Part I: Written Specification

For part 1 you will submit a 3-5 page technical specification for your chosen language extension in pdf format.

This document should address the first four steps of our language extension recipe we’ve seen throughout the course:

  1. Its impact on the concrete syntax of the language

  2. Examples using the new enhancements, so we build intuition

  3. Its impact on the abstract syntax and semantics of the language

  4. Any new or changed transformations needed to process the new forms

  5. Executable tests to confirm the enhancement works as intended

The last part, executable tests will be a part of part 2.

You will be graded on

  1. Whether you thoroughly cover all 4 of the topics above

  2. The logic of your design

  3. The clarity of your writing

We will grade the written assignments quickly so as to quickly alert you to any design flaws we find and help you to correct them.

2 Part II: Implementation

For the final submission you will implement your proposed language feature and submit the following for grading:

  1. The repository with your compiler implementation

  2. A collection of executable tests to demonstrate that your extended compiler works as intended

  3. A short pdf document detailing any changes from your submitted Part I design, if any

This should be in the following format:

You will be graded on