Modelling Reation Systems with Petri Nets
(Extended Abstrat)
JettyKleijn
1
,MaiejKoutny
2
,andGrzegorzRozenberg
1,3
1
LIACS,LeidenUniversity,2300RA,TheNetherlands
2
ShoolofComputingSiene,NewastleUniversity,NE17RU,UK
3
DepartmentofComputerSiene,UniversityofColoradoatBoulder
430UCBBoulder,CO80309-0430,U.S.A.
Abstrat. We investigate how Petri netsould be used to provide a
faithfulsemantisofreationsystems,aformalframeworkfortheinves-
tigationofproessesarried by biohemial reations. Wepropose and
disuss possible approahes to this problem usingsome existing Petri
netlassesandonurrenyonepts,suhasmaximalparallelism.After
thatweintrodueanewlassofPetrinets,alledset-nets,whihprovide
aomputationalmodelmathingveryloselythatexhibitedbyreation
systems.The keydierene betweenstandard Petri netsand set-nets
isthattheformersupportmultiset-basedtokenarithmeti,whereasthe
lattersupportset-basedoperationsontokens.
Keywords: reation system, Petrinet, living ell,natural omputing,
set-net,modeltranslation
1 Introdution
Theinvestigationof theomputationalnature of biohemialreationsisare-
searhtopi ofNatural Computing.Oneofthe goalsof thisresearh isto on-
tributetoaomputationalunderstanding ofthefuntioning oftheliving ell.
Reationsystems[2,3,710℄areaformalframeworkfortheinvestigationof
proesses arried outby biohemial reations in living ells.The entral idea
ofthisframeworkisthatthefuntioningofalivingellisbasedoninterations
between (a largenumber of) individual reations,and moreoverthese intera-
tionsareregulatedbytwomainmehanisms:failitation/aelerationandinhi-
bition/retardation. These interationsdetermine thedynami proessestaking
plaeinlivingells,andreationsystemsformaformalframeworkfordeveloping
anabstrattheoryoftheseproesses.
The model of reation systems is based on priniples remarkably dierent
from those underlying other existing models of omputation. The aim of this
paper is to develop a faithful Petri net model of reation systems. The main
motivationbehindthisistoestablishwhetherPetrinetbasedonepts(suhas
ausalproesses)andmethods (suhassynthesisofnetsfromaspeiationof
theirbehaviour)ouldbeused toprovideanalytialtoolsforreationsystems.
It is not the intention of this paper to provide diret feedbak to the area of
online: http://ceur-ws.org/Vol-724 pp.36-52
biologialappliations, butto establishbridgesbetweenbiologyand Petri nets
throughtheonnetionprovidedbyreationsystems.
Asarststep,weproposeanddisussfourdierentapproahestothemod-
eling of reation systems by using existing Petri net lasses and onurreny
onepts.However,asitturnsout,inordertoobtainagoodmathbetweenre-
ationsystemsandPetrinets,itisneessarytore-evaluateoneofthebasinet
priniples,namely, token ounting. This leadsus to theintrodution of anew
lass of Petri nets, alled set-nets, whih provide a net based omputational
model mathing verylosely the omputations exhibited by reationsystems.
Themaindierenebetweenset-netsandstandardPetrinetsisthatthelatter
support multiset-basedtokenarithmeti, whereastheformer supportset-based
(boolean)operationsontokens.Thus,theomputational`intuition'originating
from reationsystemsprovidestheinspirationto introdue anew lassofnets
withintriguingandyettodisoverproperties.Consequently,themainontribu-
tionofthispaperismorethanjustprovidingabridgebetweenreationsystems
andtheworldofPetrinets.Inthefuture,afterfullyunderstandingandmaster-
ing the properties of thenew set-nets, onewould hope to provide also anew
set oftoolsandanalysesforbiologialappliations.
Thepaperisorganisedin thefollowingway.Inthenextsetion,wedesribe
basinotionsofreationsystems.Setion3desribestwomethodsofmodelling
reationsystemusinglow-levelPetrinets,andthenextonedoesthesameusing
high-levelPetrinets.Thenewlassof set-netsis introdued inSetion 5,and
in Setion 6weexplainwhythis new lassof netsanfaithfully and elegantly
modelreationsystems.ComparisonwithrelatedworkispresentedinSetion7.
Proofsoftheresultspresentedin thispaperanbefoundin [16℄.
Notation Weusethestandardmathematialnotionsandnotation.Amultiset
overaset
X
is afuntionµ : X → N = {0, 1, 2, . . .}
, and itssupport is||µ|| = {x ∈ X | µ(x) > 0}
.Theemptymultiset∅
satises|| ∅ || = ∅
.Amultisetmaybe represented,somewhatinformally,by listingitselementswithrepetitions, e.g.,µ = {y, y, z}
issuhthatµ(y) = 2
,µ(z) = 1
,andµ(x) = 0
otherwise.Wetreatsetsas multisetswithoutrepetitions.
2 Reation systems
In thissetion, we explainsomenotionsrelevant toreationsystems. It isour
intention to introdue enough onepts to allow one to follow the subsequent
disussion on the relationship between reation systemsand Petri nets. Fora
omprehensivedesriptionof reationsystems,inluding motivations, applia-
tionsandexamples,thereaderisreferredto[79℄.
Denition1 (reation system [79℄). A reation system is a pair:
A = (S, A)
,whereS
isanite bakgroundset omprising the entities ofA
,andA
isthesetofreationsof
A
.Eah reationisatripletofthe form:a = (R, I, P )
,wherethe threeomponents arenite non-emptysets:
R ⊆ S
istheset of rea-tants,
I ⊆ S
isthe setof inhibitors,andP ⊆ S
isthe setof produts.The omponents of a reation
a = (R, I, P )
are denoted byR a
,I a
andP a
,respetively.Denition1desribesthestati strutureofareationsystem.To
apturethedynami behaviourofreationsystems,weneedadditionalnotions.
Denition2 (state of reation system). A state of a reation system is
any set
C
of its entities. Then an initialised reation system is a tripletA = (S, A, C 0 )
,where(S, A)
isareationsystemandC 0 ⊆ S
isthe initialstate.Inthis and in the nextsetion, we will onsider asa running examplethe
initialised reationsystem
A 0 = ({w, x, y, z}, {a, b, c}, {x, z})
,withbakgroundset
{w, x, y, z}
,initialstate{x, z}
,andthreereations:a = ({x}, {y}, {y, z}) b = ({y}, {x}, {x, z}) c = ({z}, {w}, {z}) .
A reationsystemwith bakgroundset
S
hasexatly2 |S|
potentialstates.To desribe possible transitions between these states, we need to say what is
meantbyanourreneofareationorasetofreations.
Denition3 (state hange). A reation
a
is enabled at a stateC ⊆ S
ifR a ⊆ C
andI a ∩C = ∅
;theresultofareationa
atC
isdenedbyres a (C) = P a
if
a
isenabledatC
andres a (C) = ∅
otherwise. The resultofA
onC
, denotedby
res A (C)
onsistsof theprodutsofall reations fromA
enabledatC, thatisres A (C) = [
a∈A
res a (C) .
This statehange isdenotedby
C −→ res A (C)
.NotethatthestatehangesapturedbyDenition3aredeterministi.More-
over,allentitiesin
C \ S
a∈A res a (C)
disappear.Asaresult,andunlikeinotherformalmodelsofdynamisystems,thereisnopersistenyinareationsystem
inthesensethatanentitypresentinastatedisappearsunlessitissustainedby
atleastonereation.
Fortheexamplereationsystem
A 0
,wehave:{x, z} −→ {y, z}
and{y, z} −→ {x, z}
and{w, x, y} −→ ∅ .
Onemay observethat thereis noonit between reationsin the `lassi'
sense that the ourrene of one reation might imply that another reation
whihisalsoenabledattheurrentstate,annotour.This,again,isafeature
notfound inmost otherformal modelsof dynami systems.Inpartiular,it is
worthwhiletopointexpliitlytothe`non-ounting'featuresofreationsystems:
entities are either present or not, and produed or not, and reationsan or
annot our based only on thepresene orabsene of ertain entities. There
is norepresentation ofmultiple instanesof entities ormultiple ourrenesof
reations. Thus reation systems are a qualitative rather than a quantitative
model.
Wealsonote thatthere isanalternativenotionofonit-freenessforaset
ofreations,alled onsisteny.Aset ofreations
R
isonsistent ifforanytworeations
a, b ∈ R
,R a ∩ I b = R b ∩ I a = ∅
. Clearly,if aset of reationsis not onsistent,thenthereationsitomprisesannotbeexeutedsimultaneously.Although the goal of this paper is a faithful `translation' of reation sys-
temsintoPetrinets,weonludethissetionwithanumberofommentsabout
researh on reation systems. This researh happens in the framework of re-
ation systemswhere a reationsystemonstitutes thebasi tehnial notion.
Depending onthegoalof aspei researh theme,manyother onstrutsare
introduedand studied (see,e.g., [2,9,10℄) theyform variousextensions of
thebasinotionofreationsystem.Forexample,therearemanybiologialsitu-
ationswhereoneneedstoassignquantitativeparameters(time,onentrations,
...)tostatesofabiohemialsystem.Althoughreationsystemsareaqualita-
tivemodel(theyannot`ount'),theyanbeextendedsothatsuhquantitative
parametersanbeaommodated.Thisisdonethroughtheuseofmeasurement
funtions whih lead to reation systems with measurements (see [2,3,9,10℄),
where variousnumerialparametersanbeassignedto (alulatedfor)onse-
utivestatesofdynamiproesses.
Finally, we want to point out that (beause living ells are open systems)
reationsystemshaveanenvironmentandtheyoperate/evolvewithinahanging
ontext (withentities omingfrom theenvironmentinueningthe transitions
of dynami proesses). In this paper, however, we will onsider only ontext-
independent proessesdened byareationsystemwithaninitial state,where
eahnext stateis obtainedsolelyasthe resultof reationstakingplae in the
previous state (thus assuming that the environment does not inuene state
transitions).
3 Reation systems and low-level Petri nets
Inthis setion, wedisuss twopossiblewaysof modelling ontext-independent
proessesofreationsystemsusinglow-levelPetri nets(pt-netsextended with
withinhibitorandativatorars).
Inaddition to the standardnotions of reationsystems, in order to better
explainhowtheyrelateto Petri nets,throughouttherest ofthispaperwewill
say that aset
R ⊆ A
is enabledatC
if eah reationofR
isenabledatC
. IfR ⊆ A
isenabledatC
,thenC = R ⇒ res R (C) = [
a∈R
P a .
denotestheeetof
R
atC
.Denition4 (pt-nets with inhibitorand ativator ars [14℄).A pt-net
withinhibitorandativatorars(or ptia-net)
N = (Pl, Tr , Flw , Inh, Act, M 0 )
isatuple suhthat
Pl
andTr
arenite,disjoint setsofrespetively plaesand transitions, and:Flw ⊆ (Pl × Tr) ∪ (Tr × Pl )
,Inh ⊆ Pl × Tr
,Act ⊆ Pl × Tr
are respetively the sets of ow, inhibitorand ativatorars. Moreover,
M 0
isamultisetofplaes, the initial markingof
N
;ingeneral,anymultisetof plaesisalleda marking.
Indiagrams,plaesaredrawnasirlesandtransitionsasretangles.Mark-
ingsare thepossibleglobal ongurations(states) of
N
.Wesay thataplaeq
is marked under a marking
M
ifM (q) > 0
, whereM (q)
denotes thenumberofourrenesof
q
inM
.Indiagrams,markingsareindiatedbyputtingM (q)
tokens insidetheirlerepresenting
q
.If(x, y) ∈ Flw
,then(x, y)
isanarlead-ing from node
x
to nodey
. A double headedarrowbetweenq
andt
indiatesthat
(q, t), (t, q) ∈ Flw
. Aninhibitorarendswithasmallopenirle,whileanativatorarendswithasmallblakirle.
Given anode
x
, we denote by• x
the set of input nodes ofx
, i.e., thosey
for whih
(y, x) ∈ Flw
, and byx •
the set of output nodes ofx
, i.e., thosey
for whih
(x, y) ∈ Flw
. For atransitiont
weuse:◦ t = {q | (q, t) ∈ Inh}
andt = {q | (q, t) ∈ Act}
todenotetheinhibitorandativatorplaesoft
.All fournotations extendin the usual way to sets of nodes. As in the ase of reation
systems,wenowformalisethenotionofmarking(state) hange.
Denition5 (marking hange). A multiset of transitions
U
(also alled astep) is enabled ata marking
M
if◦ U ∩ ||M || = ∅
,U ⊆ ||M ||
and, for everyplae
q
,M (q) ≥ P
t∈q • U (t)
(reall that||M ||
isthe set ofq
whih our inM
,and
U (t)
isthe numberof ourrenesoft
inU
).In suh a ase,
U
an be red with its eet onM
being given by the result-ing marking
M ′
suh that, for every plaeq
:M ′ (q) = M (q) − P
t∈q • U (t) + P
t∈ • q U (t)
. We denote this byM [UiM ′
.Moreover, ifU
is a maximal (w.r.t.multiset inlusion) step of transitions enabled at
M
, then we may denote thismarkinghangealso by
M [U i max M ′
.Notethat wheneverastep
U
is enabledat markingM
itmust betheasethatallativatorplaesoftransitionsin
||U ||
aremarked(arein||M ||
)andnoneoftheinhibitorplaesoftransitions in
||U ||
aremarked.We now make some general observations and assumptions about the rela-
tionship betweenreationsystemsandnets.
Entitiesanberepresentedbyplaes,andreationsbynettransitions.
Sine there are no onits between reations,ativator ars an be used
totestfor thepreseneofreatants(ratherthan laimingresouresforthe
exlusiveuseaswithordinaryarsandinputplaes).
Allreationsthatanourinareationsystemdoour,andtheonlyen-
titiesleftafterastatehangearethenewlygeneratedproduts.InthePetri
netframework,these featuresorrespondto maximalparallelism desribed
attheendofDenition5,andplaeresetting [6℄desribedlateron.
(a)
N I (A 0 )
x
y
z
w
q a
q b
q c
r x
r y
r z
r w
a
b
c
(b)
N II (A 0 )
x
y
z
w r
a
b
c
⋆
⋆
⋆
⋆
Fig.1.MethodIandIIrepresentationsofthereationsystem
A 0
.MethodI. TherstattemptisillustratedinFigure1(
a
)fortheexamplerea-tionsystem
A 0
.Method Iproduesaptia-netN I (A 0 )
suhthat:Transitions
a
,b
andc
useativatorarsandinhibitorarstotestrespetively forthepreseneandabseneoftokensin theplaesw
,x
,y
andz
.Plaes
q a
,q b
andq c
ensure that thethree transitions modelling reations, i.e.,a
,b
andc
, reatmostonein anystep.Thisorrespondsto the`non-ounting'ofourreneinstanesofthesamereationinareationsystem.
Transitions
r w
,r x
,r y
andr z
(in a maximal step) empty the four plaesmodelling entities
w
,x
,y
andz
. This doesnot have any inuene on theringofthetransitions
a
,b
andc
.Inasinglemaximalstep,
M [U i max M ′
,the netresamaximal multisetoftransitions
U
enabledatmarkingM
andthenproduesanewmarkingM ′
.ForthenetinFigure1(
a
),suharingrulegives:{x, z, q a , q b , q c } [{r x , r z , a, c}i max {y, z, z, q a , q b , q c } {x, x, x, z, q a , q b , q c } [{r x , r x , r x , r z , a, c}i max {y, z, z, q a , q b , q c } .
Formally,given aninitialised reation system
A = (S, A)
, Method I yieldsaptia-net
N I (A)
suhthat theplaes,transitionsand theinitialmarkingare, respetively:Pl = {q a | a ∈ A} ∪ S
,Tr = {r s | s ∈ S} ∪ A
andM 0 = {q a | a ∈ A} +C 0
.Moreover,thesetsofow,inhibitorandativatorarsare,respetively:Flw = {(s, r s ) | s ∈ S} ∪ {(a, q a ), (q a , a) | a ∈ A} ∪ {(a, s) | a ∈ A ∧ s ∈ P a } Inh = {(s, a) | a ∈ A ∧ s ∈ I a } Act = {(s, a) | a ∈ A ∧ s ∈ R a } .
Notethatthiskindofmodellinginombinationwiththe`resetting'ofplaes
w
,x
,y
andz
in eah red step, implemented by the auxiliarytransitionsr w
,r x
,r y
andr z
,meansthattheresultingPetri netisbounded(ineveryreahablemarkingthemultipliityofeahplaeisnevermorethanthenumberofreations
of
A
ifA
hasat leastonereation).In order to relate the behaviour of the original reationsystem
A
and itsptia-netrepresentation
N I (A)
justintrodued,weneedtwomappings.Therstone takesamarking
M
ofN I (A)
andreturnsastateofA
,and theother takesastep
U
oftransitions ofN I (A)
andreturnsaset ofreationsofA
,asfollowsν I (M ) = S ∩ ||M ||
andϕ I (U ) = A ∩ ||U||
. It isthen possibleto showanumberof results, where amarking
M
of the ptia-netN I (A)
is alled well-formed ifM (q a ) = 1
,foreverya ∈ A
.First,
M 0
is a well-formed marking satisfyingν(M 0 ) = C 0
, and ifM
is awell-formedmarkingand
M [U iM ′
,thenM ′
isalsowell-formed.Seond,ifM
isawell-formedmarking,thenforeveryreation
a ∈ A
,a
isenabledatM
i{a}
isenabledatstate
ν I (M )
.Wethenanshowthatthetranslationissound.Theorem1. If
M
isawell-formedmarking then:1.
M [U iM ′
impliesν I (M ) ϕ = I (U) ⇒ ν I (M ′ )
.Moreover,ifM [U i max M ′
,thenϕ I (U )
omprisesallreationsenabledat
ν I (M )
.2.
ν I (M ) = R ⇒ C
impliesM [U iM ′
for someU
andM ′
satisfying:ϕ I (U) = R
and
ν I (M ′ ) = C
. Moreover, ifR
omprises all reationsenabledatν I (M )
,then
M [U i max M ′
.Thus, eah maximal omputational step in the Petri net orresponds to a
unique exeution of the reation system, and eah exeution in the reation
systemorrespondstoatleast onemaximalstepinthePetrinet.Forexample,
thetwoexeutionsgivenaboveforthePetri netinFigure1(
a
)bothorrespondto
{x, z} {a,c} = ⇒ {y, z}
in thereationsystemA 0
.NotethatinFigure1(
a
)oneannotsimplydeletetheauxiliaryplaesoftheform
q r
astheneahofthetransitionsrepresentingreationsouldbeunbound- edlyenabled.Toaddressthisproblemoneouldhangetheativatorarsfromplaesrepresentingentitiesintoowars.Then,however,itwouldbeneessary
to add weights
|R|
to thearsorrespondingto theprodution of newentities in ordertoavoidonits ontheplaesrepresentingthereatants.MethodII. Therstattemptto modelontext-independentreationsystems
providesasound translation, but itis notsimple asitemploysfeatures whih
an makeformal analysisand veriationfarfrom easy.Onewayofimproving
Method Iouldbetoreplaemultisetsofredtransitionsbysetsofredtran-
sitionsleadingto amaximal set-semantis.Thisanbeahievedbyusingreset
ars [6℄,onneting plaesto transitionsand indiatedby
⋆
's in the diagrams,whihalwaysemptytheirsoureplae.Formally,resetars
Reset ⊆ Pl × Tr
donothaveanyinueneontheenablednessofastep
U
,butthealulationofthemarkingofaplae
q
aftertheringofU
(nowaset)atmarkingM
hangesto:M ′ (q) =
M (q) − |q • ∩ U | + | • q ∩ U |
if({q} × U ) ∩ Reset = ∅
| • q ∩ U |
otherwise.
Theresultingptia-netwithresetars
N II (A 0 )
isshowninFigure1(b
).Tran-sition
r
is always enabled and, when red, removes all the tokens from theplaesmodellingtheentities.ForthenetinFigure1(
b
),thenewringrulegives{x, z} [{r, a, c}i max {y, z, z}
and{x, x, x, z} [{r, a, c}i max {y, z, z}
.OneanthenshowthataounterpartofTheorem1holdsalsointhisase,with
ν II
denedasν I
beforeandϕ II (U ) = U \ {r}
.Astransitionr
isalwaysenabled,wenowhaveaone-to-oneorrespondenebetweengroupsofexeutedreationsandtransitions,
attheprieofintroduingnon-standardresetars.
Toremove theneed to have resetars or,equivalently, to obtainaone-to-
oneorrespondenebetweenstatesandmarkings,oneouldhangetherulesfor
insertingtokensintoplaes,bybasiallyapplyinganOR-treatmentforarriving
tokens. This would, of ourse, be aradial departure from the standard Petri
netapproah,butoneworthinvestigating.Theresultingmodelof set-nets will
bedesribedinSetion5.
4 Reation systems and high-level Petri nets
Thetwotranslationsdesribedintheprevioussetionuselow-levelpt-netsex-
tended with reset ars in addition to inhibitor and ativator ars as well as
maximalparallelism.Resetarsareanon-standardmehanismand,inpartiu-
lar,theydonotasyetsupportaausalproesssemantis.Moreover,theeetof
aresetardependsontheurrentmarkingratherthanonaxedinput/output
relationwithitsneighbourhood.Toopewiththisproblem,wewillnowoutline
twotranslationsfrom ontext-independent reationsystemsto high-level Petri
nets. We assume familiarity with the basi oneptsof high-level nets [13℄,in
partiular, ar insriptions, ativatorand inhibitor ars, and simple transition
guards.
MethodIII. Thersttranslationisillustratedbythehigh-levelnet
N III (A 0 )
shownin Figure2(
a
).Inthisase,tokensarepositiveintegersatingasthoughtheyweretime-stamps.Intuitively,atoken
n
isativeonlyinthen
-thexeutionyle ofthereationsystem.Beause thesametoken annotbeaessedmore
thanoneinastepsequeneevolution,resetarsarenotneededanymore.Sine
the
X
transition res in eah maximal step, the yle numbern
held in the`lok'plae
clk
isknowntoalltransitionsrepresentingreations.Intheplaes representingentities,theyhekonlyfortokensn
,ignoringalltheothertokensproduedinpreviousyles,andthenproduetokenswithvalue
n +1
tobeusedinthenextyle.Theinitialmarking
M 0
isformedbyinsertingasingletoken1intoplae
clk
andalltheplaess
suhthats ∈ C 0
.Notethat theresultingnetmaybeunboundedasthetokensinplaesrepresentingentitiesarenot`garbage
olleted'.Forthehigh-levelnet
N III (A 0 )
in Figure2(b
),wehave:{x 7→ {1}, y 7→ ∅ , z 7→ {1}, w 7→ ∅ , clk 7→ {1}}
[{a n7→1 , c n7→1 , X n7→1 }i max
{x 7→ {1}, y 7→ {2}, z 7→ {1, 2, 2}, w 7→ ∅ , clk 7→ {2}}
[{b n7→2 , c n7→2 , X n7→2 }i max
{x 7→ {1, 3}, y 7→ {2}, z 7→ {1, 2, 2, 3, 3}, w 7→ ∅ , clk 7→ {3}} .
(a) N III (A 0 )
1 x
y
1 z
w
1
clk X
a
b
c
n
n + 1
(b) N IV (A 0 )
1 x
y
1 z
w
1 clk a
1 clk b
1 clk c
n n + 1
n n + 1
a y
a x hm ≥ ni a
b
c
n n + 1
n n + 1
m
n n + 1
Fig.2. Method III and IV representations of reation system
A 0
. Note thatn
andm
are net variables, and that to avoid lutter not all ars have been annotated: allthe ow(thiker)arsto plaes
x
,y
,z
are infatannotatedwithn + 1
,and all theunannotated inhibitor and ativator arsare annotatedwith
n
. In(b
), the auxiliaryplaesfortransitions
b
andc
areomitted.Notethathm ≥ ni
istheguardoftransitiona x
,andallothertransitionshavethetrivialtrue
guard.AsintheaseofMethodI,noteverymarking
M
ofN III (A)
anrepresentavalidstateofthereationsystem
A
.WesaythatM
islok-onsistent ifthere isasingletokenk
inplaeclk
,andallthetokensl
inotherplaessatisfyl ≤ k
.Relatingtheresultingnetandtheoriginalreationsystemanbedoneusing
the following two mappings:
ν III (M ) = {s ∈ S | ||M (clk )|| ∩ ||M (s)|| 6= ∅ }
and
ϕ III (U ) = U \ { X }
. One anshowthatM 0
is alok-onsistentmarking satisfyingν (M 0 ) = C 0
,andifM
isalok-onsistentmarkingandM [U i max M ′
then
M ′
isalso lok-onsistent.Theorem2. If
M
isalok-onsistentmarkingthen:1.
M [U i max M ′
impliesν III (M ) ϕ = III ⇒ (U) ν III (M ′ )
.2.
ν III (M ) = R ⇒ C
impliesM [U i max M ′
forsomeU
andM ′
satisfying:ϕ III (U ) = R
andν III (M ′ ) = C
.MethodIV. Intheseond high-levelnetonstrutiontheaimis toeliminate
theneedformaximalparallelismusinginformationpresentinthetime-stamped
tokens.Wereplaetheglobal
clk
plaebyindividualclk a
plaes,whihareinre-mentedbytransitions
a
representingreations.Moreover,whenevera
isblokedfrom ring in aertain yle oneof the auxiliarytransitions orresponding to
thepossible`reasons'forthebloking
a
isredto inrementthetoken inclk a
.This results in an inrement of the yle number for this transition (in ase
there is more than one reason for bloking, an auxiliary transition is hosen
non-deterministially).
Therearetwopossiblereasonswhy
a
mightbeblokedinylen
.Oneisthepreseneofatoken
n
intheplaerepresentinganinhibitorofa
,andtohekforthisweuseatransitionwithanativatorar,e.g.,
a y
inFigure2(b
).Theotherismoreompliatedasitisalakoftoken
n
intheplaerepresentingareatants
for
a
,andtohekforthisweuseatransitionwithaninhibitorar.However,wealsoneedtoensurethatalltransitionswhihfeedtokensto
s
havealreadyhadahane todoso,andwehekthisusing extraativatorarstogetherwitha
transitionguardwhihevaluatestotrueifallsuhfeedingtransitionshavetheir
loalylesuientlyhigh,e.g.,transition
a x
inFigure2(b
).Theoverallresultforthereationsystem
A 0
isahigh-levelnetN IV (A 0 )
showninFigure2(b
).Theresultinghigh-levelnetisexeutedaordingtothestandardsequential
(interleaving)ringruleand itsbehaviourloselysimulatesthat ofthenetob-
tainedbyMethodIII,andsoalsothebehaviouroftheoriginalreationsystem.
We skip the full desription of the relationship between these twonets. Intu-
itively,amarking
M
oftheseondtranslationorrespondsdiretlytoamarking of therst oneifall theplaes of theformclk a
ontainthe samesingletokenk
,andallthetokensl
in otherplaessatisfyl ≤ k
.(Notethatfromeahreah-ablemarkingoftheseondtranslationoneanexeuteasequeneoftransitions
leadingtoamarkingwiththisproperty.)
5 Set-nets
Inourattemptstoobtainadiretandeleganttranslationfromreationsystems
into Petrinets,amajorand asfaraswe antellinsurmountableproblem was
the fat that several transitions may insert tokens into a plae representing
the preseneof asingle entity. Inthis setion, we introdue set-nets,amodel
thatresultedfromloserinvestigationsintothepossibilitiesofanOR-treatment
of arriving tokens representing the prodution of entities by reations. Note
that OR-treatmentofausalityhasbeenonsidered in[20℄,butthe underlying
prinipletherewasompletely dierentfromwhatwearegoingtopropose.
Themain idea is that in aset-netthere is noonept of ounting. Plaes
aremarkedornotmarkedandarshavenoweights.Set-nets resembleelemen-
tarynetsystems(en-systems)[19℄whihisafundamentalmodeltostudybasi
features of onurrentsystems, inluding onit, ausalityand independene.
However,theirexeutionsemantisis dierent.Inset-nets,amarkedplaein-
diatesthepreseneofaresourewithoutanyquantiation.Heneanynumber
of transitions that take input from this plae an be red at the same time.
Moreover,ringatransitionemptiesallitsinputplaes.Thustherearenoon-
itsovertokensinset-nets,unlikein en-systemsorpt-nets.Similarly,plaes
donotountthetokens,andthering ofatransitionsimplymarkseah ofits
outputplaes(whetherornottheywerealreadymarked).Wewillbuild upthe
newmodelin twostages,introduingrstset-netswithonlyowars.
(a) r
q s r ↓
q ↓
s ↓
a
b
(b) q
s
r q
r b q
q ↓
s ↓
r ↓
a b q ↓
Fig.3. A set-netrepresenting reation system
A 1 (a)
; and an ourrene net on-strutedforitsstepsequene
{b, q ↓ , s ↓ }{a, b, r ↓ , q ↓ } (b)
.Denition6 (basi set-net). A tuple
SN = (Pl , Tr, Flw , M 0 )
is a (basi)set-netif therstthreeomponentsareas inDenition4, and
M 0 ⊆ Pl
istheinitial marking(ingeneral,any setof plaesisa marking).
Thegraphialrepresentationof set-netsisthesameasinthe aseof Petri
nets.Wenowformalisetheringruleforset-nets.
Denition7 (marking hange). A setof transitions
U
(also alleda step)is enabledata marking
M
if• U ⊆ M
.In suha ase,U
an be redwith itseeton
M
beinggivenbytheresultingmarkingM ′ = (M \ • U )∪U •
.Wedenotethis by
M [UiM ′
.Moreover, ifU
isthe setof alltransitions enabledatM
(i.e.,all transitions
t
satisfying• t ⊆ M
),thenwe maywriteM [Ui max M ′
.Heneastep
U
enabledatamarkingM
mayontaintwodistinttransitionst
andu
forwhih• t ∩ • u 6= ∅
ort • ∩ u • 6= ∅
and yet the ommonplaes will neverontainmorethanonetoken.Sinetokensaremanipulatedusingset-basedarithmeti wehavehosenthename`set-nets'forthenewlassofPetri nets.
We have introdued rst basi set-nets (without inhibitor and ativator
ars), as it seems that one anattempt to develop for them aounterpart of
`struturetheory'ofpt-nets.Toillustrateourpoint,letusonsiderabasiset-
net
SN = (Pl, Tr, Flw , M 0 )
with at least one transition. A non-empty set of plaesSphn ⊆ Pl
is alled asiphon if• Sphn ⊆ Sphn •
. Similarly, anon-emptyset ofplaes
Trap ⊆ Pl
isalled atrap ifTrap • ⊆ • Trap
.It anbeeasilyseenthat an empty siphon annot aquire a token by ring any transition, and a
markedtrap annot beome empty by ring anytransition. Both type of sets
of plaes anbe used to provide asuient onditionfor deadlok-freenessin
pt-netswhihwasamajormotivationbehindthedevelopmentoftheirstruture
theory.Asitturnsout,thesameanbedonein aseof set-nets.
Theorem3. If in the initial marking, every siphon ontains a marked trap,
thenthe set-netisdeadlok free.
Wenextintrodueset-netswithinhibitorandativatorars.
Denition8 (set-net). Atuple
SNIA = (Pl , Tr, Flw , Inh, Act , M 0 )
isa set-net if the rst ve omponents are as in Denition 4, and the last one as in
Denition 6.
Thedenitionsandnotationsonerningthemarkinghangein
SNIA
arethesameasfor
SN
inDenition7withoneexeption,namelyasetoftransitionsU
isenabledatamarking
M
if• U ∪ U ⊆ M
and◦ U ∩ M = ∅
.Itisinterestingto observethatanenabledstepU
isalwaysonsistentinthesensethat( • U ∪ U )∩
◦ U = ∅
. Suh aproperty hasa naturaland diret (as wewill see) onnetion withthenotionofonsistenyintroduedforreationsystems.Asbefore, givenatransition
t
representingareation,thesets• t
,◦ t
andt
orrespond to thereatants,inhibitors andprodutsof this reation.However,
wedo not require that these sets be non-empty in a set-net (at least at this
point)assuhanassumptionisnotneessary.
6 Reation systems and set-nets
Reationsystems and set-netst together well in thesense that both donot
ount tokens and both hange states on the basis of the presene/absene of
resoures,representedbysets.Moreover,undertheset-netsemantis,ordinary
ars(transitions)anbeusedtoemptyplaes.Inthissemantis,resetarswith
theireetdependingontheurrentnumberoftokensinaplaearemeaningless.
Finally,followingtheassumptionthat allreationsthat antakeplaedo take
plae,themaximalset-semantisanbeemployed.
Figure 3(
a
) depits a set-net orresponding to a ontext-independent ini- tialisedreationsystemA 1 = ({r, q, s}, {a, b}, {q, s})
,wherea = ({r, q}, ∅ , {r})
and
b = ({q}, ∅ , {r, q})
.(Forreasonsoflarity,weallowinthissetionreationswithoutanyinhibitors.) Asbefore, plaes represententities.Transitions
r ↓
,q ↓
and
s ↓
ensurethat one theset-net isativeonlytokens produedin thelastmaximalsteparepresentintheurrentmarking.Forexample,wehave:
{q, s} [{b, q ↓ , s ↓ }i max {r, q} [{a, b, r ↓ , q ↓ }i max {r, q} ,
andso
σ = {b, q ↓ , s ↓ }{a, b, r ↓ , q ↓ }
isamax-stepsequene.Relatingthebehaviourof theset-netmodeland theoriginal reationsystemis easyand weobtaina
ounterpartofTheorem1with
ν(M ) = M
andν(U ) = U \ {s ↓ | s ∈ S}
.For a set-net without inhibitor and ativator ars as in Figure 3(
a
), onean investigate the ausality semantis of reation systems based on the un-
foldings of the orresponding set-nets. Figure 3(
b
) showshow suh an our-renenetouldbederivedfortheset-netinFigure 3(
a
)anditsstepsequene{b, q ↓ , s ↓ }{a, b, r ↓ , q ↓ }
whih orrespondsof the state sequene{b}{a, b}
of theoriginal reation system.It is worthobserving that the proess hasbranhing
plaes whih isnotpossible,in theaseof proessesof en-systemsorpt-nets.
This,however,isfullyonsistentwiththeexeutionsemantisof set-nets.
Modelling inhibitionaspetsofreations is ratherstraightforwardusingin-
hibitorars,asillustratedbytheset-netinFigure4(
a
),representingtheontext- independentinitialisedreationsystemA 2 = ({r, q, s}, {a, b}, {q})
,where:a = ({r, q}, ∅ , {r})
andb = ({q}, {s}, {r, q})
andc = ({q}, ∅ , {s}) .
Using inhibitor ars givesa ompat translation of reationsystems whih is
in asenseminimal w.r.t.thenumberofplaes, arsandtransitions. Moreover,
relatingthebehaviouroftheresultingset-netsandtheoriginalreationsystems
an be doneas before. Formally,the plaes, transitions and initial marking of
thetranslationaregivenby:
Pl = S
,Tr = A ∪ {s ↓ | s ∈ S}
andM 0 = C 0
.Therearenoativatorars, andtheowandinhibitorarsareasfollows:
Flw = {(s, s ↓ ) | s ∈ S } ∪ {(s, a) | a ∈ A ∧ s ∈ R a } ∪ {(a, s) | a ∈ A ∧ s ∈ P a } Inh = {(s, a) | a ∈ A ∧ s ∈ I a } .
Thedevelopmentofaausalproesssemantisof set-netswithinhibitorarsis
morediult.It isthereforeinterestingtoonsider modelsof reationsystems
usingset-netswithoutanyinhibitorars,asoutlinednext.
Figure4(
b
)showsaset-netwithoutinhibitorarsmodellingA 2
.Thewayinwhihitdoesitisnowmoreinvolved.Morepreisely,eahexeutionstepofthe
reationsystemissimulatedintwophasesbytheset-netoperatingaordingto
themaximal parallelismexeutionsemantis.Tokeepthesetwophaseslearly
separated,theyareontrolledbyanadditionalylisubnetwithtwoplaes.The
keyaspet oftheonstrutionistheuseof a`omplement'
s cpl
ofthe`regular'plae
s
whihatthetimeofhekingwhethers
isemptybyreationb
ontainsatokeni
s
isempty.Figure4(
c
)providesageneripitureofhow,intheproposedonstrution, aset-net(without inhibitorars)handles anentityr
inits roleasareatant,inhibitor,andprodut.Notethat
r
isrepresentedbytwoplaes,r
andr cpl
,andif
r cpl
ismarkedthentheentityr
inabsentintheurrentstate.Moreover,eahreation
d
is representedbytwotransitions,d
andd ′
.The rstorresponds totheenablingstageof
d
,andtheseondtothegenerationofitsproduts.Therst phase of the simulation always startsin aonsistent marking
M
in whih there is a token in plae
phI
; for everys ∈ S
,s ∈ M ⇔ s cpl ∈ / M
,and otherwise all plaes are empty. Inthis phasetransitions orresponding to
reationsbeome ativeonthebasisof thepreseneandabsene oftheirrea-
tantsandinhibitors.Simultaneously,transitionsoftheform
r ↓
andr ↑
takearethatalltheentitiespresentintheurrentstateeasetoexist(theirorrespond-
ing plaesareemptied and theomplement plaeslled). Intheseond phase,
eahenabled transition
d ′
nishestheexeutionof theorrespondingreation, andmarkstheplaes orrespondingto theentities produedbyreationd
andemptiestheiromplements.
Relatingthebehaviouroftheset-netmodelandtheoriginalreationsystem
ismoreompliated,usingthefollowingtwomappings:
ν(M ) = M \({phI }∪{s cpl | s ∈ S}) ϕ(U ) = U \({I}∪{s ↓ | s ∈ S}∪{s ↑ | s ∈ S}) .
(a) r
q s r ↓
q ↓
s ↓
a b c
(b) phI
phII II
I
r q s s cpl r ↓
q ↓
s ↓
s ↑
a b c
a ′ b ′ c ′
(c) r
r cpl r ↓
r ↑
a
c b
a ′
c ′ b ′
Fig.4. Twoset-netsrepresenting
A 2
(a, b
).Generitranslationwithoutinhibitorars:here
r
isareatantforreationa
,produtforb
,andinhibitorforc
(c
).Notethatnotallplaesandarsareshown;inpartiular,eahreationhasatleastonereatantand
henetransitionslike
c
anonlyreintherstphase.Oneanthenshowthat
M 0
isonsistentandsatisfyingν(M 0 ) = C 0
,and ifM
isaonsistentmarkingand
M [U i max M ′′ [U ′ i max M ′
thenM ′
isalsoonsistent.Theorem4. If
M
isaonsistent markingthen:1.
M [U iM ′′ [U ′ iM ′
impliesν(M ) ϕ(U) = ⇒ ν(M ′ )
.2.
ν(M ) = R ⇒ C
impliesM [U iM ′′ [U ′ iM ′
for someU
,U ′
,M ′
andM ′′
satisfy-ing:
ϕ(U ) = R
andν (M ′ ) = C
7 Related work and onluding remarks
Whenintroduinganewlassof Petrinets,espeiallyafundamental one,itis
neessarytoputitintheontextofexistingformalisations.Tomakeomparison
fair,wewillnowdroptheassumptionaboutmaximalparallelismintheexeution
of set-nets(whih isimplied bytheexeution mode ofreationsystems), and
onsidersemantiswhihallowsanysetofenabledtransitionstobered.
Set-netsaresosimplewhenitomestotheirdenition,thatitisreasonable
toexpetthattherewereinthepastnetlasseswithsimilarfeatures.Indeed,the
fundamentallassof en-systems[19℄extendedwithinhibitoraswellasativator
ars [12,17,18℄ basially havethe samestati struture as set-nets.However,
their treatment of onits between transitions aessing the same token, as
wellblokingatransitionwhihouldaddatokentoamarkedplae,aretotally
(a)
q
a b
c (b)
q 0 q 1
a 0 a 1 b 0
b 1 c
Fig.5.Boolean net(set-net withsequentialsemantis) (
a
), and1-safept-netsimu-latingits(sequential)behaviour(
b
).dierent.Thelatterissuehasbeennotedinthepast,andtheonstraintrelaxed.
Forexample,therearevariationsofPetrinets,suhasBooleanPetrinets,where
addingatokentoanalreadymarkedplaedoesnotaddanothertoken[4,5,11℄.
Also,behaviourofthiskindwasmentionedin[1℄intheontextofnetsynthesis.
Having said that, the semantis onsidered in prior works known to us was
based on single transition rings, rather than (maximal) steps as is the ase
for set-nets.Therefore,the previousmodelswerenotonerned withmultiple
inputs of tokensto asingle plae somethingwhih is essentialif onewants to
faithfully model reation systems. Furthermore, by aiming at a set-semantis,
we had to introdue the non-onit feature on the ow ars onsuming the
tokens. Therefore,asfar as weare aware,the model of set-nets is anoriginal
ontributiontotheeld ofPetri nets.
Aswealreadymentioned,set-netswith interleavingsemantisarenothing
but Boolean nets used, for instane, in [5℄.In suh aase, the lak of onit
whenringtwotransitionssharinganinputplaeisanirrelevantissue,andthe
onlynon-standardaspetsisthatringatransitionwithamarkedoutputplae
does notinreasethetoken ountin that plae. Suh afeature, moreover,an
easilybemodelledusingordinary1-safept-nets,aordingtothefollowingidea.
First, one splits eah plae
q
into plaesq 0
andq 1
, respetively representing the lak and presene of a token inq
. Then, eah transitiont
adding tokensto plae
q
is split intot 0
andt 1
to aount for two dierent states the plaeq
an be in represented byq 0
andq 1
. Figure 5 illustrates this onstrution.It an be easily seenthat both nets generatethe same sequential reahability
graphsassumingthat
a 0
anda 1
areinstanes ofa
,andb 0
andb 1
areinstanesof
a
. However, one we start treating the net in Figure 5(a
) as set-net, thesituation hanges radially. The reason is that we then have three rings of
thefollowingform:
∅ [{a}i{q}
,∅ [{b}i{q}
and∅ [{a, b}i{q}
.Now,thestandardlasses ofPetri netsenjoythe so-alledsubset propertywhih means that ifa
step
U
isenabledatmarkingM
,thenalsoanyofitssubsetsisenabledaswell.Suppose,then,thatthereisaPetrinet
N
satisfyingthispropertyandsuhthatits step reahability graph is the same asthat of the set-net in Figure 5(
a
),perhapsafter renaming
λ
being applied to thetransitions of theformer. Then wehavetohavetwotransitions,t
andu
,inN
suhthatλ(t) = a
,λ(u) = b
andM 0 [{t, u}iM
. Then, by the subset losure property, we also haveM 0 [{t}iM ′
and
M 0 [{u}iM ′′
.Hene,by thereahabilitygraphisomorphism,wemusthaveM = M ′ = M ′′
aswellasM 0 6= M
.Henewehave:M 0 [{t, u}iM
andM 0 [{t}iM
and
M 0 [{u}iM
andM 0 6= M
. In the standard Petri nets, inluding variousextensionsofpt-nets,
M 0 [{t, u}iM
andM 0 [{t}iM
wouldimplythatu
doesnothangetheurrentmarking.Similarly,
M 0 [{t, u}iM
andM 0 [{u}iM
wouldimplythat
t
doesnothangetheurrentmarking.Yetthesimultaneousringoft
andu
does hange the marking asM 0 6= M
. This would produe a ontradition.Whatwejust presentedisintuitionratherthanproof,however,weexpet that
detailed arguments an be developed for any of the standard net lasses. An
importantonsequene,however,isthatset-netsaresemantiallydierentfrom
the existing net lasses and therefore deserve to be reognised as an original
ontribution.
8 Conlusions
ThemaininitialmotivationofourinvestigationwastoseehowPetri netbased
oneptsouldbedeployedtoanalysereationsystems.Inpartiular,wewanted
todisovermethodsforhekingpropertiesofreationsystemsbyrelatingthem
tothepropertiesof theorrespondingPetrinetsandausalproesses.
We proposed modelling methods resulting both in low-level and high-level
nets.Inallfourases,weestablishedaloseorrespondenebetweenthemark-
ingsofPetrinetsandstatesoftheoriginalreationsystems.Thesamewastrue
oftheevolutionsoftwoorrespondingmodels.Infat,weestablishedthatthey
haveessentiallyisomorphistatespaes.Allthesenetmodels,however,exhibited
deienies w.r.t.simpliity and/oreleganeand/or tratabilityof thetransla-
tion.For example,bothhigh-levelnetmodelsareintrinsiallyunbounded, and
the seond of thelow-leveltranslations usesreset ars. We thereforeproposed
anewlassofPetrinets,alled set-nets,whihwefeelprovideastrongmath
withthereationsystemsandtheirsemantis.
Inthiswaywethinkwederivednewinterestingnotionsandontributionsto
Petrinettheorybasedonourexperieneswithreationsystemsinasimilarway
astheoneptsofloalitiesandloallymaximalonurrenywerederivedfrom
ourpreviousinvestigationofaPetrinetsemantisofmembranesystems[15℄.
Aknowledgement Wewouldliketothanktheanonymousreviewersfortheir
suggestions and omments. This researh was supported by the Pasal Chair
awardfrom LeidenUniversityandtheEpsrVerdadprojet.
Referenes
1. E.BadouelandP.Darondeau:Theoryofregions.LetureNotesinComputerSiene
1491 (1998)529586
2. R.Brijder,A.Ehrenfeuht,M.G.MainandG.Rozenberg:Reationsystemswithdu-
ration.LetureNotesinComputerSiene6610(2011)191202
3. R.Brijder, A.Ehrenfeuht,M.G.Main andG.Rozenberg:A TourofReation Sys-
tems.Int.JournalofFoundationsofComputerSiene(2011)
4. L.Czaja:ACalulusofNets.CybernetisandSystemsAnalysis29(1993)185-193
5. P.DeBra, G.J.Houben and Y.Kornatzky: A Formal Approah to Analyzing the
BrowsingSemantisofHypertext.Pro.CSN-94Conferene(1994)7889
6. C.Dufourd,A.Finkel,and Ph.Shnoebelen:Reset Nets BetweenDeidability and
UndeidabilityLetureNotesinComputerSiene1443(1998)103-115
7. A.Ehrenfeuht, M.Main and G.Rozenberg: Combinatoris of Life and Deathfor
ReationSystems.Int.J.ofFoundationsofComputerSiene22(2009)345356
8. A.EhrenfeuhtandG.Rozenberg:ReationSystems.FundamentaInformatiae76
(2006)118
9. A.EhrenfeuhtandG.Rozenberg:EventsandModulesinReationSystems.The-
oretialComputerSiene376(2007)316
10. A.EhrenfeuhtandG.Rozenberg:IntroduingTimeinReationSystems.Theoret-
ialComputerSiene410(2009)310322
11. M.Heiner,D.Gilbertand R.Donaldson: PetriNetsfor Systemsand SynthetiBi-
ology.LetureNotesinComputerSiene5016(2008) 215264
12. R.JanikiandM.Koutny:SemantisofInhibitorNets.InformationandComputa-
tion123(1995)116
13. K.Jensen:ColouredPetriNetsandtheInvariant-Method.TheoretialCompututer
Siene14(1981)317-336
14. J.KleijnandM.Koutny:ProessesofPetriNetswithRangeTesting.Fundamenta
Informatiae80(2007)199219
15. J.Kleijn,M.Koutny andG.Rozenberg:ProessSemantisfor MembraneSystems.
JournalofAutomata,LanguagesandCombinatoris11(2006)321340
16. J.Kleijn, M.Koutny and G.Rozenberg: Modelling Reation Systems with Petri
Nets.TehnialReportCS-1244.NewastleUniversity(2011
17. M.KoutnyandM.Pietkiewiz-Koutny:SynthesisofElementaryNetSystemswith
ContextArsandLoalities.FundamentaInformatiae88(2008)307328
18. U.MontanariandF.Rossi:ContextualNets.AtaInformatia32(1995)545596
19. G.Rozenberg and J.Engelfriet: ElementaryNet Systems.Leture Notes inCom-
puterSiene1491 (1998)12121
20. A.Yakovlev, M.Kishinevsky, A.Kondratyev and L.Lavagno: et al: OR Causality:
ModellingandHardwareImplementation.LetureNotesinComputerSiene815
(1994)568587