Git Product home page Git Product logo

jeo-maven-plugin's Introduction

logo

Maven Central Javadoc License Hits-of-Code Lines of code codecov

jeo stands for "Java EOlang Optimizations". jeo-maven-plugin is a Maven plugin dedicated to optimizing Java bytecode. The process involves translating the Java bytecode into the EOlang programming language. Utilizing the optimization steps provided by EOlang, the original code undergoes an enhancement process. Upon completion, the optimized EOlang program is translated back to Java bytecode, achieving efficient and optimized performance.

How to use

The plugin can be run using several approaches but for all of them you need at least Maven 3.1.+ and Java 8+. The plugin can convert compiled classes into EOlang by using the disassemble goal. The assemble goal can convert EOlang back into bytecode. The default phase for the plugin is process-classes. If you are a developer of optimizations in EOlang you probably need to use the both goals in the following order:

  • disassemble create EOlang files in the target/generated-sources directory.
  • Provide your optimizations are applied to the EOlang files in the target/generated-sources directory.
  • assemble scans the target/generated-sources directory for EOlang files and converts them back to Java bytecode.

More details about plugin usage you can find in our Maven site.

Invoke the plugin from the command line

You can run the plugin directly from the command line using the following commands:

mvn jeo:disassemble

or

mvn jeo:assemble

Invoke the plugin from the Maven lifecycle

You can run the plugin from the Maven lifecycle by adding the following configuration to your pom.xml file:

<build>
  <plugins>
    <plugin>
      <groupId>org.eolang</groupId>
      <artifactId>jeo-maven-plugin</artifactId>
      <version>0.5.4</version>
      <executions>
        <execution>
          <id>bytecode-to-eo</id>
          <phase>process-classes</phase>
          <goals>
            <goal>disassemble</goal>
          </goals>
        </execution>
        <execution>
          <id>eo-to-bytecode</id>
          <phase>process-classes</phase>
          <goals>
            <goal>assemble</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

Disable bytecode verification

Each time the plugin converts EO back to bytecode, it verifies it. If the verification fails, the build also fails. You can disable this verification by setting the skipVerification parameter to true:

<configuration>
  <skipVerification>true</skipVerification>
</configuration>

At times, it might be beneficial to generate intentionally flawed bytecode.

Transformation method

The plugin can transform Java bytecode into EO and back. Usually, the plugin transforms each bytecode class file into a separate EO file, maintaining a one-to-one relationship. If the Java class has name Foo.class, the EO file will have Foo.eo (and Foo.xmir for the XMIR representation of the EO file).

Classes

The first high-level transformation is the conversion of the bytecode class into <program> and <objects><o name='Classname'/></objects> XMIR elements. For example, consider the following Java class:

public class Foo {
}

It will be transformed into the following EO:

[] > j$Foo
  33 > access
  "java/lang/Object" > supername
  * > interfaces

access(class access modifiers like public, static, final and others), supername (parent class), and interfaces (tuple of implemented interfaces) are attributes of the class element that retain the information necessary for the reverse transformation.

The j$* prefix is employed to prevent name conflicts with EO keywords. This same prefix is utilized for all EO elements generated from Java bytecode.

By the way, the XMIR representation of that EO file will be:

<program>
  <objects>
    <o name="j$Foo">
      <attribute name="access" value="33"/>
      <attribute name="supername" value="java/lang/Object"/>
      <attribute name="interfaces" value="*"/>
    </o>
  </objects>
</program>

Methods

The second high-level transformation involves converting the bytecode method into EO. For example, consider the following Java method:

public class Bar {
    public void foo() {
        return;
    }
}

It will be transformed into the following EO:

[] > j$Bar
  33 > access
  "java/lang/Object" > supername
  * > interfaces
  [] > j$foo
    1 > access
    "()V" > descriptor
    * > exceptions
    seq > @
      tuple
        opcode > RETURN-1
          177

