partial order semantics of types of nets robert lorenz, gabriel juhás, sebastian mauser sofsem...

Post on 26-Dec-2015

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Partial Order Semantics of Types of Nets

Robert Lorenz, Gabriel Juhás, Sebastian Mauser

SOFSEM 2009,Špindlerův Mlýn, CZ, 27th February 2009

Road plan:

Present types of (Petri) nets

Road plan:

Present types of (Petri) nets

Present semantics of types of (Petri) nets

Road plan:

Present types of (Petri) nets

Present semantics of types of (Petri) nets:

step semantics

enabled labelled partial orders (pomsets)

token flow labelled partial orders (pomsets)

To unify different types of Petri nets Badouel and Darondeau defined the notion formally

A type of (Petri) nets defined by them is given by

Set of local states – LS

Commutative monoid of local events (LE, +, 0)

Transition relation given by triples (s e s‘) from LS x LE x LS satisfying for all states s,s‘,s‘‘ and all local events e:

s e s‘ s e s‘‘ s‘ = s‘‘ and s0 s

To unify different types of Petri nets Badouel and Darondeau defined the notion formally

A type of (Petri) nets defined by them is given by

Set of local states – LS

Commutative monoid of local events (LE, +, 0)

Transition relation given by triples (s e s‘) from LS x LE x LS satisfying for all states s,s‘,s‘‘ and all local events e:

s e s‘ s e s‘‘ s‘ = s‘‘ and s0 s

A net of type is given by

Set of places – P

Set of transitions – T

Weight function – W: P x T LE

Places are holders for local states

Markings – m: P LS

Transitions occur, changing the local states of places according to the weight function:

A transition t is enabled to occur in a marking m of the net, if each place p satisfies:

there exists a local state sp for which

m(p) W(p,t) sp

For each place p occurence of the enabled transition t in m changes the local state m(p) to the state sp

22

2

a b

c

Example - Place/transition nets:

p1 p2

p3

p4

22

2

a b

c

p1 p2

p3

p4

Example - Place/transition nets:

22

2

a b

c

p1 p2

p3

p4

Example - Place/transition nets:

22

2

a b

c

Example - Place/transition nets:

p1 p2

p3

p4

Local states: nonnegative integers N (with addition)

Example - Place/transition nets:

Local events: pairs of nonnegative integers (i,o) N x N with componetwise addition

22

2

a b

c

p1 p2

p3

p4

Local states: nonnegative integers N (with addition)

Example - Place/transition nets:

Transition relation: s(i,o) s’ s i s’ = s – i + o 22

2

a b

c

p1 p2

p3

p4

Local events: pairs of nonnegative integers (i,o) N x N with componetwise addition

Local states: nonnegative integers N (with addition)

Example - Place/transition nets:

Weight function: W(p1,a) = (1,0),W(p2,a) = (0,0),W(p3,a) = (0,2),W(p4,a) = (0,0),

22

2

a b

c

p1 p2

p3

p4

Transition relation: s(i,o) s’ s i s’ = s – i + o

Local events: pairs of nonnegative integers (i,o) N x N with componetwise addition

Local states: nonnegative integers N (with addition)

Weight function: W(p1,a) = (1,0,),W(p2,a) = (0,0,),W(p3,a) = (0,2,),W(p4,a) = (0,0,0),

22

2

a b

c

p1 p2

p3

p4

Transition relation: s(i,o) s’ s i s’ = s – i + o s + o h

Local events: triples (i,o,h) N x N x (N ) with componetwise addition for i and o and minimum for h

and neutral element (0,0,)

Local states: nonnegative integers N (with addition)

Example - Place/transition nets with inhibitor arcs and

a posteriori semantics:

22

2

a b

c

p1 p2

p3

p4

Step semantics: step sequences

Steps – mulitsets of transitions occur, changing the local states of places according to the weight function:

A step x: T N is enabled to occur in a state of the net, if each place p satisfies:

there exists a local state sp‘ for which

m(p) sp‘

For each place p occurence of the enabled transition t changes the local state sp to

the state sp‘

tTx(t)W(p,t)

22

2

a b

c

p1 p2

p3

p4

Place/transition nets:

Step semantics: step sequences

22

2

a b

c

p1 p2

p3

p4

Place/transition nets:

Step semantics: step sequences

(a+b) a b

22

2

a b

c

p1 p2

p3

p4

Place/transition nets:

