atl simplepdl2petrinet

This commit is contained in:
Guillotin Damien 2021-10-15 09:28:18 +02:00
parent fdebc04fa9
commit 0435787d2a
23 changed files with 3360 additions and 179 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,2 @@
eclipse.preferences.version=1
internalWebBrowserHistory=file\:///home/dguillot/2A/IDM/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petriNet.png|*|file\:/home/dguillot/2A/IDM/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petriNet.png|*|file\:///home/dguillot/2A/IDM/miniproj_idm/eclipse-workspace/fr.n7.simplepdl/simplePDL.png|*|file\:/home/dguillot/2A/IDM/miniproj_idm/eclipse-workspace/fr.n7.simplepdl/simplePDL.png|*|file\:///home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petriNet.png|*|file\:/home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petriNet.png|*|file\:///home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.simplepdl/simplePDL.png|*|file\:/home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.simplepdl/simplePDL.png|*|file\:///home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petrinet.png|*|file\:/home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petrinet.png|*|file\:///home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.simplepdl.exemples/gen/developpement.html|*|file\:/home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.simplepdl.exemples/gen/developpement.html|*|
internalWebBrowserHistory=file\:///home/dguillot/2A/IDM/miniproj_idm/eclipse-workspace/fr.n7.simplepdl/simplePDL.png|*|file\:/home/dguillot/2A/IDM/miniproj_idm/eclipse-workspace/fr.n7.simplepdl/simplePDL.png|*|file\:///home/dguillot/2A/IDM/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petriNet.png|*|file\:/home/dguillot/2A/IDM/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petriNet.png|*|file\:///home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petriNet.png|*|file\:/home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petriNet.png|*|file\:///home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.simplepdl/simplePDL.png|*|file\:/home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.simplepdl/simplePDL.png|*|file\:///home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petrinet.png|*|file\:/home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.petrinet/petrinet.png|*|file\:///home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.simplepdl.exemples/gen/developpement.html|*|file\:/home/lfainsin/miniproj_idm/eclipse-workspace/fr.n7.simplepdl.exemples/gen/developpement.html|*|

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
#Cached timestamps
#Fri Oct 15 08:32:30 CEST 2021
#Fri Oct 15 09:27:32 CEST 2021

View file

@ -1,5 +1,5 @@
#safe table
#Fri Oct 15 08:32:30 CEST 2021
#Fri Oct 15 09:27:32 CEST 2021
.orphans=0
.mainData=0
.contributors=0
@ -7,4 +7,4 @@
.extraData=0
.contributions=0
.table=0
.crcfcf7e95e.v1
.crc11b4ace5.v1

View file

@ -1,5 +1,5 @@
#safe table
#Fri Oct 15 08:32:30 CEST 2021
#Fri Oct 15 09:27:32 CEST 2021
.orphans=1
.mainData=1
.contributors=1
@ -7,4 +7,4 @@
.extraData=1
.contributions=1
.table=1
.crc3385d365.v1
.crcdec696de.v1

View file

@ -1,4 +1,4 @@
# List of external plug-in models previously loaded. Timestamp: 1634278900011
# List of external plug-in models previously loaded. Timestamp: 1634279595109
file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/com.google.guava_27.1.0.v20190517-1946.jar
file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/com.google.inject_3.0.0.v201605172100.jar
file:/mnt/n7fs/ens/tp_cregut/eclipse-gls-2020-09/plugins/com.ibm.icu_67.1.0.v20200706-1749.jar

View file

@ -1,3 +1,3 @@
#Fri Oct 15 08:21:33 CEST 2021
#Fri Oct 15 08:33:09 CEST 2021
org.eclipse.core.runtime=2
org.eclipse.platform=4.17.0.v20200902-1800

View file

@ -40,5 +40,5 @@ pl [place.name/] ([place.tokens/])
[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.target.name/]*[a.weight/] [/if][/for]-> [for (a : Arc | t.arcs)][if (a.outgoing)][a.target.name/]*[a.weight/] [/if][/for]
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]

View file

@ -21,7 +21,77 @@ rule WorkDefinition2PetriNet {
from wd: simplepdl!WorkDefinition
to
-- PLACES d'une WorkDefinition
p_ready: petrinet!Place(
name <- wd.name + '_ready',
tokens <- 1)
p_idle: petrinet!Place(
name <- wd.name + '_idle',
tokens <- 1,
network <- wd.process),
p_running: petrinet!Place(
name <- wd.name + '_running',
tokens <- 1,
network <- wd.process),
p_started: petrinet!Place(
name <- wd.name + '_started',
tokens <- 1,
network <- wd.process),
p_finished: petrinet!Place(
name <- wd.name + '_finished',
tokens <- 1,
network <- wd.process),
-- TRANSITIONS d'une WorkDefinition
t_start: petrinet!Transition(
name <- wd.name + '_start',
weight <- 1,
network <- wd.process),
t_finish: petrinet!Transition(
name <- wd.name + '_finish',
weight <- 1,
network <- wd.process),
-- ARCS d'une WorkDefinition
a_idle2start: petrinet!Arc(
weight <- 1,
place <- p_idle,
transition <- t_start,
outgoing <- false),
a_start2running: petrinet!Arc(
weight <- 1,
place <- p_running,
transition <- t_start,
outgoing <- true),
a_start2started: petrinet!Arc(
weight <- 1,
place <- p_started,
transition <- t_start,
outgoing <- true),
a_running2finish: petrinet!Arc(
weight <- 1,
place <- p_running,
transition <- t_finish,
outgoing <- false),
a_finish2finished: petrinet!Arc(
weight <- 1,
place <- p_finished,
transition <- t_finish,
outgoing <- true)
}
-- Traduire une WorkSequence en un motif sur le r<>seau de Petri
rule WorkSequence2PetriNet {
from ws: simplepdl!WorkSequence
to
-- ARCS d'une WorkSequence
a_s2s: petrinet!Arc(
place <- ws.predecessor.name + '_started',
transition <- ws.successor.name + '_start'),
a_s2f: petrinet!Arc(
place <- ws.predecessor.name + '_started',
transition <- ws.successor.name + '_finish'),
a_f2s: petrinet!Arc(
place <- ws.predecessor.name + '_finished',
transition <- ws.successor.name + '_start'),
a_f2f: petrinet!Arc(
place <- ws.predecessor.name + '_finished',
transition <- ws.successor.name + '_fnish')
}