- Convert project to Stack project
- Step through program
- Inspect variable values
- Inspect History of variable
- Step Backwards through program
- Static Analysis to detect unused variables
- Bonus: Interactively execute arbitrary statements at any stage.
-
The file column is the statements that have been executed, and the statement that is next to be executed.
-
The variables column is the current environment.
-
The output column is the accumulated output for the program so far.
Build the stack project:
stack build
The program can be executed by passing in the path to the file as the first argument.
Run the interpreter with the input file test.input:
stack exec interpreter-exe tests/test.input
To test the static analysis for detecting unused variables, just use the failingtest.input file:
stack exec interpreter-exe tests/failingtest.input
next
: Execute the next statementback
: Step back and undo the last statement:<variablename>
: Input a variable's name to view it's history|<Statement>
: Execute a statement at the current point of the program. E.g|Print (Const (I 10))