This is a translator of Java programming language to EOLANG programming language.
- 
Make sure you have installed: - Java 16+ (make sure command java -versionshows 16+ version of Java in terminal if you have multiple Java version installed)
- Maven 3.8+ (be aware of possible conflicts of the latest versions of Maven and Java on some OSs)
 
- Java 16+ (make sure command 
- 
Clone the repo into your folder: HTTPS: git clone https://github.com/polystat/j2eo.git cd ./j2eoor SSH: git clone [email protected]:polystat/j2eo.git cd ./j2eo 
- 
Build the project: ./build.sh The testing report is generated in the ./j2eo/build/reports/tests/test/index.htmlfile.
- 
After build process, j2eo.jar file will appear in the project root folder ( ./j2eo). With this file, is it possible to translate .java files or packages to .eo packages. Run:java -jar j2eo.jar <source .java file or directory with Java files> -o <output directory> to get the translation. For example, java -jar j2eo.jar src/test/resources/SimpleTest.java -o output_eo or java -jar j2eo.jar src/test/resources/polystat_tests/test1 -o output_eo 
This project is a part of Polystat project, the goal of which is to statically analyze different languages using EOLANG, the implementation of phi-calculus. In order to do that, the first step is to convert source language into EO. This particular repository contains translator from Java to EO.
Q: Why do we implement yet another Java parser?
A: Publicly available parsers only support older versions of Java, while we aim to support the latest version ( currently 16). Thus, we had to create our own parser.
Q: Why do we implement EO AST?
A: Working with AST instead of raw strings allows utilization of Java compiler's type checking to minimize amount of bugs in our code. It is also much easier to work with abstraction layer than with strings.
- First, the Java source code files are parsed recursively.
- Then, for each file, translator converts Java AST to EO AST.
- Then, EO AST is printed out as a source code to output directory in the same directory structure.
- Type Erasure - Zouev
- Subtyping - discuss with Yegor
- Conversions - remove
- Casting - remove
- Modules
- Exceptions - remove
- Asserts - remove
- Throws - remove
- synchronizedblocks
- try/- catchblocks - remove
- yeildfeature
- Threads and Locks
- Generics (all kinds of them) - remove
- Native methods
- break and continue statements - remove
- RTTI (instanceof operator) ?????? - remove
In general, we cover 91 feature of 112 described in the Java language specification.