Each method is a child of the class element and contains bytecode attributes such as access (access modifiers), descriptor (method descriptor), and exceptions (a tuple of declared exceptions). Additionally, it includes the seq element containing the sequence of bytecode instructions.

It's worth mentioning that Java constructors are also treated as methods with the name new. For instance, consider the following Java constructor:

public class Bar {
    public Bar() {
    }
}

It will be transformed into the following EO:

[] > j$Bar
  33 > access
  "java/lang/Object" > supername
  * > interfaces
  [] > new
    1 > access
    "()V" > descriptor
    * > exceptions
    seq > @
      tuple
        // list of instructions

Instructions

Each method and constructor contains a sequence of instructions, with each instruction represented by either a opcode or a label. For example, consider the following Java method:

public class Bar {
    public int foo(int x) {
        if (x < 0) {
            return 1;
        }
        return 2;
    }
}

It will have the following set of instructions after compilation (as shown by javap -v Bar output):

0: iload_1
1: ifle          6
4: iconst_1
5: ireturn
6: iconst_2
7: ireturn

After the transformation provided by jeo, the content of the foo method in EO will look like:

seq > @
  tuple
    label
      "67b715c8-7d74-413a-9bba-f6920c8ba68b"
    opcode > ILOAD-E
       21
       1
    opcode > IFLE-F
      158
      label
        "c361c429-6c81-4b11-9b97-0cbb6e96a2f9"
    opcode > ICONST_1-10
      4
    opcode > IRETURN-11
      172
    label
      "c361c429-6c81-4b11-9b97-0cbb6e96a2f9"
    opcode > ICONST_2-12
      5
    opcode > IRETURN-13
      172
    label
      "8f341f7f-e357-4a78-b604-bcaae28e3c1f"

Opcode

From the example above (refer to the Methods section), you can observe that each opcode is represented by the opcode object. Each opcode object includes a name, a numerical argument, and optional operand arguments. For instance, the iload opcode has the following EO representation

opcode > ILOAD-E
  21
  1

Here, ILOAD-E is the opcode's name, 21 is its number according to the Java specification, and 1 represents the opcode argument, indicating the 'local variable with index 1' in this context.

ILOAD-E is simply a name assigned to an opcode object. Since it serves a descriptive purpose and isn't relied upon during transformations, you have flexibility to modify these names as needed when making changes to the original jeo output (as jeo doesn't utilize them during parsing.)

Also, it's worth mentioning that an opcode might not have operand arguments, as is the case with the IRETURN opcode:

opcode > IRETURN-11
  172

Alternatively, the opcode argument might be a label object, as seen in the IFLE instruction:

opcode > IFLE-F
  158
  label
    "c361c429-6c81-4b11-9b97-0cbb6e96a2f9"

In this instance, the IFLE opcode has precisely one operand, which is a label.

Labels

Labels serve as markers or references indicating specific points in the code:

  1. They might mark the entry- and exit-points of a method for debugging purposes.
  2. They provide jump points in the code, such as for if and for statements. The example of using labels is in conjunction with the goto instruction:
opcode > GOTO-1
  167
  label "dbe5a680-4814-4b19-a8e6-15c3c2db3a83"
opcode > ALOAD-2 // skiped by goto
  25             // skiped by goto
  1              // skiped by goto
label "dbe5a680-4814-4b19-a8e6-15c3c2db3a83"
opcode > RETURN-3
  177
  1. Labels can also be used for exception handling.

Of course, this isn't an exhaustive list of label usages.

What is more important, many labels are as crucial as opcodes themselves, and if subsequent transformations lose these labels, the logic of the program might be compromised. Therefore, it is extremely important to preserve most of the labels. However, it's worth noting that you can omit certain labels used solely for debugging purposes when generating your own classes. For instance, you can omit labels at the start and end of a method.

How to Build the Plugin

To build the plugin from the source code, you need to clone the repository and run the following command:

$ mvn clean install -Pqulice,long

Pay attention to the qulice profile, which activates the static analysis tools. The long profile is optional and runs the full test suite, including long-running integration tests.

