Project #2: Modifying the Impcore Interpreter

Submit: Turn in your impcore source directory using the turnin command on morbius.mscsnet.mu.edu or one of the other Systems Lab machines.

Work is to be completed individually. Be certain to include your name in one of the main files. You may submit multiple times, but only the last turnin will be kept.

Include a comment block at the very top of one of the files that you modify containing the following:

  ; COSC 3410 - Project 1
  ; Explain briefly the functionality of the program.
  ; @author [your name]
  ; Instructor [your instructor]
  ; TA-BOT:MAILTO [your email address]

You may begin with the impcore source included in the textbook tarball from either the bare or commented directory -- we do not care which you begin with, but be certain to turn in the one you modified.

Source code for the base interpreters is available on the Systems Lab machines at ~brylow/cosc3410/Projects/build-prove-compare-student-code.tgz. The code for this base-level Impcore interpreter is in subdirectory build-prove-compare-student-code/bare/impcore. Run the make command in that directory to build the interpreter. It can then be executed with ./impcore.

A pre-built Impcore binary is also available at ~brylow/cosc3410/Projects/impcore.

Add Local Variables

Chapter 1.10.12, exercise 30. Add provisions for function definitions to declare new, local variables.

Add a New Primitive

Chapter 1.10.13, exercise 33. Add a read primitive for reading integers from the command line in your programs.

Add New Concrete Syntax

Chapter 1.10.13, exercise 34. Add constructs to Impcore for do-while, while*, for-loops, conditional AND (&&) and conditional OR (||).


[back]

[Revised 2023 Sep 06 11:58 DWB]