DDR is an Experimental Dynamic Dispatch Removal Toolkit for EO Programs
Just add this to your pom.xml
<dependency>
<groupId>org.eolang</groupId>
<artifactId>ddr</artifactId>
<version>0.0.5</version>
</dependency>
And then you'll be able to use the tool like this:
CombinerKt.launch("${PATH_TO_YOUR_DIRECTORY}");
You can launch the tool from IntelliJ Idea using MainKt configuration.
Just click Edit configuration in the 'Edit run/debug configurations' dialog and
type an absolute path to your input directory with .xmir files in the Program arguments field.
After the execution a new directory named ${YOUR_DIRECTORY_NAME}_ddr will be created near your directory.
Use these commands to launch the tool from console
$ mvn clean install
$ java -jar target/ddr-1.0-SNAPSHOT-jar-with-dependencies.jar "${PATH_TO_YOUR_DIRECTORY}"
-
Add your directory with
.eosource files tosrc/test/resources/integration/in. Note that directory name must be written in snake case. -
Add your directory with desired output
.eofiles tosrc/test/resources/integration/out. Note that.eofiles in the output directory must use dot notation like shown below:
[] > greet
QQ
.io
.stdout > @
"Hello, world!"
- Add a test to ResolverTest.
Your test name must be identical to your added directory name with
_symbols replaced with spaces and a wordtestinserted in the beginning. Example: Directory name:basic_exampleTest:
@Test
fun `test basic example`() = doTest()
If your tests don't pass - you can take a look at temporary files in src/test/resources/integration/eo_outputs directory.
It should be more convenient for you, because you will have all your actual .eo files located there.
That's it :)