CIS-3030 Homework #6: VuPP Virtual Machine

Due: Wednesday, April 17, 2019

Read Chapters 8, 9, 15, and 16 in PiS2. This material covers pattern matching, function values, higher order functions, and related topics.

For this assignment you will work on a virtual machine implementation for the VuPP processor. This year you will implement enough of the Simulator.singleStep method so that it can simulate the execution of a simple sample program set up in the main method. See the VuPP project for more information.

  1. Install (if necessary) Git, for example from here. See my page on using Git for information on how to use the command line tool to clone a repository. Close the VuPP repository (link above) to some suitable place on your system.
  2. Install the community version of IntelliJ on your system. Be sure to select the Scala plug-in during the installation.
  3. Using IntelliJ do an "import" of the SBT project in VM/Scala in the VuPP repository. Be sure you can use SBT, for example from inside IntelliJ, to build the project as it currently exists. You are now ready to write the code for this assignment.
  4. The idea is to implement the singleStep method in the Simulator object enough so that the VM can correctly simulate the simple VuPP program defined in the main method (in VM.scala) This entails implementing support for the copy, dec, and jnz instructions. This will also require implementing the getSourceOperand and putDestinationOperand helper methods. Write your code in a purely functional way: no vars, no (while) loops, and using recursion or library methods as appropriate.

Last Revised: 2019-03-20
© Copyright 2019 by Peter C. Chapin <pchapin@vtc.edu>