How to Contribute

Fork repository, make changes, then send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

You will need Maven 3.3+ and Java 8+ installed.

jeo-maven-plugin's People

Contributors

h1alexbel avatar renovate[bot] avatar rultor avatar volodya-lombrozo avatar yegor256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jeo-maven-plugin's Issues

Integration test for the entire optimization pipeline

The pipeline should be the next:

  1. Create simple java program (aka "Hello World")
  2. Compile this program and get required class files
  3. Start optimization mojo
  4. Check that we have: 1) xmir representation of our bytecode 2) The class file of the program was changed after optimisation (modification time changed)
  5. Run the program and see "Hello World" in the console.

Implement first deep transformation for `MethodByte.class`

We have to provide the first bytecode transformation from bytecode into eo and back.

Here is java code:

public class MethodByte {
	public static void main(String[] args) {
		System.out.println(method());
		System.out.println("passed");
	}
	static byte method() {
		return 52;
	}
}

see MethodByte.java for more info.

And the eo code which we have to receive:

# 2022-07-18T16:12:48.858039327
# j2eo team
+alias stdlib.lang.class__System
+alias stdlib.lang.class__Object
+alias stdlib.lang.class__String
+alias stdlib.primitives.prim__byte

[] > class__MethodByte
  class__Object > super
  super > @
  [] > new
    class__Object.new > super
    super > @
    "class__MethodByte" > className
    1 > address
    [this] > init
      seq > @
        TRUE
  # main :: String[] -> void
  [args] > main
    seq > @
      statementExpression_1
      statementExpression_2
    [] > statementExpression_1
      class__System.out.println > @
        class__System.out
        methodInvocation_1
    [] > methodInvocation_1
      this.method > @
        this
    [] > statementExpression_2
      class__System.out.println > @
        class__System.out
        literal_1
    [] > literal_1
      class__String.constructor_2 > @
        class__String.new
        "passed"
  # method :: null -> byte
  [] > method
    seq > @
      return_1
    [] > return_1
      literal_2 > @
    [] > literal_2
      prim__int.constructor_2 > @
        prim__int.new
        52
  # null :: null -> void
  [this] > constructor
    seq > @
      initialization
      statementExpression_3
      this
    [] > initialization
      this.init > @
        this
    [] > statementExpression_3
      this.super.constructor > @
        this.super

[args...] > main
  class__MethodByte.main > @
    *

see MethodByte.eo for more info.

You can find all the rest information in j2eo repository. Moreover, it's better to follow the same folders structure for resources as inside j2eo.

BytecodeTranspilation.java:39-44: Duplicate between...

The puzzle 58-22f3306e from #58 has to be resolved:

* @todo #58:30min Duplicate between BytecodeTranspilation and Optimization.
* Both classes do the same thing, but in different ways. We need to
* refactor them to use the same approach. When it's done, remove this
* puzzle. Classes:
* - {@link org.eolang.jeo.representation.BytecodeTranspilation}
* - {@link org.eolang.jeo.Optimization}

The puzzle was created by @volodya-lombrozo on 08-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

JavaSourceClass.java:63-68: Compile Java class...

The puzzle 81-8b72dde1 from #81 has to be resolved:

* @todo #81:30min Compile Java class dynamically.
* Currently, we don't compile Java classes dynamically.
* Instead, we pass the source code directly.
* This is a temporary solution. We need to compile the Java class
* dynamically and pass the bytecode to the test.
* When this is done, remove that puzzle from this method.

The puzzle was created by @volodya-lombrozo on 20-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/codecov.yaml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/setup-java v4
  • actions/cache v4
  • codecov/codecov-action v4
  • ubuntu 22.04
.github/workflows/maven.test.yaml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • actions/upload-artifact v4
.github/workflows/pdd.yml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/site.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • JamesIves/github-pages-deploy-action v4.6.3
  • JamesIves/github-pages-deploy-action v4.6.3
  • ubuntu 22.04
.github/workflows/up.yaml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • peter-evans/create-pull-request v6
  • ubuntu 22.04
.github/workflows/xcop.yaml
  • actions/checkout v4
  • g4s8/xcop-action v1.3
  • ubuntu 22.04
maven
pom.xml
  • com.jcabi:parent 0.68.0
  • org.ow2.asm:asm 9.7
  • org.ow2.asm:asm-util 9.7
  • com.jcabi.incubator:xembly 0.31.1
  • com.jcabi:jcabi-xml 0.29.0
  • org.cactoos:cactoos 0.55.0
  • org.apache.maven:maven-plugin-api 4.0.0-alpha-7
  • org.apache.maven:maven-model 3.9.8
  • org.apache.maven:maven-core 3.9.8
  • org.apache.maven.plugin-tools:maven-plugin-annotations 3.13.1
  • org.slf4j:slf4j-api 2.0.15
  • ch.qos.logback:logback-classic 1.3.14
  • com.jcabi:jcabi-log 0.24.1
  • org.eolang:eo-parser 0.39.0
  • com.github.volodya-lombrozo:jsmith 0.0.3
  • com.yegor256:jhome 0.0.5
  • org.eolang:jucs 0.2.0
  • com.github.volodya-lombrozo:jtcop-maven-plugin 1.2.4
  • org.jacoco:jacoco-maven-plugin 0.8.12
src/it/annotations/pom.xml
  • org.eolang:eo-maven-plugin 0.39.0
  • org.codehaus.mojo:exec-maven-plugin 3.4.0
src/it/bytecode-to-eo/pom.xml
  • org.eolang:eo-maven-plugin 0.39.0
src/it/custom-transformations/pom.xml
  • org.eolang:eo-maven-plugin 0.39.0
  • org.codehaus.mojo:exec-maven-plugin 3.4.0
src/it/eo-to-bytecode/pom.xml
src/it/exceptions/pom.xml
  • org.codehaus.mojo:exec-maven-plugin 3.4.0
  • org.eolang:eo-maven-plugin 0.39.0
src/it/fails-if-bytecode-broken/pom.xml
src/it/generics/pom.xml
  • org.eolang:eo-maven-plugin 0.39.0
  • org.codehaus.mojo:exec-maven-plugin 3.4.0
src/it/spring-fat/pom.xml
  • org.springframework.boot:spring-boot-starter-parent 2.7.18
  • org.apache.maven.plugins:maven-dependency-plugin 3.7.1
  • org.codehaus.mojo:exec-maven-plugin 3.4.0
src/it/spring/pom.xml
  • org.springframework.boot:spring-boot-starter-parent 2.7.18
  • org.eolang:eo-maven-plugin 0.39.0
src/it/takes/pom.xml
  • org.takes:takes 1.24.4
  • org.takes:takes 1.24.4
  • org.eolang:eo-maven-plugin 0.39.0
  • org.codehaus.mojo:exec-maven-plugin 3.4.0

  • Check this box to trigger a request for Renovate to run again on this repository

BytecodeIr.java:57-62: Implement BytecodeIR#name()...

The puzzle 39-7b75a943 from #39 has to be resolved:

* @todo #39:90min Implement BytecodeIR#name() method.
* The method should return the name of the object from Bytecode.
* We have to parse the Bytecode and extract the name from it.
* Moreover we have to add package name to the name of the object.
* Remove this puzzle when the method is ready.
* Don't forget about unit tests.

The puzzle was created by @volodya-lombrozo on 05-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

OpcodeName.java:37-40: Add unit test for OpcodeName...

The puzzle 84-cf19e1fa from #84 has to be resolved:

* @todo #84:30min Add unit test for OpcodeName class.
* The unit test should check that the name of opcode is correct.
* The name should be the same as in {@link Opcodes} class.
* When the unit test is ready remove that puzzle.

The puzzle was created by @volodya-lombrozo on 25-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Implement mojo that will convert byecode to eo only

