Upload
smennicke
View
374
Download
4
Tags:
Embed Size (px)
Citation preview
An Operational Petri Net Semantics for theJoin-Calculus
Stephan Mennicke
EXPRESS/SOS 2012September 3, 2012
Motivation I
Distributed SystemsConsist of components on different locationsResource conflicts are solved locallyNo concurrency on componentsCommunication between components is asynchronous
Distributable SystemsGiven a specification. It is distributable if there exists an implementationthat is distributed.
van Glabbeek et al. characterize these notions and criteria in terms ofPetri nets
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 2 / 17
Motivation II
Interesting structure:p q
t1 t2 t3
The M is not distributedA net is distributable iff it is M-free [van Glabbeek et al.]
Starting point for this work: There is this interesting formalism which isdesigned to be distributable.
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 3 / 17
Motivation II
Interesting structure:p q
t1 t2 t3
The M is not distributedA net is distributable iff it is M-free [van Glabbeek et al.]
Starting point for this work: There is this interesting formalism which isdesigned to be distributable.
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 3 / 17
Meet the Reflexive Chemical Abstract Machine[Fournet and Gonthier 1996]
x〈k〉 | y〈v〉 . k〈v〉
x〈c〉 | a〈2〉
y〈3〉 | a〈1〉
y〈3〉x〈c〉 a〈1〉
a〈2〉x〈c〉 | y〈3〉
a〈1〉
a〈2〉 ⇀[Berry and Boudol 1990]
↽→
c〈3〉
a〈1〉
a〈2〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 4 / 17
Meet the Reflexive Chemical Abstract Machine[Fournet and Gonthier 1996]
x〈k〉 | y〈v〉 . k〈v〉
x〈c〉 | a〈2〉
y〈3〉 | a〈1〉
y〈3〉x〈c〉 a〈1〉
a〈2〉x〈c〉 | y〈3〉
a〈1〉
a〈2〉 ⇀[Berry and Boudol 1990]
↽→
c〈3〉
a〈1〉
a〈2〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 4 / 17
Meet the Reflexive Chemical Abstract Machine[Fournet and Gonthier 1996]
x〈k〉 | y〈v〉 . k〈v〉
x〈c〉 | a〈2〉
y〈3〉 | a〈1〉
y〈3〉x〈c〉 a〈1〉
a〈2〉x〈c〉 | y〈3〉
a〈1〉
a〈2〉
⇀[Berry and Boudol 1990]
↽→
c〈3〉
a〈1〉
a〈2〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 4 / 17
Meet the Reflexive Chemical Abstract Machine[Fournet and Gonthier 1996]
x〈k〉 | y〈v〉 . k〈v〉
x〈c〉 | a〈2〉
y〈3〉 | a〈1〉
y〈3〉x〈c〉 a〈1〉
a〈2〉
x〈c〉 | y〈3〉
a〈1〉
a〈2〉
⇀[Berry and Boudol 1990]
↽→
c〈3〉
a〈1〉
a〈2〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 4 / 17
Meet the Reflexive Chemical Abstract Machine[Fournet and Gonthier 1996]
x〈k〉 | y〈v〉 . k〈v〉
x〈c〉 | a〈2〉
y〈3〉 | a〈1〉
y〈3〉x〈c〉 a〈1〉
a〈2〉
x〈c〉 | y〈3〉
a〈1〉
a〈2〉 ⇀
[Berry and Boudol 1990]↽
→
c〈3〉
a〈1〉
a〈2〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 4 / 17
Meet the Reflexive Chemical Abstract Machine[Fournet and Gonthier 1996]
x〈k〉 | y〈v〉 . k〈v〉
x〈c〉 | a〈2〉
y〈3〉 | a〈1〉
y〈3〉x〈c〉 a〈1〉
a〈2〉
x〈c〉 | y〈3〉
a〈1〉
a〈2〉
⇀
[Berry and Boudol 1990]↽
→
c〈3〉
a〈1〉
a〈2〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 4 / 17
Meet the Reflexive Chemical Abstract Machine[Fournet and Gonthier 1996]
x〈k〉 | y〈v〉 . k〈v〉
x〈c〉 | a〈2〉
y〈3〉 | a〈1〉
y〈3〉x〈c〉 a〈1〉
a〈2〉
x〈c〉 | y〈3〉
a〈1〉
a〈2〉
⇀
[Berry and Boudol 1990]
↽
→
c〈3〉
a〈1〉
a〈2〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 4 / 17
Meet the Reflexive Chemical Abstract Machine[Fournet and Gonthier 1996]
x〈k〉 | y〈v〉 . k〈v〉
x〈c〉 | a〈2〉
y〈3〉 | a〈1〉
y〈3〉x〈c〉 a〈1〉
a〈2〉x〈c〉 | y〈3〉
a〈1〉
a〈2〉 ⇀
[Berry and Boudol 1990]
↽
→
c〈3〉
a〈1〉
a〈2〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 4 / 17
The (Core) Join-CalculusSyntax and Semantics [Fournet and Gonthier 1996]
Syntax
P ::= 0 x〈v〉 P |P def x〈u〉|y〈v〉 . P inP
Semantics` P |Q ` P,Q` def D inP Dσdv ` Pσdv
J . P ` Jσrv → J . P ` Pσrv
In the paper: LTS-Semantics
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 5 / 17
The (Core) Join-CalculusSyntax and Semantics [Fournet and Gonthier 1996]
Syntax
P ::= 0 x〈v〉 P |P def x〈u〉|y〈v〉 . P inP
Semantics` P |Q ` P,Q` def D inP Dσdv ` Pσdv
J . P ` Jσrv → J . P ` Pσrv
In the paper: LTS-Semantics
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 5 / 17
Petri Nets
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 6 / 17
Net Semantics and the Join-Calculus
Why Net Semantics?Induce a step semantics on top of the natural oneMake Petri net theory/tools available for JoinTransfer phenomena between Petri nets and Join
Existing Net SemanticsBuscemi and Sassone 2001Bruni et al. 2006
Shared ProblemConcurrency!
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 7 / 17
Net Semantics and the Join-Calculus
Why Net Semantics?Induce a step semantics on top of the natural oneMake Petri net theory/tools available for JoinTransfer phenomena between Petri nets and Join
Existing Net SemanticsBuscemi and Sassone 2001Bruni et al. 2006
Shared ProblemConcurrency!
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 7 / 17
Concurrent Petri Net SemanticsOverview
Ingredients1 A universe of places P
2 A decomposition function mapping Join terms to subsets of P3 A transition rule
transition rule:
dec :
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 8 / 17
Concurrent Petri Net SemanticsOverview
Ingredients1 A universe of places P2 A decomposition function mapping Join terms to subsets of P
3 A transition rule
transition rule:
dec :
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 8 / 17
Concurrent Petri Net SemanticsOverview
Ingredients1 A universe of places P2 A decomposition function mapping Join terms to subsets of P
3 A transition rule
. . .dec:
transition rule:
dec :
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 8 / 17
Concurrent Petri Net SemanticsOverview
Ingredients1 A universe of places P2 A decomposition function mapping Join terms to subsets of P3 A transition rule
. . .dec:
transition rule:
dec :
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 8 / 17
Concurrent Petri Net SemanticsOverview
Ingredients1 A universe of places P2 A decomposition function mapping Join terms to subsets of P3 A transition rule
. . .
D
dec:
transition rule:
dec :
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 8 / 17
Example
def c〈v〉 . v〈〉︸ ︷︷ ︸D1
in def a〈k〉 | b〈v〉 . k〈v〉︸ ︷︷ ︸D2
in a〈c〉 | b〈42〉
a〈c〉 b〈42〉
c〈42〉42〈〉
D2
D1
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 9 / 17
Example
def c〈v〉 . v〈〉︸ ︷︷ ︸D1
in def a〈k〉 | b〈v〉 . k〈v〉︸ ︷︷ ︸D2
in a〈c〉 | b〈42〉
a〈c〉 b〈42〉
c〈42〉42〈〉
D2
D1
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 9 / 17
Example
def c〈v〉 . v〈〉︸ ︷︷ ︸D1
in def a〈k〉 | b〈v〉 . k〈v〉︸ ︷︷ ︸D2
in a〈c〉 | b〈42〉
a〈c〉 b〈42〉
c〈42〉
42〈〉
D2
D1
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 9 / 17
Example
def c〈v〉 . v〈〉︸ ︷︷ ︸D1
in def a〈k〉 | b〈v〉 . k〈v〉︸ ︷︷ ︸D2
in a〈c〉 | b〈42〉
a〈c〉 b〈42〉
c〈42〉42〈〉
D2
D1
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 9 / 17
Examples with Concurrency
1 def x〈v〉 . P inx〈EXPRESS〉 | def y〈w〉 . Q in y〈SOS〉
2 def x〈v〉 . P in def y〈w〉 . Q inx〈EXPRESS〉 | y〈SOS〉3 def x〈v〉 . P inx〈a〉 |x〈b〉4 def k1〈〉 . P1 in . . . def kn〈〉 . Pn in def cons〈〉 .k1〈〉 | . . . | k2〈〉 in cons〈〉
x〈EXPRESS〉
y〈SOS〉
P
Q
x〈v〉 . P
y〈w〉 . Q
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 10 / 17
Examples with Concurrency
1 def x〈v〉 . P inx〈EXPRESS〉 | def y〈w〉 . Q in y〈SOS〉
2 def x〈v〉 . P in def y〈w〉 . Q inx〈EXPRESS〉 | y〈SOS〉3 def x〈v〉 . P inx〈a〉 |x〈b〉4 def k1〈〉 . P1 in . . . def kn〈〉 . Pn in def cons〈〉 .k1〈〉 | . . . | k2〈〉 in cons〈〉
x〈EXPRESS〉
y〈SOS〉
P
Q
x〈v〉 . P
y〈w〉 . Q
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 10 / 17
Examples with Concurrency
1 def x〈v〉 . P inx〈EXPRESS〉 | def y〈w〉 . Q in y〈SOS〉2 def x〈v〉 . P in def y〈w〉 . Q inx〈EXPRESS〉 | y〈SOS〉
3 def x〈v〉 . P inx〈a〉 |x〈b〉4 def k1〈〉 . P1 in . . . def kn〈〉 . Pn in def cons〈〉 .k1〈〉 | . . . | k2〈〉 in cons〈〉
x〈EXPRESS〉
y〈SOS〉
P
Q
x〈v〉 . P
y〈w〉 . Q
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 10 / 17
Examples with Concurrency
1 def x〈v〉 . P inx〈EXPRESS〉 | def y〈w〉 . Q in y〈SOS〉2 def x〈v〉 . P in def y〈w〉 . Q inx〈EXPRESS〉 | y〈SOS〉
3 def x〈v〉 . P inx〈a〉 |x〈b〉4 def k1〈〉 . P1 in . . . def kn〈〉 . Pn in def cons〈〉 .k1〈〉 | . . . | k2〈〉 in cons〈〉
x〈EXPRESS〉
y〈SOS〉
P
Q
x〈v〉 . P
y〈w〉 . Q
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 10 / 17
Examples with Concurrency
1 def x〈v〉 . P inx〈EXPRESS〉 | def y〈w〉 . Q in y〈SOS〉2 def x〈v〉 . P in def y〈w〉 . Q inx〈EXPRESS〉 | y〈SOS〉3 def x〈v〉 . P inx〈a〉 |x〈b〉
4 def k1〈〉 . P1 in . . . def kn〈〉 . Pn in def cons〈〉 .k1〈〉 | . . . | k2〈〉 in cons〈〉
x〈a〉
x〈b〉
P [a/v]
P [b/v]
x〈v〉 . P
x〈v〉 . P
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 10 / 17
Examples with Concurrency
1 def x〈v〉 . P inx〈EXPRESS〉 | def y〈w〉 . Q in y〈SOS〉2 def x〈v〉 . P in def y〈w〉 . Q inx〈EXPRESS〉 | y〈SOS〉3 def x〈v〉 . P inx〈a〉 |x〈b〉4 def k1〈〉 . P1 in . . . def kn〈〉 . Pn in def cons〈〉 .k1〈〉 | . . . | k2〈〉 in cons〈〉
x〈a〉
x〈b〉
P [a/v]
P [b/v]
x〈v〉 . P
x〈v〉 . P
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 10 / 17
Correctness of the Semantics
TheoremLet P be a (core) Join term. Then its Petri net semantics N(P ) isbisimilar to P .
We prove that R = {(J, dec(J)) | J is a Join term} is a bisimulation byinduction over the structure of P .
LemmaIf P ≡ Q for P,Q (core) Join terms. Then their Petri net representationsN(P ), N(Q) are isomorphic.
1 Our semantics is correct2 It yields a reasonable degree of concurrency
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 11 / 17
Revisiting Distributability
P = def x〈u〉 | y〈v〉 . u〈v〉︸ ︷︷ ︸D
inx〈a〉 | y〈1〉 |x〈b〉 | y〈2〉
x〈a〉
y〈1〉 x〈b〉 y〈2〉
a〈1〉 b〈1〉 b〈2〉 a〈2〉
D D D D
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 12 / 17
Revisiting Distributability
P = def x〈u〉 | y〈v〉 . u〈v〉︸ ︷︷ ︸D
inx〈a〉 | y〈1〉 |x〈b〉 | y〈2〉
x〈a〉
y〈1〉 x〈b〉 y〈2〉
a〈1〉 b〈1〉 b〈2〉 a〈2〉
D D D D
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 12 / 17
Revisiting Distributability
P = def x〈u〉 | y〈v〉 . u〈v〉︸ ︷︷ ︸D
inx〈a〉 | y〈1〉 |x〈b〉 | y〈2〉
x〈a〉
y〈1〉 x〈b〉 y〈2〉
a〈1〉
b〈1〉 b〈2〉 a〈2〉
D
D D D
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 12 / 17
Revisiting Distributability
P = def x〈u〉 | y〈v〉 . u〈v〉︸ ︷︷ ︸D
inx〈a〉 | y〈1〉 |x〈b〉 | y〈2〉
x〈a〉
y〈1〉 x〈b〉 y〈2〉
a〈1〉 b〈1〉 b〈2〉 a〈2〉
D D D D
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 12 / 17
What can we learn from Join?
In Join, the Ms above must reside on one locationvan Glabbeek et al.’s theory is not directly applicableAre there any other Ms in the Join-calculus semantics?
PropositionIf N(P ) contains an M, then all transitions belonging to this Mcorrespond to the same definition.
It is worth looking at notions for distributability using a priorly givenlocation function [Best and Darondeau 2011]
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 13 / 17
Concluding Remarks
Making Petri Net Tools AvailableIn general, the proposed semantics is infiniteStructural properties:
1 •m0 = ∅2 For all p ∈ P : |•p| ≤ 13 F+ is irreflexive
So, the semantics may be used as a starting point for Petri netunfolding based techniquesStructural properties above + transition rule ensure 1-safety
Occurrence NetsThe conflict relation is not irreflexive
=⇒ We have transitions in the resulting nets which may never fire
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 14 / 17
Concluding Remarks
Making Petri Net Tools AvailableIn general, the proposed semantics is infiniteStructural properties:
1 •m0 = ∅2 For all p ∈ P : |•p| ≤ 13 F+ is irreflexive
So, the semantics may be used as a starting point for Petri netunfolding based techniquesStructural properties above + transition rule ensure 1-safety
Occurrence NetsThe conflict relation is not irreflexive
=⇒ We have transitions in the resulting nets which may never fire
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 14 / 17
Thank You!
AppendixCounter Example I
a〈b〉 | def a〈v〉 . v〈〉 in a〈c〉
and set X = {a〈v〉 . v〈〉}:
a〈b〉 a〈c〉
b〈〉 c〈〉
a〈v〉 . v〈〉 a〈v〉 . v〈〉
a〈b〉 a〈c〉
c〈〉
a〈v〉 . v〈〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 16 / 17
AppendixCounter Example I
a〈b〉 | def a〈v〉 . v〈〉 in a〈c〉
and set X = {a〈v〉 . v〈〉}:
a〈b〉 a〈c〉
b〈〉 c〈〉
a〈v〉 . v〈〉 a〈v〉 . v〈〉
a〈b〉 a〈c〉
c〈〉
a〈v〉 . v〈〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 16 / 17
AppendixCounter Example I
a〈b〉 | def a〈v〉 . v〈〉 in a〈c〉
and set X = {a〈v〉 . v〈〉}:
a〈b〉 a〈c〉
b〈〉 c〈〉
a〈v〉 . v〈〉 a〈v〉 . v〈〉
a〈b〉 a〈c〉
c〈〉
a〈v〉 . v〈〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 16 / 17
AppendixCounter Example I
a〈b〉 | def a〈v〉 . v〈〉 in a〈c〉
and set X = {a〈v〉 . v〈〉}:
a〈b〉 a〈c〉
b〈〉 c〈〉
a〈v〉 . v〈〉 a〈v〉 . v〈〉
a〈b〉 a〈c〉
c〈〉
a〈v〉 . v〈〉
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 16 / 17
AppendixCounter Example II
def c〈v〉 . v〈〉︸ ︷︷ ︸D1
in def a〈k〉 | b〈v〉 . k〈v〉︸ ︷︷ ︸D2
in a〈c〉 | b〈42〉
a〈c〉 D2 b〈42〉 D2
c〈42〉
D2
a〈c〉 D2D1b〈42〉 D2D1
c〈42〉 D1
42〈〉
D2
D1
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 17 / 17
AppendixCounter Example II
def c〈v〉 . v〈〉︸ ︷︷ ︸D1
in def a〈k〉 | b〈v〉 . k〈v〉︸ ︷︷ ︸D2
in a〈c〉 | b〈42〉
a〈c〉 D2 b〈42〉 D2
c〈42〉
D2
a〈c〉 D2D1b〈42〉 D2D1
c〈42〉 D1
42〈〉
D2
D1
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 17 / 17
AppendixCounter Example II
def c〈v〉 . v〈〉︸ ︷︷ ︸D1
in def a〈k〉 | b〈v〉 . k〈v〉︸ ︷︷ ︸D2
in a〈c〉 | b〈42〉
a〈c〉 D2 b〈42〉 D2
c〈42〉
D2
a〈c〉 D2D1b〈42〉 D2D1
c〈42〉 D1
42〈〉
D2
D1
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 17 / 17
AppendixCounter Example II
def c〈v〉 . v〈〉︸ ︷︷ ︸D1
in def a〈k〉 | b〈v〉 . k〈v〉︸ ︷︷ ︸D2
in a〈c〉 | b〈42〉
a〈c〉 D2 b〈42〉 D2
c〈42〉
D2
a〈c〉 D2D1b〈42〉 D2D1
c〈42〉 D1
42〈〉
D2
D1
S. Mennicke (IPS) Petri Net Semantics for Join EXPRESS/SOS 2012 17 / 17