blob: 2344657b6b50ee1d93c4a829664bdea48c3178db [file] [log] [blame]
import SimpleGraph : 'SimpleGraph.ecore'::simplegraph;
import SimpleGraph2Graph : 'SimpleGraph2Graph.ecore'::simplegraph2graph;
transformation CopyGraphMinimal {
check upperGraph imports SimpleGraph;
enforce lowerGraph imports SimpleGraph;
middle imports SimpleGraph2Graph;
}
map graph2graphLM in CopyGraphMinimal {
guard:upperGraph g1:Graph;
new:middle g2g:Graph2Graph;
set g2g.graph1 := g1;
set g2g.name := g1.name;
call graph2graphMR {
g2gout uses g2g;
}
}
map graph2graphMR in CopyGraphMinimal {
in:middle g2gout:Graph2Graph;
new:lowerGraph g2:Graph;
set g2gout.graph2 := g2;
set g2.name := g2gout.name;
}
map __root__ in CopyGraphMinimal {
for g1 : SimpleGraph::Graph in SimpleGraph::Graph.allInstances() {
call graph2graphLM {
g1 iterates g1;
}
}
}