[SOLVED] CS220 - HW8

35.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

 Virtual Machine I

 

 

Requirements:

Build the Virtual Machine Translator (Part I), in Java.

 

Grading method:

As usual with programming assignments, we look for elegance, clarity, reasonable documentation, and neatness.

 

Follow the instructions in lecture as far the classes and methods to build, as well as allowing command-line arguments as instructed.  Document each method (description, precondition, postcondition) and add author information on each file.  Provide an algorithm for your main method that drives the Virtual Machine translation process.

 

Create one Word document (or PDF) with the following in order:

  1. The java source code (documented)
  2. The java source code (documented)
  3. The java source code (documented)
  4. Run your VMTranslator.java code on the 5 provided .vm files (e.g.

BasicTest.vm, PointerTest.vm, StaticTest.vm, SimpleAdd.vm and StackTest.vm).  This will produce 5 corresponding assembly files (e.g. the same names with file extension .asm)

  1. Open the CPU Emulator and load each of the 5 test scripts (e.g.

BasicTest.tst, PointerTest.tst, StaticTest.tst, SimpleAdd.tst and StackTest.tst)

  1. Create a screen shot of each test (5 total) after it completes. Following is an example of a successful test after loading BasicTest.tst:

 

 

 

  1. The .java files. The three Java files are: java, Parser.java, and CodeWriter.java.   Please reuse the start of the main method from Assembler.java to accept command line/Scanner input to ask for the .vm file to translate.

 

 

 

VM Part I Working?
Working?                      /       60

 

Well built?                      /       30

 

Subtotal                      /       90

 

Documentation / 100

 

 

 

 

 

Below is a UML Diagram depicting the high-level details of the VM Translator software:

 

 

 

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.