Contents
1 | Specification | 2 |
2 | Submissions | 2 |
3 | Plagiarism | 3 |
4 | Change Log | 3 |
Assignment 4version 1.0
After completing this assignment, you will be able to
- explain the mechanism of some structures in a programming language.
- use Scala to implement a code generation phase for a stack-based machine like JVM.
- create a complete compiler for JVM.
1 Specification
In this assignment, you are required to write a code generation checker for a program written in MP. The code generation will generate Jasmin code from AST created from assignment 2. The Jasmin code then is transfered to Java bytecode which must be run correctly in a Java Virtual Machine (JVM). To complete this assignment, you need to:
- read carefully the specification of MP language
- Download assignment4.zip and unzip it.
- Modify main/mc/codegen/py and main/mc/codegen/Emitter.py to implement this assignment.
- Modify test/py to create 100 testcases to test your code.
For regular and OISP students, there is a limitation on testcases: no array type, so theydont need to care how to generate code for array. For gifted students, there is no limitation.
2 Submissions
The operating system when cheking your submission is Linux.
- The deadline will be announced on the class website.
- You must submit three files: py, Emitter.py and CodeGenSuite.py.
3 Plagiarism
- You must complete the assignment by yourself and do not let your work seen by someone else.
- You just submit your code in your allocated account. If you violate any requirement, you will be punished by the university rule for plagiarism.
4 Change Log
Reviews
There are no reviews yet.