Milestone 4, csc431, Fall 2019
1 Goal
2 Plan
3 Test cases
4 Testing Plan
7.5.0.16

Milestone 4, csc431, Fall 2019

1 Goal

Extend Milestone 1 to support the R2 language, including booleans, conditionals, and type-checking.

2 Plan

Here’s how I’d go about it:

Before you begin, please please make sure you have a single-command way to run all of your tests, and automatically check the results of those tests. You don’t want to get any ugly last-minute surprises.

First, I’d generate some examples, including some large ones. Consider using a random generation function to create some large examples.

Next, I’d write the type checker. Use the examples that you’ve generated in order to check the type checker. If you’re feeling ambitious, you might want to update your random generator to generate only well-typed terms.

Third, I’d implement the first part of the toolchain, including remove-complex-opera*. Make sure that the result is still a valid program, and produces the same result in your interpreter.

Next, I’d implement explicate-control. If you want to lock this down, implement a simple interpreter for the C1 language, and make sure that your programs are producing the right values.

For register allocation, you’ll need to generalize to operate on multiple blocks of code. We don’t have loops, so you don’t need to iteratively revisit blocks; one pass should do.

Um... and then the rest!

3 Test cases

Here’s a compressed bundle of test files.

4 Testing Plan

For the purposes of evaluation, we’re breaking down the functionality into five separate "tiers". Each one is worth a fraction of the overall points for correctness, as follows:

  1. (10 pts) Milestone 2 code

  2. (4 pts) Register Allocation

  3. (2 pts) Type checking

  4. (2 pts) Booleans & Boolean expressions

  5. (2 pts) Conditionals