Starting from:

$30

CS220 HW8 - Solved

 Virtual Machine I 

 

 

Requirements: 

Build the Virtual Machine Translator (Part I), in Java, per the instructions and guidance covered in class.  

 

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.

 

What do you turn in? 

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

1.      The VMTranslator.java source code (documented)

2.      The Parser.java source code (documented)

3.      The CodeWriter.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)

5.      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)

6.      Create a screen shot of each test (5 total) after it completes. Following is an example of a successful test after loading BasicTest.tst:  
7.      The .java files.  The three Java files are: VMTranslator.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

 
 

 

 

 


 

 

  

  

  

More products