We have to implement mojo that will convert bytecode into eo objects (as XMIR) only, without back transpiration. This mojo has to be configurable - we have to be able to choose maven phase for it. Don't forget about integration tests.

ClassDirectives.java:49-51: Add unit test for...

The puzzle 89-64690a11 from #89 has to be resolved:

* @todo #89:30min Add unit test for ClassDirectives class.
* The unit test should check that the directives are correct.
* When the unit test is ready remove that puzzle.

The puzzle was created by @volodya-lombrozo on 26-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Base64Bytecode.java:34-37: Add unit test for...

The puzzle 37-d70d7958 from #37 has to be resolved:

* @todo #37:90min Add unit test for Base64Bytecode class.
* The test should check all the methods of the {@link Base64Bytecode} class.
* Don't forget to test corner cases.
* When the test is ready, remove this puzzle.

The puzzle was created by @volodya-lombrozo on 07-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

MethodDirectives.java:39-41: Add unit test for...

The puzzle 89-853f7b63 from #89 has to be resolved:

* @todo #89:30min Add unit test for MethodDirectives class.
* The unit test should check that the directives are correct.
* When the unit test is ready remove that puzzle.

The puzzle was created by @volodya-lombrozo on 26-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BytecodeIR.java:33-38: Implement BytecodeIR class. The...

The puzzle 13-f243b827 from #13 has to be resolved:

* @todo #13:90min Implement BytecodeIR class.
* The class should implement IR interface and represent a class file.
* It should be able to read the class file and provide access to its bytecode.
* Also we have to define methods which we need from IR to provide future optimizations.
* When the class is ready, just remove that puzzle.
* Also remove SuppressWarnings annotation from the class.

The puzzle was created by @volodya-lombrozo on 08-Aug-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

ClassDirectivesTest.java:40-47: Simplify bytecode...

The puzzle 95-2982f9a5 from #95 has to be resolved:

* @todo #95:30min Simplify bytecode generation for tests.
* Right now we use ASM to generate bytecode for tests, which is not very
* convenient. We should simplify it by using some kind of programmable API or DSL
* to generate bytecode. For example, we can create several utility classes and use them in:
* - {@link ClassDirectivesTest}
* - {@link ClassNameTest}
* And others.
* When we have this, we can remove that puzzle.

The puzzle was created by @volodya-lombrozo on 26-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Add first integration test

It's important to add an integration test that will check that plugin works without exceptions and doesn't crash the entire build

ClassName.java:34-36: Add unit test for ClassName class....

The puzzle 89-31c1cca1 from #89 has to be resolved:

* @todo #89:30min Add unit test for ClassName class.
* The unit test should check that the class name is correct.
* When the unit test is ready remove that puzzle.

The puzzle was created by @volodya-lombrozo on 26-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

verify.groovy:30-32: Implement XMIR generation. XMIR...

The puzzle 34-e7563e1a from #34 has to be resolved:

* @todo #34:90min Implement XMIR generation.
* XMIR generation is not implemented yet, so we can't check it.
* Invert the followed assertion when XMIR generation will be implemented.

The puzzle was created by @volodya-lombrozo on 01-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

verify.groovy:37-41: Implement class recompilation. Class...

The puzzle 34-0fcf80b9 from #34 has to be resolved:

* @todo #34:90min Implement class recompilation.
* Class recompilation is not implemented yet, so we can't check it.
* Invert the followed assertion when class recompilation will be implemented.
* Under recompilation we mean that class file should be compiled from
* XMIR object file.

The puzzle was created by @volodya-lombrozo on 01-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Add CI pipelines

We have to add CI pipelines to check that the plugin build is stable before merging results

JavaToEoTest.java:45-49: Enable the test in JavaToEoTest....

The puzzle 81-9d03e679 from #81 has to be resolved:

