JAVA COMPILERS & ARCHITECTURE TASK
£20-250 GBP
货到付款
I have got a Java Compiler task that requires someone with excellent JAVA compiling skills.
PLEASE DO NOT APPLY IF YOU DO NOT QUALIFY - YOU WILL JUST WASTE TIME YOU AND I DONT HAVE.
ARE YOU FAMILIAR WITH AST, RISC-V AND CODEGEN EXCEPTION ETC?
THE PROJECT REVOLVES AROUND THESE TERMS
SOME DETAILS ABOUT THE PROJECT ARE AS FOLLOWS:
Your task is to implement, in Java, code generators. As source language we take subsets of (a minor variant of) the simple language that we generated code for
As usual, the language is represented by ASTs. The target language is RISC-V machine code.
Background:
It might be interesting to see the language you will have to compile in it's conventional (non-AST) form. Here it is as a context free grammar.
PROG → DEC | DEC; PROG
DEC → def ID (VARDEC) = E
VARDEC → ε | VARDECNE
VARDECNE → ID | VARDECNE, ID
ID → ... (identifiers)
INT → ... (Integers)
E → INT
| ID
| if E COMP E then E else E endif
| (E BINOP E)
| (E)
| skip
| (E; E)
| while E COMP E do E endwhile
| repeat E until E COMP E endrepeat
| ID := E
| ID(ARGS)
| break
| continue
ARGS → ε | ARGSNE
ARGSNE → E | ARGSNE, E
COMP → == | < | > | <= | >=
BINOP → + | - | * | /
The ASTs for this language can be found here (and in the Zip file / Github above). Do note change these definitions at all! (except by adding new methods). If you change them in a way that my test suite will not compile, you will get 0 points.
An important difference from the pseudo-code used in the lectures is that in declarations we use numbers as variables (instead of strings). Variable 1 refers to the first (leftmost) variable in the declaration, variable 2 to the second from the left and so on. For example the procedure
Notes on the implementations. It is your task to implement the code generators in Java. You will have to use the following interface and exception to implement the code generators.
class CodegenException extends Exception {
public String msg;
public CodegenException ( String _msg ) { msg = _msg; } }
interface Codegen {
public String codegen ( Program p ) throws CodegenException; }
The RISC-V code to be produced is returned by all these methods as a string. Don't print out the generated code. Just return it as a string.
You can download these here (and in the Zip file / Github above). Do note change these definitions at all! If you change them, my test suite will not compile and you will get 0 points. I will instantiate your code generators with the following classes, one for each task.
class Task1 {
public static Codegen create () throws CodegenException { ... } }
class Task2 {
public static Codegen create () throws CodegenException { ... } }
class Task3 {
public static Codegen create () throws CodegenException { ... } }
******************************************************************
THE FULL REQUIREMENTS WILL BE PROVIDED AFTER WE HAVE AN INTERVIEW
THANKS
项目ID: #22653785
关于项目
有4名威客正在参与此工作的竞标,均价£155/小时
Hi. thanks for your posting. I'm very happy to have a chance of bidding your project. I have experience in the development of projects like yours If you hire me, I'll do my best for your project and finish greatly in a 更多
Greetings. I am an expert in software architecture. I have rich experiences in machine learning, AI, image processing ,openCV and google apis and extensions. I have many experiences in programming languages such as c 更多
hello i read all instruction please share more detail i did similar task i will provide 5 star rating work thanks
Hi, I am very interested to your project and ready to start right now. I have read your project requirement carefully. I have 10 years plus experience in web developing, I can meet your requirement Give me one chance t 更多