https://github.com/objectionary/ineo-maven-plugin
Maven plugin that inlines and specializes objects in EO programs
https://github.com/objectionary/ineo-maven-plugin
eolang java maven-plugin optimization
Last synced: 8 months ago
JSON representation
Maven plugin that inlines and specializes objects in EO programs
- Host: GitHub
- URL: https://github.com/objectionary/ineo-maven-plugin
- Owner: objectionary
- License: mit
- Created: 2023-10-24T08:59:28.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T18:51:53.000Z (about 1 year ago)
- Last Synced: 2024-10-24T04:49:29.158Z (about 1 year ago)
- Topics: eolang, java, maven-plugin, optimization
- Language: Java
- Homepage: http://www.objectionary.com/ineo-maven-plugin/
- Size: 682 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

[](https://www.elegantobjects.org)
[](http://www.rultor.com/p/objectionary/eo)
[](https://www.jetbrains.com/idea/)
[](https://maven-badges.herokuapp.com/maven-central/org.eolang/ineo-maven-plugin)
[](http://www.javadoc.io/doc/org.eolang/ineo-maven-plugin)
[](LICENSE.txt)
[](https://hitsofcode.com/github/objectionary/ineo-maven-plugin/view?branch=master&label=Hits-of-Code)

[](https://codecov.io/gh/objectionary/ineo-maven-plugin)
**INEO** (stands for EO Inliner) is the tool to inline EO objects in order to get a faster and
lighter EO code.
# How to use
To run the plugin you need at least Maven 3.1.+ and Java 8+.
The plugin provides two optimizations:
### FUSE
The optimization scans the directory and checks if there's any`.xmir` file where the next code occurs:
```xml
```
The plugin adds new fused `BA.xmir` file into the directory and replaces the `xmir` above with the
next one:
```xml
```
### STATICIZE
The optimization scans the directory and checks if there's any`.xmir` file where the next code occurs:
```xml
```
The plugin adds new staticized `StaticizedA.xmir` file into the directory and replaces the `xmir` above with the
next one:
```xml
```
Meantime `StaticizedA` will use static method instead of instance one.
Objects `A` and `B` must be from the same package and have the same prefix.
### FACTORIALIZE
The optimization scans the directory and
1. replaces `org/eolang/benchmark/Main.xmir` with [this Main.xmir](https://github.com/objectionary/ineo-maven-plugin/blob/master/src/main/resources/org/eolang/ineo/factorialize/Main.xmir)
2. puts [`Factorialized.xmir`](https://github.com/objectionary/ineo-maven-plugin/blob/master/src/main/resources/org/eolang/ineo/factorialize/Factorialized.xmir) near `Main.xmir`
[Here](https://github.com/objectionary/benchmark) you may find a working example that uses the
plugin with other optimization tools, like [JEO](https://github.com/objectionary/jeo-maven-plugin)
and [OPEO](https://github.com/objectionary/opeo-maven-plugin)
## 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:
```xml
org.eolang
ineo-maven-plugin
0.2.0
fuse
generate-sources
fuse
staticize
generate-sources
fuse
factorialize
generate-sources
factorialize
SOURCES DIRECTORY
OUTPUT DIRECTORY
PATH TO Main.xmir
PATH TO Factorial.xmir
```
More details about plugin usage you can find in our
[Maven site](https://objectionary.github.io/ineo-maven-plugin).
## How to Contribute
Fork repository, make changes, then send us
a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).
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:
```bash
$ mvn clean install -Pqulice
```
You will need [Maven 3.3+](https://maven.apache.org) and Java 8+ installed.