Skip to content

Intred enables hand-written code preservation that is independent of both the modelling language and the target implementation language.

License

Notifications You must be signed in to change notification settings

epsilonlabs/intred

Repository files navigation

Intrinsic Redundancy in Model-to-Text Transformation

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.

How to Run

  • 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 assign Alice to the Implementation 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 new Implementation row but also retains the hand-written <h2>Alice is awesome</h2> line

Running the Benchmarks

  • 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
  • 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

Benchmarks for the Paper

  • Run the regularEglTransformationBenchmark and the intredTransformationBenchmark 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

About

Intred enables hand-written code preservation that is independent of both the modelling language and the target implementation language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages