diff --git a/runtime-workspace/fr.n7.game2petrinet/ATL Transformation (game2petrinet).launch b/runtime-workspace/fr.n7.game2petrinet/ATL Transformation (game2petrinet).launch new file mode 100644 index 0000000..ad41721 --- /dev/null +++ b/runtime-workspace/fr.n7.game2petrinet/ATL Transformation (game2petrinet).launch @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/ToPrototype.java b/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/ToPrototype.java index 0dc72b2..ff38995 100644 --- a/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/ToPrototype.java +++ b/workspace/fr.n7.game.toPrototype/src/fr/n7/game/toPrototype/main/ToPrototype.java @@ -340,9 +340,6 @@ public class ToPrototype extends AbstractAcceleoGenerator { @Override public void registerPackages(ResourceSet resourceSet) { super.registerPackages(resourceSet); - if (!isInWorkspace(fr.n7.game.xtext.game.GamePackage.class)) { - resourceSet.getPackageRegistry().put(fr.n7.game.xtext.game.GamePackage.eINSTANCE.getNsURI(), fr.n7.game.xtext.game.GamePackage.eINSTANCE); - } /* * If you want to change the content of this method, do NOT forget to change the "@generated" diff --git a/workspace/fr.n7.game.toPrototype/tasks/toPrototype.xml b/workspace/fr.n7.game.toPrototype/tasks/toPrototype.xml index 88121ea..fed1f37 100644 --- a/workspace/fr.n7.game.toPrototype/tasks/toPrototype.xml +++ b/workspace/fr.n7.game.toPrototype/tasks/toPrototype.xml @@ -1,7 +1,7 @@ - + diff --git a/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin b/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin index 6d3a38e..351816d 100644 Binary files a/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin and b/workspace/fr.n7.game.xtext.tests/xtend-gen/fr/n7/game/xtext/tests/.GameParsingTest.xtendbin differ diff --git a/workspace/fr.n7.game.xtext/xtend-gen/fr/n7/game/xtext/generator/.GameGenerator.xtendbin b/workspace/fr.n7.game.xtext/xtend-gen/fr/n7/game/xtext/generator/.GameGenerator.xtendbin index a187f02..d042664 100644 Binary files a/workspace/fr.n7.game.xtext/xtend-gen/fr/n7/game/xtext/generator/.GameGenerator.xtendbin and b/workspace/fr.n7.game.xtext/xtend-gen/fr/n7/game/xtext/generator/.GameGenerator.xtendbin differ diff --git a/workspace/fr.n7.petrinet.edit/bin/.gitignore b/workspace/fr.n7.petrinet.edit/bin/.gitignore deleted file mode 100644 index 79b56a6..0000000 --- a/workspace/fr.n7.petrinet.edit/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/petrinet/ diff --git a/workspace/fr.n7.petrinet.editor/bin/.gitignore b/workspace/fr.n7.petrinet.editor/bin/.gitignore deleted file mode 100644 index 79b56a6..0000000 --- a/workspace/fr.n7.petrinet.editor/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/petrinet/ diff --git a/workspace/fr.n7.petrinet.tests/bin/.gitignore b/workspace/fr.n7.petrinet.tests/bin/.gitignore deleted file mode 100644 index 79b56a6..0000000 --- a/workspace/fr.n7.petrinet.tests/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/petrinet/ diff --git a/workspace/fr.n7.petrinet.toTINA/bin/.gitignore b/workspace/fr.n7.petrinet.toTINA/bin/.gitignore deleted file mode 100644 index 44fde90..0000000 --- a/workspace/fr.n7.petrinet.toTINA/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/fr/ diff --git a/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.emtl b/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.emtl new file mode 100644 index 0000000..5050566 --- /dev/null +++ b/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.emtl @@ -0,0 +1,1181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + + diff --git a/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.mtl b/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.mtl new file mode 100755 index 0000000..601544f --- /dev/null +++ b/workspace/fr.n7.petrinet.toTINA/bin/fr/n7/petrinet/toTINA/main/toTINA.mtl @@ -0,0 +1,44 @@ +[comment encoding = UTF-8 /] +[module toTINA('http://petrinet')] + +[template public networkToTINA(aNetwork : Network)] +[comment @main/] +[file (aNetwork.name + '.net', false, 'UTF-8')] +net [aNetwork.name/] +[let places : OrderedSet(Place) = aNetwork.getPlaces() ] + [if (places->size() > 0)] + [for (place : Place | places)] +pl [place.name/] ([place.tokens/]) + [/for] + [else] + [/if] +[/let] +[let transitions : OrderedSet(Transition) = aNetwork.getTransitions() ] + [if (transitions->size() > 0)] + [for (transition : Transition | transitions)] +[transition.afficher()/] + [/for] + [else] + [/if] +[/let] +[/file] +[/template] + +[query public getPlaces(n: Network) : OrderedSet(Place) = + n.nodes + ->select( e | e.oclIsTypeOf(Place) ) + ->collect( e | e.oclAsType(Place) ) + ->asOrderedSet() +/] + +[query public getTransitions(n: Network) : OrderedSet(Transition) = + n.nodes + ->select( e | e.oclIsTypeOf(Transition) ) + ->collect( e | e.oclAsType(Transition) ) + ->asOrderedSet() +/] + +[template public afficher(t : Transition) post (trim()) ] +[comment][let outgoing = t.getArcs()->select( e | e.isOutgoing() ) /][/comment] +tr [t.name/] [for (a : Arc | t.arcs)][if (not a.outgoing)][a.place.name/]*[a.weight/] [/if][/for]-> [for (a : Arc | t.arcs)][if (a.outgoing)][a.place.name/]*[a.weight/] [/if][/for] +[/template] \ No newline at end of file diff --git a/workspace/fr.n7.petrinet/bin/.gitignore b/workspace/fr.n7.petrinet/bin/.gitignore deleted file mode 100644 index 79b56a6..0000000 --- a/workspace/fr.n7.petrinet/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/petrinet/