* @todo #81:30min Enable the test in JavaToEoTest.
* The test is disabled because we didn't implemented correct transpilation of the Java code
* to EO code. When it is done, the test should be enabled and should pass.
* The test should check that the Java code is transpiled to EO code correctly.
* Remove that puzzle when the test is enabled.

The puzzle was created by @volodya-lombrozo on 20-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

XmirFootprintTest.java:39-43: Replace anonymous class...

The puzzle 36-0277a001 from #36 has to be resolved:

* @todo #36:90min Replace anonymous class with a Fake class.
* We need to replace anonymous class in savesXml test method with a Fake class.
* For example, we can create a Fake class that implements IR interface and
* returns a fake XMLDocument in toEO method and an empty byte array in toBytecode method.
* Then we can use this Fake class in the test method and in other tests too.

The puzzle was created by @volodya-lombrozo on 01-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

XmirIR.java:39-42: Add unit test for XmirIR class. The...

The puzzle 39-489011e4 from #39 has to be resolved:

* @todo #39:90min Add unit test for XmirIR class.
* The test should check all the methods of the {@link org.eolang.jeo.XmirIR} class.
* Don't forget to test corner cases.
* When the test is ready, remove this puzzle.

The puzzle was created by @volodya-lombrozo on 05-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BytecodeRepresentation.java:130-133: Handle method...

The puzzle 84-f9b12b5b from #84 has to be resolved:

* @todo #84:30min Handle method parameters.
* Right now we just skip method parameters. We should handle them in order to
* build correct XML representation of the class. When the method is ready
* remove that puzzle.

The puzzle was created by @volodya-lombrozo on 25-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

JavaToEoTest.java:45-49: Enable the {@link JavaToEoTest}...

The puzzle 84-5d71dbb7 from #84 has to be resolved:

* @todo #84:90min Enable the {@link JavaToEoTest} test.
* The test should be enabled when the translation format is ready and
* the transformation itself from bytecode to EO is implemented correctly.
* We have to agree on the transformation rules first.
* When the test is enabled remove the {@link Disabled} annotation.

The puzzle was created by @volodya-lombrozo on 25-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Add codecov support

We have to add codecov support to see what is the current code coverage of the project. Don't forget to add a badge to README.md

JeoMojo.java:45-50: Implement the optimization skeleton....

The puzzle 9-82e8ae6f from #9 has to be resolved:

* @todo #9:90min Implement the optimization skeleton.
* The optimization skeleton should be implemented without details. Just a sketch.
* The skeleton should contain the next steps:
* - Transpile all bytecode files to the eolang files (XMIR I guess).
* - Invoke some XMIR optimizations (dummy for now).
* - Transpile all XMIR files back to the bytecode.

The puzzle was created by @volodya-lombrozo on 01-Aug-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BytecodeToEoMojo.java:41-43: Add documentation to the...

The puzzle 58-ba6648ef from #58 has to be resolved:

* @todo #58:30min Add documentation to the README.md about the new mojo.
* The documentation should explain how to use the {@link BytecodeToEoMojo}.
* When the documentation is ready, remove this puzzle.

The puzzle was created by @volodya-lombrozo on 08-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

pom.xml:205-209: Enable qulice check. Currently, qulice...

The puzzle 26-d69b9f82 from #26 has to be resolved:

jeo-maven-plugin/pom.xml

Lines 205 to 209 in 08a22e3

@todo #26:90min Enable qulice check.
Currently, qulice check is disabled because it throws
IllegalArgumentException. This is a bug in qulice which
should be fixed. When it is fixed, enable qulice check.
Do not forget to remove this puzzle.

The puzzle was created by @volodya-lombrozo on 17-Aug-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

OptimizationTest.java:42-49: Add unit tests for...

The puzzle 24-de0dc79c from #24 has to be resolved:

* @todo #24:90min Add unit tests for Optimization class.
* We still have to add the next unit tests:
* - The classes directory is empty.
* - The classes directory does not exist.
* - The classes directory has some clases.
* - The classes directory has some classes and some subdirectories.
* - The classes directory has some classes and some garbage.
* When the unit tests are ready, remove that puzzle.

