A prototype for optimisation of transformation chains built on-the-top of Epsilon Transformation Language.
-
Download the latest version of Eclipse and select the Eclipse IDE for Eclipse Committers option when prompted during the installation process.
-
Clone the Git repository: git://git.eclipse.org/gitroot/epsilon/org.eclipse.epsilon.git (master branch).
-
Import all the projects under the plugins, features, and tests folders in your workspace.
-
Clone the static analysis git repository: https://github.com/epsilonlabs/static-analysis.git (master branch)
-
Import all the projects in your workspace.
-
Open releng/org.eclipse.epsilon.target/org.eclipse.epsilon.target.target and click the Set as Active Target Platform link on the top right
-
Clone this repository master branch and import all plugins in your workspace.
-
Right-click on org.eclipse.epsilon.chain.selection/src/org.eclipse.epsilon.chain.selection/Chain_MT.java in the Project Explorer and select Run as → Java Application.
For Extracting Dependency Graph:
-
EtlDependencyGraphGenerator generates a dependency graph by adding information such as traceableBy, needTraceOf to the data field of each transformation rule.
-
For understanding which statement need to be removed, we need to keep hold of the line numbers which are responsible for each dependency, that information is present in a HashMap called as lineNumber.
For example,
- rule Node2TraceLink
- transform n:Graph!Node
- to t:SimpleTrace!TraceLink {
- }
- rule Edge2TraceLink
- transform e:Graph!Edge
- to s:SimpleTrace!TraceLink {
- s.sources=e.source.equivalent();
- }
rule Edge2Tracelink's data field would be like this: needTraceOf = Node2TraceLink, traceableBy= {}
linNumber would contain
Edge2TraceLink, Node2TraceLink. 9 <- indicates the lineNumber
For Chain Execution Run \src\org\eclipse\epsilon\etl\chain\optimisation\EtlChainOptimiser.java and press 0
For Chain Identification Run \src\org\eclipse\epsilon\etl\chain\optimisation\EtlChainOptimiser.java and press 11
For running chain optimization code
-
Run \src\org\eclipse\epsilon\etl\chain\optimisation\EtlChainOptimiser.java and press 5 to run the findTransformationRuleIndex() function in order to get the optimized version of ETL files.
-
We can then run the normal and optimized version of the file by re-running Run \src\org\eclipse\epsilon\etl\chain\optimisation\EtlChainOptimiser.java and choosing case no. 101 and 102 respectively.