Assignment 5: Tuples and garbage collection: the Tuple language
Overview
In this assignment, you will be extending the "Loop" language compiler from the last assignment to create the "Tuple" language. This language will add the following features:
- tuples (also known as "vectors")
- global variables
- garbage collection
Textbook coverage
This assignment is based on chapter 6 of Essentials of Compilation.
Due date
This assignment is due on Friday, November 22nd at 6 PM.
Starting code base
The starting code base is the zipfile ch6.zip
, which is posted on the
course Canvas site.
You should unzip this file in your Github repo, inside the src/
directory.
It contains partial implementations of all the code for the assignment.
Inside the ch6
directory will be the usual subdirectories:
-
The
tests/
subdirectory contains the test programs for the compiler. -
The
reference/
subdirectory contains the output from the instructor's version of the compiler. -
The
scripts/
subdirectory contains scripts for testing your code.
README
or README.md
file
Create a README
or README.md
file in your ch6
directory,
and in it, identify which person wrote which passes.
(If both partners worked on a pass, indicate that too.)
Also, if you used any late days on the assignment,
indicate how many late days you used.
New language features
The new language features are described in the textbook and the lectures, but in brief, they are:
- A
Vector
type which includes the types of all the vector elements - New forms:
vector
,vector-length
.vector-ref
,vector-set!
- global variables (used in the garbage collector)
- heap allocation and garbage collection