GithubHelp home page GithubHelp logo

schlexl / compiler Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 923 KB

funktionsfähiger Compiler in Java mit Hilfe von AntLR für eine kleine, vorgegebene Programmiersprache.

Kotlin 0.45% ANTLR 0.66% Java 93.70% Jasmin 5.19%

compiler's Introduction

Frame work tested with OpenJDK11 + gradle 5.2.1

Group14

Benjamin B.    ()   
Alexander W. ()   



Description of the Program:
---------------------------
- So far the program is capable to detect lexical- and syntactical errors as well as typchecking errors.


-------------------
Remarks for task 1:
-------------------
General remarks:
----------------
- Implemented Task 1, with still some issues at OperatorDotTest, AccessTest, UndeclaredTest.

Changes  made:
--------------
- completed the lexer rules in the grammer file. (Jova.g4) As well as the definition of missing parser rules.
- completed the warmeup Task in LexicalAndSyntaxAnalyzer.java.
- edited Typechecker to raise found errors of TypeCheckerVisitor
- created TypCheckerVisitor to check for Typechecking errors.
- edited Test cases in TypeCheckerPublicTest

Known limitations:
------------------
- According to the private TC our programm is still not capable of handling:
      - "." accesses (like members or chain method invocation) properly.
      - handling the access attributes correct (this is most probably somehow connected to the limitation mentioned above).
      - handling undeclared identifiers correctly.

Implemented BONUS tasks:
------------------------
- ...


-------------------
Remarks for task 2:
-------------------
General remarks:
----------------
Implemented Task 2 with obviously still some issues within the code generation, which we were not able to find. Probably
that issues are side effects of the known limitations from task 1.

Changes  made:
--------------
- Implemented code generation task.
- added CodeGeneratorVisitor which actually generates the jasmin code
- implemented various jasmin instructions as Java classes.
- implemented private testsuite

Known limitations:
------------------
- As already stated in the general remarks section, we do not pass all private testcases to 100% on GitLab but
this is probably due to some side effects of the not fixed issues of task 1 (probably not only, but to some degree this
assumption should be valid).

Implemented BONUS tasks:
------------------------
...

Percentage of participation:
----------------------------
Benjamin B.       50%
Alexander W.    50%


-------------------
Remarks for task 3:
-------------------
General remarks:
----------------
Implemented Task 3 according to the assignment sheet. CodeOpt is able to reduce the instructions of all arithmetic
programs (no conditional jumps...)  to a single LDC or to none, depending on print statements.

Changes  made:
--------------
- Implemented calculate Liveness And Next Next Use.
- Implemented Constant Propagation.
- Implemented Constant Folding.
- Implemented Swap Removal.
- Implemented Dead Code Removal.
- Implemented remove Return.
- implemented private testsuite

Known limitations:
------------------
Optimization is only made to work for "simple Programs" (see assignments sheets).
Will not optimize programms with division 0 or modulo 0;




Implemented BONUS tasks:
------------------------
...

Percentage of participation:
----------------------------
Benjamin B.       50%
Alexander W.    50%


compiler's People

Contributors

schlexl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.