The goal of this project is to add state and assignment to your Project 3 interpreter.
In this exercise you will add state to your interpreter from Project 3. To do this you will add the operations presented in class for allocating, setting, and dereferencing locations plus the function for sequencing execution:
new FBAE |
set FBAE FBAE |
deref FBAE |
FBAE ; FBAE |
You will also need to add a new value for locations and type for locations. Note that we did not discuss typing locations in class, but it is not difficult to add.
In this exercise you will add assignment to your interpreter from Exercise 1. To do this you will add the operations presented in class for declaring variables and making assignments:
var FBAE |
string := FBAE
Give that this is a bonus question and intended to be challenging, you will need to extend types and signatures for the type checker and interpreter yourself. You can get quite a bit of your code from class notes or the text. Note that no additional type checking is required for this project.