Step semantics: step sequences

(a+b)

2x

a b

22

2

a b

c

p1 p2

p3

p4

Place/transition nets:

Step semantics: step sequences

(a+b) (2c) a b

c c

An LPO is enabled iff

Each step linearization of the LPO is enabled step sequence,

a b

c c

22

2

a b

c

p1 p2

p3

p4

abcc, bacc, acbc, (a+b)cc, a(b+c)c, ab(2c), ba(2c),

(a+b)(2c)

For p/t nets we have:

If a step linearization of an enabled step sequence is enabled then they both lead to the same marking

(WISP), e.g.

ab(2c) and (a+b)(2c) leads to the same marking

22

2

a b

c

p1 p2

p3

p4

For p/t nets we have:

If a step linearization of an enabled step sequence is enabled then they both lead to the same marking

(WISP), e.g.

ab(2c) and (a+b)(2c) leads to the same marking

If two enabled step sequences have equal multisets of transitions, then they lead to the same marking

(PIP, PIP implies WISP), e.g.

a(b+c)c and (a+b)(2c) leads to the same marking22

2

a b

c

p1 p2

p3

p4

For p/t nets we have:

If a step linearization of an enabled step sequence is enabled then they both lead to the same marking

(WISP), e.g.

ab(2c) and (a+b)(2c) leads to the same marking

If two enabled step sequences have equal multisets of transitions, then they lead to the same marking

(PIP, PIP implies WISP), e.g.

a(b+c)c and (a+b)(2c) leads to the same marking

If a step sequence is enabled and leads to a marking m then each its step linearization is enabled and lead to

the same marking m

(ISP, ISP implies WISP but is incomparable with PIP), e.g.

(a+b)(2c) is enabled implies that ab(2c) is enabled too and leads to the same marking

22

2

a b

c

p1 p2

p3

p4

We show that:

WISP is necessary and sufficient for unique final marking of enabled LPOs

PIP is necessary and sufficient for the same final markings of enabled LPOs differing only by causality

ISP is necessary and sufficient for checking enabledness by cuts = maximal co-sets:

An LPO is enabled iff for each cut of the LPO holds:

When all events „before the cut“ have fired, then the step of transitions given by the cut is enabled

22

2

a b

c

p1 p2

p3

p4

22

2

a b

c

Place/transition nets:

Causal Structures: processes

p1 p2

p3

p4

p1 p2 p1 p2

Process 1 Process 2

22

2

a b

c

p1 p2

p3

p4

a a

p1 p2 p1 p2

Process 1 Process 2

p3 p3 p3p3

Place/transition nets:

Causal Structures: processes

22

2

a b

c

p1 p2

p3

p4

a a

p1 p2 p1 p2

p3 p3 p3 p3

Process 1 Process 2

Place/transition nets:

Causal Structures: processes

22

2

a b

c

p1 p2

p3

p4

a b a b

p1 p2 p1 p2

p3 p3 p3 p3 p3 p3 p3 p3

Process 1 Process 2

Place/transition nets:

Causal Structures: processes

22

2

a b

c

p1 p2

p3

p4

a b a b

p1 p2 p1 p2

p3 p3 p3 p3 p3 p3 p3 p3

Process 1 Process 2

Place/transition nets:

Causal Structures: processes

22

2

a b

c

p1 p2

p3

p4

a b

c

a b

c

p1 p2 p1 p2

p3 p3 p3 p3 p3 p3 p3 p3

p4 p4

Process 1 Process 2

Place/transition nets:

Causal Structures: processes

22

2

a b

c

p1 p2

p3

p4

a b

c

a b

c

p1 p2 p1 p2

p3 p3 p3 p3 p3 p3 p3 p3

p4 p4

Process 1 Process 2

Place/transition nets:

Causal Structures: processes

22

2

a b

c

p1 p2

p3

p4

a b

c c

a b

c c

p1 p2 p1 p2

p3 p3 p3 p3 p3 p3 p3 p3

p4 p4 p4 p4

Process 1 Process 2

Place/transition nets:

Causal Structures: processes

22

2

a b

c

abcc

p1 p2

p3

p4

a b

c c

a b

c c

p1 p2 p1 p2

p3 p3 p3 p3 p3 p3 p3 p3

p4 p4 p4 p4

Process 1 Process 2

a b

c c

Run 2

a b

c c

Run 1

acbc

Characterization of enabledness by extended LPOs with labelled arcs

for „flow“ types of nets

Flow types of nets:LS is a free commutative monoid

There are morphisms i and o from LE to LS satisfyingse s’ s i(e) s’ = s – i(e) + o(e)

Strict flow types of nets:se s’ s i(e) s’ = s – i(e) + o(e)

Examples for strict flow types of nets: p/t nets, coloured Petri netsExample for non strict flow types of nets: p/t nets with inhibitor arcs

a b

c c

Characterization of enabledness by extended LPOs with labelled arcs

Extension of LPOs by adding an initial node:

a b

c c

Characterization of enabledness by extended LPOs with labelled arcs

Extension of LPOs by adding an initial node:

a b

c c

v0

a b

c c

v0

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

a b

c c

v0

a b

c c

v0

a b

c c

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

v0

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

0

a b

c c

v0

a b

c c

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

v0

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

1p1

a b

c c

v00

a b

c c

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

v0

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

1p21p1

a b

c c

v00

a b

c c

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

v0

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

a b

c c

v0

1p21p1

0 0

a b

c c

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

v0

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

2p3

a b

c c

v0

1p21p1

0 0

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

a b

c c

v0

a b

c c

v0

2p3

1p21p1

0 0

2p3

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

a b

c c

v0

a b

c c

v0

2p3

1p21p1

0 0

2p3

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

a b

c c

p1 p2

p3

p3 p3

p4 p4

p3

a b

c c

v0

a b

c c

v0

2p3

1p21p1

0 0

2p3

a b

c c

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

v0

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

a b

c c

p1 p2

p3p3 p3

p4 p4

1p31p3

1p3

1p3

p3

a b

c c

v0

2p3

1p21p1

0 0

2p3

1p21p1

0 0

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

a b

c c

p1 p2

p3p3 p3

p4 p4

p3

In-token-flow of a node =Sum of ingoing labels

a b

c c

v0

1p31p3

1p3

1p3

1p21p1

0 0

a b

c c

v0

2p3

1p21p1

0 0

2p3

Characterization of enabledness by extended LPOs with labelled arcs

Token flow function:

Labelling of arcs in the LPO by multisets of places

a b

c c

p1 p2

p3 p3 p3 p3

p4 p4

a b

c c

p1 p2

p3p3 p3

p4 p4

p3

Out-token-flow of a node =Sum of outgoing labels

a b

c c

v0

1p31p3

1p3

1p3

1p21p1

0 0

a b

c c

v0

2p3

1p21p1

0 0

2p3

Characterization of enabledness by extended LPOs with labelled arcs

Token flow property: There is a token flow function s.t.

Out-token-flow of a node the number of tokens produced by the transition labelling the node

a b

c c

p1 p2

p3p3 p3

p4 p4

p3

Out-token-flow of a node =Sum of outgoing labels

a b

c c

v0

1p31p3

1p3

1p3

1p21p1

0 0

22

2

a b

c

p1 p2

p3

p4

2

Characterization of executability by extended LPOs with labelled arcs

Token flow property: There is a token flow function s.t.

Out-token-flow of a node the number of tokens produced by the transition labelling the node

In-token-flow of a node = the number of tokens consumed by the transition labelling the node

a b

c c

p1 p2

p3p3 p3

p4 p4

p3

22

a b

c

p1 p2

p3

p4

a b

c c

v0

1p31p3

1p3

1p3

1p21p1

0 0

In-token-flow of a node =Sum of ingoing labels

2

Characterization of executability by extended LPOs with labelled arcs

Token flow property: There is a token flow function s.t.

Transitions cannot comsume more than is produced by the precessors

but still have to consume the number of tokens prescribed by the net

a b

c c

p1 p2

p3p3 p3

p4 p4

p3

22

a b

c

p1 p2

p3

p4

a b

c c

v0

1p31p3

1p3

1p3

1p21p1

0 0

In-token-flow of a node =Sum of ingoing labels

Characterization of enabledness by extended LPOs with labelled arcs

Theorem (for strict flow types of nets, e.g. p/t nets or finite coloured Petri nets):

An LPO is enabled if and only if it fulfills the token flow property

(token flow property can be verified in (quasi) polynomial time!!!)

Theorem (for „non strict“ flow types of nets):

If an LPO is enabled then it fulfills the token flow property,

i.e. token flow property is necessary for enabledness

top related