Demonstration of using intrinsic redundancy to support the integration and preservation of hand-written content within generated files. The approach requires that generated files are only extended with new lines of content (i.e. existing lines are neither modified nor deleted). The prototype has been implemented on top of the EGL model-to-text transformation language.
- Clone this repository
- Download and install Java 17
- Download and install Maven
- Run
mvn compile exec:java
from the command line - Open the generated
gen/Alice.html
file - Add a hand-written
<p>Alice is an experienced systems analyst.</p>
line to it as follows
<h1>Alice's Tasks</h1>
<p>Alice is an experienced systems analyst.</p>
<ul>
<li>Analysis</li>
<li>Design</li>
</ul>
<!--PGgxPkFsaWNlJ3MgVGFza3M8L2gxPg==--PHVsPg==-CTxsaT5BbmFseXNpczwvbGk+-CTxsaT5EZXNpZ248L2xpPg==-PC91bD4=---->```
- Edit
acme.flexmi
to assignAlice
to theImplementation
task as follows
<?nsuri psl?>
<project title="ACME">
<person name="Alice"/>
<person name="Bob"/>
<task title="Analysis" start="1" dur="3">
<effort person="Alice"/>
</task>
<task title="Design" start="4" dur="6">
<effort person="Alice"/>
<effort person="Bob"/>
</task>
<task title="Implementation" start="7" dur="3">
<effort person="Bob" perc="50"/>
<effort person="Alice" perc="50"/>
</task>
</project>
- Re-run the generator using
mvn compile exec:java
- Observe how
gen/Alice.html
now contains a newImplementation
row but also retains the hand-written<h2>Alice is awesome</h2>
line
- Go to the root folder of the repository
- Run
mvn clean package
to build the project - Run
java -jar target/intred.jar -rf json
to run the benchmarks and produce a JSON file with the results- The produced JSON file can be visualised in https://jmh.morethan.io
- To run each benchmark just once (e.g. to get a quick estimate of its execution time), use the following command
java -jar target/intred.jar -rf json -f 1 -wi 0 -i 1
- To run a specific benchmark just once, use the following command
java -jar target/intred.jar 'intred.benchmarks.IntredBenchmarks.intredTransformationWithChangesBenchmark' -rf json -f 1 -wi 0 -i 1
- Run the
regularEglTransformationBenchmark
and theintredTransformationBenchmark
together
java -jar target/intred.jar 'intred.benchmarks.IntredBenchmarks.intredTransformationBenchmark' 'intred.benchmarks.IntredBenchmarks.regularEglTransformationBenchmark' -rf json -f 2 -wi 3
- Run the
intredTransformationWithChangesBenchmark
on its own
java -jar target/intred.jar 'intred.benchmarks.IntredBenchmarks.intredTransformationWithChangesBenchmark' -rf json -f 2 -wi 3