The puzzle was created by @volodya-lombrozo on 04-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BoostLogged.java:33-37: Add unit tests for BoostLogged...

The puzzle 13-0aa69d09 from #13 has to be resolved:

* @todo #13:30min Add unit tests for BoostLogged class.
* The unit tests should cover the next cases:
* - The BoostLogged class should log all IRs passed to it.
* - The BoostLogged class should return the same IRs as it gets.
* When the unit tests are ready, remove that puzzle.

The puzzle was created by @volodya-lombrozo on 08-Aug-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

XmirFootprint.java:63-69: Hardcoded XMIR path. The XMIR...

The puzzle 36-95c85bf8 from #36 has to be resolved:

* @todo #36:90min Hardcoded XMIR path.
* The XMIR path is hardcoded in the tryToSave method.
* It should be flexible and related to the Java class name.
* For example, if the class is org.eolang.jeo.Dummy,
* the XMIR path should be org/eolang/jeo/Dummy.xmir.
* if the class is org.eolang.jeo.Fake, the XMIR path should be
* org/eolang/jeo/Fake.xmir and so on.

The puzzle was created by @volodya-lombrozo on 01-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

JeoMojo.java:35-38: Add logging for the plugin entry...

The puzzle 5-a230f91c from #5 has to be resolved:

* @todo #5:30min Add logging for the plugin entry point.
* The plugin should log the entry point of the plugin. Maybe it should log the
* list of already compiled classes. When it will be done, remove that
* puzzle.

The puzzle was created by @rultor on 31-Jul-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BytecodeRepresentation.java:56-60: Refactor...

The puzzle 84-a72b83d1 from #84 has to be resolved:

* @todo #84:90min Refactor BytecodeRepresentation class.
* The class is too big and it's hard to understand what it does. It's better to split it
* into smaller classes. The class should be refactored in order to be more readable.
* Maybe it makes sense to move all ASM visitors into a separate package.
* When the class is refactored remove that puzzle.

The puzzle was created by @volodya-lombrozo on 25-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

EoObjects.java:41-46: Add unit tests for EoObjects class....

The puzzle 59-191d54bd from #59 has to be resolved:

* @todo #59:30min Add unit tests for EoObjects class.
* The unit tests should cover the next cases:
* - The EoObjects class should read all XML files from the folder.
* - The EoObjects class should return empty list if folder is empty.
* - The EoObjects class should throw IllegalStateException if folder doesn't exist.
* When the unit tests are ready, remove that puzzle.

The puzzle was created by @volodya-lombrozo on 15-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BytecodeIr.java:48-53: Continue implementing BytecodeIR...

The puzzle 26-78d4854d from #26 has to be resolved:

* @todo #26:90min Continue implementing BytecodeIR class.
* The class should implement IR interface and represent a class file.
* It should be able to read the class file and provide access to its bytecode.
* We have to provide the simplest implementation of the next chain:
* bytecode -> XMIR -> bytecode
* Input and output bytecode should be the same.

The puzzle was created by @volodya-lombrozo on 17-Aug-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

XmirIR.java:43-48: Implement XmirIR#name() method. The...

The puzzle 39-f2735a13 from #39 has to be resolved:

* @todo #39:90min Implement XmirIR#name() method.
* The method should return the name of the object from XMIR.
* We have to parse the XML and extract the name from it.
* You can find examples for XMIR in the EOlang repository:
* https://github.com/objectionary/eo
* When the method is ready, remove this puzzle.

The puzzle was created by @volodya-lombrozo on 05-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

XmirRepresentation.java:34-37: Add unit test for XmirIR...

The puzzle 39-251d3c77 from #39 has to be resolved:

* @todo #39:90min Add unit test for XmirIR class.
* The test should check all the methods of the {@link XmirRepresentation} class.
* Don't forget to test corner cases.
* When the test is ready, remove this puzzle.

