Assignment 2 Description
Assignment 2 Translating Virtual Machine Code
Weighting and Due Dates
Marks for this assignment contribute 10% of the overall course mark.
Marks for functionality will be awarded automatically by the web submission system.
Due dates:Milestone 11:55pm Tuesday of week 9,Final 11:55pm Friday of week 9.
Late penalties:For each part, the maximum mark awarded will be reduced by 25% per day / part day late. If your mark is greater than the maximum, it will be reduced to the maximum.
Core Body of Knowledge (CBOK) Areas:abstraction, design, hardware and software, data and information, and programming.
Project Description
In this assignment you will complete a variation of projects 7 and 8 in the nand2tetris course. In this assignment the translation program is in two separate programs. The precompiled executable program,bin/parser, will read a Hack Virtual Machine file from standard input and produce an abstract syntax treeon standard output. The executable program,translator, which you will write, will read the abstract syntax tree and output a Hack Assembly Language translation of each Virtual Machine command. The output will be in a form suitable for testing by the precompiled executable programbin/simulator.
SVN Repository
You must create a directory in your svn repository named:
Makefile this file is used bymaketo compile your programsdo not modifythis file.
Makefile-extras this file is included byMakefiledo not modifythis file.
translator.cpp C++ source file
bin this directory contains precompiled programs and scripts do not modify this directory.
lib this directory contains precompiled components do not modify this directory.
includes this directory contains.hfiles for precompiled classesdo not modify thisdirectory.
tests this directorycontains test data, you can add your own tests here
Note: if thelib/lib.afiledoesnot get added to your svn repository you will need to explicitly add it using:
% svn add lib/lib.a
Submission and Marking Scheme
This assignment has twoassignmentsin theweb submission systemnamed:Assignment 2 Milestone SubmissionsandAssignment 2 Final Submissions.The assessment is based on Assessment of Programming Assignments. A submission to either assignment in theweb submission systemwill automatically result in a submission to the other assignment.
Assignment 2 Milestone Submissions: due 11:55pm Tuesday of week9
The marks awarded by theweb submission systemfor the milestone submission contribute up to 20% of your marks for assignment 2.Yourmilestone submission mark, after the application of late penalties, will be posted to the myuni gradebook when the assignment marking is complete.
Your programs must be written in C++and will be tested using a small set of Hack Virtual Machine files. You may assume that the first command in each test will be a function command so that you will always know the correct class and function name to use when constructing labels. Although a wide range of tests may be run,marks will only be recorded for those tests that require a complete implementation of the following commands:
function
push constant
push static
pop pointer
add
sub
neg
and
or
not
Note: the simulator tests each virtual machinecommand implementation separately so the overall failure of a test could still result in a significant number of marks for those individual virtual machine command implementations that behaved correctly.
Your program will be compiled using theMakefileincluded in the zip file attached below. The only source file that will be used to compilethetranslatorprogram will be the filetranslator.cppfile. No other.cppor.hfiles should be present in your svn directory.
Assignment 2 Final Submissions: due 11:55pm Friday of week 9
The marks awarded for the final submission contribute up to 80% of your marks for assignment 2.
Yourfinal submission mark will be the geometric mean of the marks awarded by theweb submission system, a mark for your logbook and a mark for your code. It will be limited to 20% more than themarks awarded by theweb submission system. SeeAssessment Mark Calculationsfor examples of how the marks are combined. Yourfinal submission mark, after the application of late penalties, will be posted to the myuni gradebook when the assignment marking is complete.
Automatic Marking
The automatic marking will compile and test your program in exactly the same way as for the milestone submission. The difference is that marks will be recorded forallof the tests.
Logbook Marking
Important: the logbook must have entries for all work in this assignment, including your milestone submissions. See Assessment Logbook Review for details of how your logbook will be assessed.
Code Review Marking
For each of your programming assignments you are expected to submit well writtencode.See Assessment Code Review for details of how your code will be assessed.
Assignment 2 Participation Marks
Any submissions to the Final Submissions assignment made more than one week before but less than two weeks before the due date for the Final Submissions assignment, may be awarded participation marks. The participation marks will be calculated by scaling the best mark awarded by the automatic marking of an eligible submission to be a number between 0 and 10. A maximum of 10 participation marks are available.
Virtual Machine Translator
Background
This assignment requires you to write a complete implementation of thetranslatorprogram that you may have started inPart 2 of the Virtual Machine Translation workshop. It would be a good idea to revisit workshop 07 before continuing with this assignment. However, you should start again using the startup files that are in the zip files attached below, do not reuse your work from workshop 07. These startup files include a working parser and some new test files.Remember to keep your logbook up to date when working on this assignment and make svn commits when you add new logbook entries.
Note:a limitation of the internal assembler being used requires all VM labels to start with a letter or _ and be followed by any number of letters, digits or _s. A VM label may not include . or $.
Startup Files
The startup files in the attached zip file should work on most 64-bit Linux systems and on a Mac. Please see theStartup Files for Workshops and Assignmentspage for more information.
assignment-vm-translator.zip
Programming
[SOLVED] C++ Scheme assembly software Assignment 2 Description
$25
File Name: C++_Scheme_assembly_software_Assignment_2_Description.zip
File Size: 499.26 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.