SimpleGT is a minimal graph transformation language. SimpleGT is built on top of the Eclipse Modeling Framework (EMF), EMFText, and SimpleOCL, and is intended as a proof-of-concept transformation language for the EMF Transformation Virtual Machine (EMFTVM).
Below you can find an example of SimpleGT code:
module graphDeleteN1Inplace debug;
metamodel Graph : 'platform:/resource/TTC2011/metamodels/graph.ecore';
transform g : Graph;
abstract rule N1 {
from n1 : Graph!Node (name =~ 'n1')
to n1 : Graph!Node (name =~ 'n1')
}
rule DeleteIncidentEdge extends N1 {
from e : Graph!Edge (trg =~ n1),
n1 : Graph!Node (name =~ 'n1')
to n1 : Graph!Node (name =~ 'n1')
}
rule DeleteN1 extends N1 {
from n1 : Graph!Node (name =~ 'n1')
}
This code transforms a model "g" that conform to the "Graph" metamodel. It first deletes all incoming edges to all nodes named "n1", and then deletes all nodes named "n1". For detailed examples, clone the TTC 2011 Hello World Eclipse project from Github:
git clone https://github.com/dwagelaar/TTC2011
Some more background on the included transformations can be found in the TTC 2011 hello world assignment and the README.txt file included in the above Eclipse project folder.
Update: SimpleGT now also supports unique rules. Unique rules only match once against each distinct input pattern, preventing infinite applications of the same rule to the same pattern. (16/02/2012)
SimpleGT/EMFTVM performance is quite good compared to other graph transformation tools. Here you can find an (informal) performance comparison based on Gergely Varró's STS benchmark.
To download and install the SimpleGT Eclipse plugin, install it from the Eclipse update site:
or https://raw.githubusercontent.com/dwagelaar/simplegt/master/org.eclipselabs.simplegt.updatesite/
EMFTVM includes a separate launch configuration dialog that looks very much like ATL's launch configuration dialog. It can be found via "Run -> Run Configurations...".
- Dennis Wagelaar, Massimo Tisi, Jordi Cabot, Frédéric Jouault. Towards a general composition semantics for rule-based model transformation. ACM/IEEE 14th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2011).