The puzzle was created by @volodya-lombrozo on 08-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Optimization.java:47-50: Implement back transformation to...

The puzzle 13-89551792 from #13 has to be resolved:

* @todo #13:90min Implement back transformation to bytecode.
* The Optimization class should transform the IRs back to bytecode.
* When the back transformation is ready, remove that puzzle.
* Don't forget to add unit tests for the back transformation.

The puzzle was created by @volodya-lombrozo on 08-Aug-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

EoRepresentation.java:34-37: Add unit test for XmirIR...

The puzzle 39-301062e5 from #39 has to be resolved:

* @todo #39:90min Add unit test for XmirIR class.
* The test should check all the methods of the {@link EoRepresentation} class.
* Don't forget to test corner cases.
* When the test is ready, remove this puzzle.

The puzzle was created by @volodya-lombrozo on 18-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

BytecodeRepresentation.java:126-129: Handle constructors...

The puzzle 84-d01d9bbd from #84 has to be resolved:

* @todo #84:30min Handle constructors in classes.
* Right now we just skip constructors. We should handle them in order to
* build correct XML representation of the class. When the method is ready
* remove that puzzle.

The puzzle was created by @volodya-lombrozo on 25-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Xmir.java:41-44: Rename Xmir to EO. The name Xmir is...

The puzzle 69-23f13d0a from #69 has to be resolved:

* @todo #69:30min Rename Xmir to EO.
* The name Xmir is confusing. It's not clear what it means in this context.
* Actually XMIR and EO interchangeably mean the same thing. So, we have to rename
* Xmir to EO. When the renaming is done, remove this puzzle.

The puzzle was created by @volodya-lombrozo on 18-Sep-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Simple optimisation

Right now, we are faced with the problem of determining which bytecode instructions and structures need to be implemented and how. Therefore, we decided to pursue a simple optimization to understand the minimal transformation required to achieve this optimization.

The first possible optimization is illustrated in the following figure:
IMAGE 2023-09-26 17:57:19

We need to implement that optimisation.

Optimization.java:39-46: Add unit tests for Optimization...

The puzzle 13-934f8528 from #13 has to be resolved:

* @todo #13:90min Add unit tests for Optimization class.
* The unit tests should cover the next cases:
* - The classes directory is empty.
* - The classes directory does not exist.
* - The classes directory has some clases.
* - The classes directory has some classes and some subdirectories.
* - The classes directory has some classes and some garbage.
* When the unit tests are ready, remove that puzzle.

The puzzle was created by @volodya-lombrozo on 08-Aug-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

EoToBytecodeMojo.java:43-46: Duplication between...

The puzzle 59-dce6d56f from #59 has to be resolved:

* @todo #59:90min Duplication between EoToBytecode and Optimization.
* Both classes have the same code. We have to extract the common code to the separate class.
* The class should be able to convert EO to bytecode and save result to the target folder.
* When it is done, remove that puzzle.

The puzzle was created by @volodya-lombrozo on 15-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

pom.xml:204-209: Enable dependency check. The qulice...

The puzzle 30-80741899 from #30 has to be resolved:

jeo-maven-plugin/pom.xml

Lines 204 to 209 in e5deb67

@todo #30:30min Enable dependency check.
The qulice library has an issue related to dependency check.
You can find more details here:
- https://github.com/yegor256/qulice/issues/1145
When this issue is fixed, we should enable dependency check.
Don't forget to remove the exclude below and this puzzle.

The puzzle was created by @volodya-lombrozo on 18-Aug-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

XmirIr.java:39-42: Add unit test for XmirIR class. The...

The puzzle 39-113bccbb from #39 has to be resolved:

* @todo #39:90min Add unit test for XmirIR class.
* The test should check all the methods of the {@link XmirIr} class.
* Don't forget to test corner cases.
* When the test is ready, remove this puzzle.

The puzzle was created by @volodya-lombrozo on 06-Sep-23.

Estimate: 90 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

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.