HAL Id: hal-00870484
https://hal.archives-ouvertes.fr/hal-00870484
Submitted on 8 Oct 2019
HAL
is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire
HAL, estdestinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.
Hanna Klaudel, Franck Pommereau
To cite this version:
Hanna Klaudel, Franck Pommereau. M-nets: A survey. Acta Informatica, Springer Verlag, 2008, 45
(7-8), pp.537–564. �10.1007/s00236-008-0077-0�. �hal-00870484�
Hanna Klaudel · Frank Pommereau
M-nets: a survey.
thedateofreeiptandaeptaneshouldbeinsertedlater
Abstrat This papersurveysthe researh relatedto themodel of M-nets
sineitwasintroduedin1995.M-netsarehigh-levellabelledPetrinetswhih
an be omposed, like proess algebra terms, using various operators. We
presenttheoremodel,severalofitsextensionsandthemainappliations.
Keywords High-levelPetrinets,ompositions,ationrenement,synhro-
nisation.
1Introdution
The model of Petri nets [68℄ is based on onepts oming from automata
theory,linearalgebraandgraphtheory.Besidesthegeneraladvantagesofa
formalmodelandtheveriationmethodsbasedonlinearalgebra,Petrinets
areadditionallyattrativesinetheyhaveasimplegraphialrepresentation.
Thisharateristisisimportantalreadyinthedesignproessshowinghowa
onurrentsystemisbuiltanddistributedin spae.Itgivesalearimageof
onurreny,sequentialityandonit,bothontheonretevisualleveland
onthegraph-theoretilevel.Inpartiular,suhanexpliitrepresentationof
onurrenyissuitablewhenstudyingnonsequential(trueonurreny or
partialorder)semantisofonurrentsystems.
Ontheotherhand,themodulardesign oflargesystemsallowstoredue
and manage their omplexity. This is possible either in a bottom-up way
byomposingsmaller subsystems,orgoing top-downby reningparts of a
rough model by more detailed systemdesriptions. In both ases, systems
H.Klaudel
IBISC, Université d'Evry, 523 plae des Terrasses, 91000 Evry, Frane, E-mail:
klaudelibis.univ-evry.fr
F.Pommereau
LACL,Univ.ParisEst,61av.dugénéraldeGaulle,94010Créteil,Frane,E-mail:
pommereauuniv-paris12.fr
are onstruted from building bloks and a semantis should support the
modular onstrution of systems. Modularity has been a somewhat weak
point of Petri nettheory: aPetrinet is dened asa whole,and notin the
rst instane obtained by omposing subnets. This is totally dierent in
proessalgebraswheresystemsaredesribedbyproessterms,whihareby
denition builtfromsubterms. Thesemantis ofaproesstermis obtained
fromthesemantisofitssubtermsandisompositionalbynature.However,
the standard proess algebras redue onurreny to interleaving arguing
thatinterleavingissimplerthantrueonurrenyandjustasexpressive.On
the other hand, interleaving based models are less suitable for atop-down
design, sine they desribe systems using ations that are assumed to be
instantaneousandindivisible.
BothPetrinetsandproessalgebrasapproaheshaveinreasinglyinu-
ened eah other, and onsiderable eort has been made to ombine their
respetivemerits.ThePetriBox Calulus (PBC) [4,5℄,whih evolvedlater
tothePetriNetAlgebra(PNA)[6℄,oersaverygeneralsolutiontoombine
proess algebrasand Petri nets.However, in pratial situations, the stan-
dard low-level Petrinet model on whih PBC is based leads to hugenets
whiharewelldenedmathematiallybutdiulttograspintuitively.Asa
onsequene,theappreiatedfeatureofPetrinetsofrepresentinggraphially
systempropertiessuhasonurreny,sequentiality,onits,et.,vanishes
beauseofthesizeofPetrinetsneessarytodesribetheonsideredsystem.
To address this problem, high-level Petri net models have been proposed,
suh asprediate/transition nets [42℄,oloured Petri nets [47℄,oralgebrai
nets [76℄.
Inpartiular,theCalulusof Modular MultilabelledNets (M-nets)[8,51℄
wasintroduedin orderto ombinetheompositionalityofproessalgebras
andtheexpliitrepresentationofonurrenyofPetrinetsinaommonhigh-
levelframework.Indeed, M-netsare onsideredastheolouredounterpart
ofthePBC.Atually,M-nets andPBCarerelatedthroughanoperationof
unfolding whihtakesanM-netN andyieldsanequivalentlow-levelnetNℓ.
NanbeseenasanabbreviationofNℓ,andNℓasthesemantisofN.M-nets
supportvariousompositionoperations(parallel,sequene,hoie,iteration,
synhronisation,restrition,et.),whihareessentiallythesameasinPBC.
Indeed, it was one of the main aims in the design of the M-net model to
ensurethattheunfoldingofaomposednetoinideswiththeomposition
oftheunfoldingsof itsparts.ThePBCandM-nets areimplementedinthe
PEPtool[41℄whihallowstoedit,simulateandverifysystemsusingmodel-
heking.Moreover,the SNAKES toolkit[73℄,a toolspeially dediated
toworkwithvariantsof M-netsandPBC,allowstoquiklyimplementnew
operations for those models, thus providing a framework to prototypeand
experimentwithnewvariants.
ThispapersurveystheresearhrelatedtoM-nets sinetheywereintro-
dued.ThenextsetiondenesthePetrinetaspetsofthemodel,inluding
therenement(meta-)operationwhihallowstosubstituteM-nettransitions
byarbitraryM-nets.The low-levelnetmodelis alsointroduedin order to
state the onsisteny betweenhigh and low levels. Setion 3 presents sev-
exhange information between dierent abstration levels of a system; re-
ursion whih is like a repetitive renement; and buered ommuniation
providingasimpleshemetosharedatabetweendierentpartsofanM-net.
Setion4showshowanalgebraofM-netsisbuiltusingtheirannotations(for
synhronousandasynhronousommuniation)and therenement(forthe
ontrolowoperations).Theintroduedoperationsareonsistentwiththose
existinginPBC.Setion5reviewsseveralappliationsorfurtherextensions
oftheM-netsalgebra.ThisinludesadenitionofanM-netsemantisofthe
parallel speiationlanguageB(PN) 2
andseveral otherextensions likethe
introdution of objet oriented paradigms, the modelling of mobility, pre-
emption (suspend/resume and abort of subsystems) or timing onstraints.
Finally,setion 6presentsaasestudy using M-netsto model and verify a
timedrailroadrossingsystem.
2The model of M-nets
2.1Basidenitionsandnotations
We start with the denition of multisetswhih are widely used in the fol-
lowing. Let E bea set.A multiset over E is afuntion µ : E → Nwhih assoiatestoeahelementofE itsnumberofourrenesinµ.Amultisetµ
isniteifso istheset{x∈E|µ(x)6= 0}.Sometimes,wewilluseformulti-
setsanextendedsetnotation;forinstane, {x, y, y}willdenotethemultiset µsuhthat µ(x) = 1,µ(y) = 2and µ(z) = 0 forallz∈E\ {x, y}.Wewill
denote by ∅ the empty multiset. We also introdue the followingnotations
forµ,µ1 andµ2multisetsoverE andn∈N:
the symbols +, −, and ∗ denote, respetively, the sum, the dierene of multisets and the multipliation of amultiset by a natural number;
formally, for x in E: (µ1 +µ2)(x) =df µ1(x) +µ2(x), (µ1 −µ2)(x) =df max(0, µ1(x)−µ2(x))and(n∗µ)(x)=df n∗µ(x);
wewrite x∈µifµ(x)>0,andµ1⊆µ2 if∀x∈E:µ1(x)≤µ2(x);
wedenotebymult(E)thesetofallthemultisetsoverE,andbymultf(E)
thesetof thenitemultisetsoverE.
A(low-level)Petrinet isadiretedbipartitegraphwhosenodesareplaes
ortransitions.Theplaes maybemarked,i.e., mayarrytokens.Theinput
ars ofatransitiontomefromthesetofpre-plaes oftandtheoutputars
oftgotoitspost-plaes.Atransitionisativatedifitspre-plaesaremarked bysuientlymanytokens.It maythenbered in whihasesometokens
are removed from eah pre-plae and some other produed in eah post-
plae. Thears areweighted,i.e., annotatedbyanaturalnumber(where 0
orrespondstotheabseneofthear)indiatingthenumberoftokenswhih
aretransportedthroughthearduringtheringofatransition.Plaesand
transitionsmayalsoarrylabels.Formally:
Denition1 A (low-level) labelled Petrinet N isaquadruple (S, T, W, λ)
where:
SisasetofplaesandT isasetoftransitions,withS∩T =∅;
W : (S×T)∪(T×S)→Nistheweightfuntion onars;
λisthelabellingfuntiononS∪T.
AmarkingofN isafuntion M :S →Nwhihassoiatestoeahplae thenumberoftokensitarries.
Foraplaeoratransitionx∈S∪T,wedene•x=df {y∈S∪T |W(y, x)>
0} and x• =df {y ∈S∪T | W(x, y)> 0}. Themarking ofa plae denes a
loal state,in suh away thatthe globalstateof thenet isrepresentedby
thesetofallsuhloalstates.Thedynamibehaviourofsuhanetisgiven
bythetransition rule:
Denition2 LetN = (S, T, W, λ)bealabelledPetri netandM itsmark-
ing. Atransition t ∈T isativated at M i ∀s∈S :M(s)≥W(s, t).The
ring oft produesthevisibleationλ(t)andgivesrisetothenewmarking M′ dened by∀s∈S:M′(s)=dfM(s)−W(s, t) +W(t, s).
Thetransition rule illustrates the property of loality of nets: only the
part
•t∪t• of the global state is involved in the ring of the transition t.
Inonurrentsystems,the ations(representedbytheourrenesof tran-
sitions)mayappear onurrently,i.e., independentlyof eah other.If these
ourrenesaredesribed byanarbitraryinterleavingof ations,theneah
sequene ofindependent ationsis asequene ofourrenesof the system
and the orresponding semantis is alled a sequential or an interleaving
semantis. If the ourrene of a nite multiset of ations is allowed, then
theorrespondingsemantisisasteporaonurrent semantis[3,9,43,44℄.
If the ourrenes of ations are partially ordered, then the orresponding
semantisisapartialorder ortrue onurreny semantis[66,79,81℄.
The model based onlow-levelnets is partiularlyinterestingbeauseit
is supported by various implemented tools (see [69,80℄ for a presentation
ofmanytools) andmaybeanalyzedusingmethodsdevotedtosuhnetsor
usingeientalgorithmsofmodelheking.However,thesenetsarenotoften
used diretly beause the speiations of real size systems are in general
toolarge tobeunderstandable.Thedesigners oftenpreferto usehigh-level
versionsofPetrinetswhihprovideabetterabstration andwhihmaybe
automatiallyunfolded tolow-levelnetsbeforebeinganalysed.
Figure 1representstwoequivalent nets(in thesense that theydesribe
the same behaviours),the net on the left is high-level and the net on the
rightisitsunfolding (so,itis alow-levelnet).
Theannotationsusedforthehigh-levelnetshavethefollowingmeanings:
the plaes are typed, i.e., haveassoiated sets of values (s has thetype {•},s′ hasthetype{1,2,3}ands′′hasthetype{2,3});
the tokens are values respeting the types of the plaes (s′ arries the
token2ands′′arriesthetoken3);
thearsareannotatedwithvalues orvariables;thesopeforthevariables
isboundto atransitionanditsadjaentars(so,thevariablesarounda
transitionhaveonlyaloal meaningandmaybeonsistentlyrenamed);
the transitionsmayarryBooleanexpressionsalled guards playingthe
{•} s
x6=y t
2 {1,2,3}
s′
3 {2,3}
s′′
•
x y
s•
tσ1 tσ2 tσ3 tσ4
s′1
•
s′2 s′3 s′′2
• s′′3
Fig.1 Ahigh-levelnet(ontheleft)anditsunfolding(ontheright)whoselabelling
hasbeenomitted.Theσi'sarethemodesoftinthehigh-levelnet,theindexesof
thes′i'sandthes′′j'sorrespondtothevaluesinthetypesofs′ ands′′.
theguardtrue(this is theasefor thetransition t taking, for instane, x = 2 and y = 3, but not for x = y = 2). The guard is often used
in order to ompute valuesduring aring. Here,sine xand y are free
variables(not bound onan inputar),the transitionatually omputes
non-deterministiallyanumberin{1,2,3}forxandanotheronein{2,3}
fory,hoosingthemdistint(beauseoftheguard).
Thetransitionruleinahigh-levelnetismoreompliatedthanthatused
atthelow-level:inordertoreatransitiontitisneessarytotaketokensin
thepre-plaesoft,toassoiatethemtothevariablesaroundtandtoensure
thattheguardevaluatestotrue.Moreover,onlyvaluesallowedbythetypes
of plaes may be produed. The mappings, alled bindings, assoiating a
valueto eah variable exist independently ofthemarkingof thenet andof
theguardof t. (However,weshall onlyonsider the variablesinvolved in t
when showing a binding intended to be used for t.) For t in gure 1, the
bindingsare oftheform (x7→i, y 7→j)where iand j arearbitrary values.
A bindingis alled amode ifit allowsto evaluatetheguardto trueandif
the valueorresponding to eah variable appearing in an annotationof an
arbelongsto thetypeoftheadjaentplae.So, themodesof tin gure1
are σ1
= (xdf 7→1, y 7→ 2), σ2
= (xdf 7→ 1, y 7→ 3), σ3
= (xdf 7→ 2, y 7→ 3) and σ4
= (xdf 7→3, y7→2),butnotσ′1= (xdf 7→1, y7→1) norσ2′ = (xdf 7→2, y7→2)
beausetheydonotrespettheguardoft,andneitherσ3′ = (xdf 7→0, y7→2)
beauseitdoesnotrespetthetypeofs′.
Thesehigh-levelaspetsareexpressibleinthelow-levelnetsthroughthe
operationofunfolding dened asfollows:
eahhigh-levelplaeisunfoldedto asmanylow-levelplaesasthereare
valuesinitstype(so,s′ givesriseto thelow-levelplaes s′1,s′2 ands′3);
themarkingisobtainedin suh awaythat, forinstane, thetoken2in
s′ leadstoa(blak)tokenintheplaes′2;
eahhigh-leveltransitionis unfoldedtoasmanylow-leveltransitions as
there aremodesassoiatedtoit(so,t generatesthelow-leveltransitions
tσ1 to tσ4);
the arsare obtainedonsistently withthe modes. So,aordingto the
mode σ1 = (x 7→ 1, y 7→ 2), tσ1 is onneted to s′1, with the weight 1
orrespondingto themultipliityofxintheannotationofthehigh-level
ar,and to s′′2,with theweight 1orrespondingto the multipliity ofy
intheannotationofthehigh-levelar.
The unfolding allows to express systems in the high-level domain with
theguaranteethattheyhavearepresentationinthelow-levelone,whihis
neededfortheirautomatedanalysis.(Notie,however,thatallowinginnite
typesforthehigh-levelplaesgivesrisetoinnitelow-levelnets.)
2.2Statianddynamiaspetsof M-nets
Weonsiderthefollowingpairwisedisjointsets:
Val is theset ofvalues (inpartiular, Val ontainstheblaktoken •,
naturalnumbers,Booleanvalues,et.);
Varisthesetofvariables (Varisassumedlargeenoughtoallowrenaming
eahtimeitisneessaryin ordertoavoidnamelashes);
A is the set of high-level ation symbols, provided with a bijetion b,
alledonjugation, suhthat for allact∈ A:actc 6=actand actcc =act.
Eah symbolact∈Ahasanarity ar(act)andwehavear(act) =c ar(act).
Thetermsact(x1, . . . , xar(act))andact(xc 1, . . . , xar(act))(wherexi∈Val∪ Var for1 ≤i≤ar(act))are (high-level)ations andtheyaresaidto be
elementary ifalltheirarguments(thexi's)arevalues;
AℓorrespondstoAinthelow-leveldomain;itisthesetofallelementary ationsonstrutedfromAandVal.(NotiethatAℓislosedunder b.)
Xontainsthehierarhialsymbols,whihwillbeusedtodenoteabstrat ationsusedtolabeltransitionstoberened;
thesymbolse,iandxdenotethestatus of plaesusedtolabelplaesin
orderto guidenet ompositions; foranet N, wedenote byNe,Ni and Nx,respetively,thesetofitsentryplaes(labelledbye),internalplaes (labelledbyi) andexit plaes (labelledbyx).
Theboxes are labelled low-level netswith somestrutural onstraints:
1
theentryplaes havenoinputars (symmetrially,the exit plaeshaveno
output ars), there alwaysexists entryand exit plaes and eah transition
hasatleastonepre-plaeandonepost-plae.
Denition3 A box N = (S, T, W, λ)is alow-levellabelled Petri netsuh
that:
foreahplaes∈S wehaveλ(s)∈ {e,i,x};
foreahtransitiont∈T,wehaveλ(t)∈multf(Aℓ)(iftisaommunia-
tion transition)orλ(t)∈X(if tisahierarhial transition);
N isex-restrited:Ne6=∅ 6=Nx;
N isex-oriented:∀t∈T,∀s∈Ne,∀s′∈Nx:W(t, s) = 0 ∧ W(s′, t) = 0;
N isT-restrited:∀t∈T,∃s, s′∈S:W(s, t)>0 ∧ W(t, s′)>0.
1
TheseonditionswererequiredinPBC[4℄butrelaxedinPNA[6℄.Wewilluse
With this denition,in partiular,wearesureto havenon-emptyentry
and exit interfaes (Ne and Nx) in everybox N. The ommuniation and thehierarhialinterfaes,whihareomposedoftransitions,maybeempty.
Theseinterfaeswillberuialfordeningompositionoperationsonboxes,
seesetion4.Thetransition ruleforboxesisthat oflow-levellabelledPetri
nets.
M-nets are high-levelboxes.Inorder tointroduethem, weneed essen-
tiallytoenrihtheannotationsof low-levelnets.
Denition4 AnM-netisatripleN= (S, T, ι),whereSisthesetofplaes, T isthesetoftransitions(withS∩T =∅)andιistheannotationfuntion
onS∪T ∪(S×T)∪(T×S),suh that:
foreah plae s∈ S, ι(s)is apairλ(s).α(s) where λ(s)∈ {e,i,x} gives
thestatusofsandα(s)⊆Val, withα(s)6=∅,givesitstype;
foreahtransitiont∈T,ι(t)isapairλ(t).γ(t), where:
eitherλ(t)isanite multisetofhigh-levelations,orλ(t)∈X; γ(t)istheguardoft,whihisaBooleanexpressionsonVar andVal.
Wedenote by var(t)(a subsetof Var)the set of variablesappearing in
theannotationsoftanditsars;
foreahar(s, t),ι(s, t)isamultisetofstruturedannotationsonVar∪ Val, representingthevaluesonsumedduring aringoft;similarly,the
valuesprodued during a ring of t are represented by the annotation
ι(t, s);
N is ex-restrited, ex-oriented and T-restrited (like for boxes, using ι(x, y) = ∅ or ι(x, y) 6= ∅ instead of W(x, y) = 0 or W(x, y) > 0 re-
spetively).
Thestruturedannotationsare formalised in [37℄ and illustratedin the
following,see for instane gures5 and 6.They inlude,depending onthe
ontext, onstantsand variables, but also moreomplexterms(introdued
lateron,possiblyinludingdistinguishedsymbolsζ andϕ)that enode,for
eahmode,dierentsetsofvalues.
In the gures, the hierarhial transitions are represented using double
lines (the hierarhial symbols being the apital letters X, Y, et.). En-
tryplaes aredepited withaninoming double arrow,exit plaes withan
outgoingdouble arrowand internal plaes withno double arrow.Also,the
notations are oftensimplied: an empty ommuniationlabelor anempty
(true) guard are generallyomitted, ars with empty annotationsare never
represented,thesingletonmultisetsarereplaedbytheiruniqueelement,the
plaesare notalwaysnamed,et. Thepurposeofthese simpliationsis to
alleviate thepresentation in order to fous on the aspets serving diretly
theunderstanding.
Wewillformalisenowdierentnotionsallowingustodenetheunfolding
andthetransitionruleofM-nets.Thiswillallowustostatethepropertyof
onsistenyofthebehaviourofanM-netwithrespettothebehaviourofits
unfolding.
A binding of a transition t is a substitution σ : var(t) → Val. If x is
anentity(expression,ation,et.)whih depends onthevariablesin var(t),
wedenote by σ(x)theevaluationofxunder σ.A transitiont withaguard