From bce83ec64552e19fe7617d2b5b0e3b5eef36d2b5 Mon Sep 17 00:00:00 2001 From: Guillotin Damien Date: Fri, 10 Dec 2021 15:31:43 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20atl=20qui=20avance=20a=20en=20arri?= =?UTF-8?q?=C3=A8re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime-workspace/fr.n7.game2petrinet/Game2PetriNet.atl | 6 ++++++ runtime-workspace/fr.n7.petrinet.examples/src-gen/jeu.net | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/runtime-workspace/fr.n7.game2petrinet/Game2PetriNet.atl b/runtime-workspace/fr.n7.game2petrinet/Game2PetriNet.atl index c5da6cc..9137744 100755 --- a/runtime-workspace/fr.n7.game2petrinet/Game2PetriNet.atl +++ b/runtime-workspace/fr.n7.game2petrinet/Game2PetriNet.atl @@ -144,6 +144,12 @@ def : getInteraction() : game!Interaction = ->asSequence() ->first(); +helper context petrinet!Transition +def : getPlace(s : String) : petrinet!Place = + petrinet!Place.allInstances() + ->select(p | p.name = s) + ->asSequence() + ->first(); rule Game2PetriNet { diff --git a/runtime-workspace/fr.n7.petrinet.examples/src-gen/jeu.net b/runtime-workspace/fr.n7.petrinet.examples/src-gen/jeu.net index 0789a49..799d2c0 100644 --- a/runtime-workspace/fr.n7.petrinet.examples/src-gen/jeu.net +++ b/runtime-workspace/fr.n7.petrinet.examples/src-gen/jeu.net @@ -12,4 +12,4 @@ tr chemin_win lieu_Enigme*1 -> lieu_Succes*1 tr chemin_loose lieu_Enigme*1 -> lieu_Echec*1 tr interaction_Parler lieu_Enigme*1 -> personne_Sphinx*1 tr action_Reponse_1 personne_Sphinx*1 -> lieu_Enigme*1 -tr action_Reponse_2 personne_Sphinx*0 -> lieu_Enigme*1 +tr action_Reponse_2 personne_Sphinx*1 -> lieu_Enigme*1 invalid*1