![Page 1: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/1.jpg)
1
EE249Fall04
Outline
• Petri nets
– Introduction
– Examples
– Properties
– Analysis techniques
![Page 2: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/2.jpg)
2
EE249Fall04
Petri Nets (PNs)
• Model introduced by C.A. Petri in 1962
– Ph.D. Thesis: “Communication with Automata”
• Applications: distributed computing, manufacturing, control,
communication networks, transportation…
• PNs describe explicitly and graphically:
– sequencing/causality
– conflict/non-deterministic choice
– concurrency
• Basic PN model
– Asynchronous model (partial ordering)
– Main drawback: no hierarchy
![Page 3: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/3.jpg)
3
EE249Fall04
Example: Synchronization at single track rail segment
• „Preconditions“
![Page 4: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/4.jpg)
4
EE249Fall04
Playing the „token game“
![Page 5: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/5.jpg)
5
EE249Fall04
Conflict for resource „track“
![Page 6: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/6.jpg)
6
EE249Fall04
Petri Net Graph
• Bipartite weighted directed graph:
– Places: circles
– Transitions: bars or boxes
– Arcs: arrows labeled with weights
• Tokens: black dots
t1p1
p2
t2
p4
t3
p3
2
3
![Page 7: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/7.jpg)
7
EE249Fall04
Petri Net
• A PN (N,M0) is a Petri Net Graph N
– places: represent distributed state by holding tokens
– marking (state) M is an n-vector (m1,m2,m3…), where mi is the non-negative
number of tokens in place pi.
– initial marking (M0) is initial state
– transitions: represent actions/events
– enabled transition: enough tokens in predecessors
– firing transition: modifies marking
• …and an initial marking M0.
t1p1
p2t2
p4
t3p3
2
3Places/Transitions: conditions/events
![Page 8: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/8.jpg)
8
EE249Fall04
Transition firing rule
• A marking is changed according to the following rules:
– A transition is enabled if there are enough tokens in each input place
– An enabled transition may or may not fire
– The firing of a transition modifies marking by consuming tokens from the
input places and producing tokens in the output places
22
3
2 2
3
![Page 9: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/9.jpg)
9
EE249Fall04
Concurrency, causality, choice
t1
t2
t3 t4
t5
t6
![Page 10: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/10.jpg)
10
EE249Fall04
Concurrency, causality, choice
Concurrency
t1
t2
t3 t4
t5
t6
![Page 11: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/11.jpg)
11
EE249Fall04
Concurrency, causality, choice
Causality, sequencing
t1
t2
t3 t4
t5
t6
![Page 12: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/12.jpg)
12
EE249Fall04
Concurrency, causality, choice
Choice,conflict
t1
t2
t3 t4
t5
t6
![Page 13: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/13.jpg)
13
EE249Fall04
Concurrency, causality, choice
Choice,conflict
t1
t2
t3 t4
t5
t6
![Page 14: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/14.jpg)
14
EE249Fall04
Communication Protocol
P1
Send msg
Receive Ack
Send Ack
Receive msg
P2
![Page 15: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/15.jpg)
15
EE249Fall04
Communication Protocol
P1
Send msg
Receive Ack
Send Ack
Receive msg
P2
![Page 16: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/16.jpg)
16
EE249Fall04
Communication Protocol
P1
Send msg
Receive Ack
Send Ack
Receive msg
P2
![Page 17: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/17.jpg)
17
EE249Fall04
Communication Protocol
P1
Send msg
Receive Ack
Send Ack
Receive msg
P2
![Page 18: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/18.jpg)
18
EE249Fall04
Communication Protocol
P1
Send msg
Receive Ack
Send Ack
Receive msg
P2
![Page 19: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/19.jpg)
19
EE249Fall04
Communication Protocol
P1
Send msg
Receive Ack
Send Ack
Receive msg
P2
![Page 20: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/20.jpg)
20
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 21: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/21.jpg)
21
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 22: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/22.jpg)
22
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 23: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/23.jpg)
23
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 24: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/24.jpg)
24
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 25: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/25.jpg)
25
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 26: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/26.jpg)
26
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 27: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/27.jpg)
27
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 28: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/28.jpg)
28
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 29: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/29.jpg)
29
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 30: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/30.jpg)
30
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 31: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/31.jpg)
31
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 32: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/32.jpg)
32
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 33: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/33.jpg)
33
EE249Fall04
Producer-Consumer Problem
Produce
Consume
Buffer
![Page 34: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/34.jpg)
34
EE249Fall04
Producer-Consumer with priority
Consumer B can
consume only if
buffer A is empty
Inhibitor arcs
A
B
![Page 35: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/35.jpg)
35
EE249Fall04
PN properties
• Behavioral: depend on the initial marking (most interesting)
– Reachability
– Boundedness
– Schedulability
– Liveness
– Conservation
• Structural: do not depend on the initial marking (often too restrictive)
– Consistency
– Structural boundedness
![Page 36: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/36.jpg)
36
EE249Fall04
Reachability
• Marking M is reachable from marking M0 if there exists a sequence of
firings σσσσ = = = = M0 t1 M1 t2 M2… M that transforms M0 to M.
• The reachability problem is decidable.
t1p1
p2t2
p4
t3p3
Μ0 = (1,0,1,0)
M = (1,1,0,0)
Μ0 = (1,0,1,0)
t3
M1 = (1,0,0,1)
t2
M = (1,1,0,0)
![Page 37: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/37.jpg)
37
EE249Fall04
• Liveness: from any marking any transition can become fireable
– Liveness implies deadlock freedom, not viceversa
Liveness
Not live
![Page 38: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/38.jpg)
38
EE249Fall04
• Liveness: from any marking any transition can become fireable
– Liveness implies deadlock freedom, not viceversa
Liveness
Not live
![Page 39: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/39.jpg)
39
EE249Fall04
• Liveness: from any marking any transition can become fireable
– Liveness implies deadlock freedom, not viceversa
Liveness
Deadlock-free
![Page 40: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/40.jpg)
40
EE249Fall04
• Liveness: from any marking any transition can become fireable
– Liveness implies deadlock freedom, not viceversa
Liveness
Deadlock-free
![Page 41: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/41.jpg)
41
EE249Fall04
• Boundedness: the number of tokens in any place cannot grow
indefinitely
– (1-bounded also called safe)
– Application: places represent buffers and registers (check there is no
overflow)
Boundedness
Unbounded
![Page 42: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/42.jpg)
42
EE249Fall04
• Boundedness: the number of tokens in any place cannot grow
indefinitely
– (1-bounded also called safe)
– Application: places represent buffers and registers (check there is no
overflow)
Boundedness
Unbounded
![Page 43: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/43.jpg)
43
EE249Fall04
• Boundedness: the number of tokens in any place cannot grow
indefinitely
– (1-bounded also called safe)
– Application: places represent buffers and registers (check there is no
overflow)
Boundedness
Unbounded
![Page 44: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/44.jpg)
44
EE249Fall04
• Boundedness: the number of tokens in any place cannot grow
indefinitely
– (1-bounded also called safe)
– Application: places represent buffers and registers (check there is no
overflow)
Boundedness
Unbounded
![Page 45: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/45.jpg)
45
EE249Fall04
• Boundedness: the number of tokens in any place cannot grow
indefinitely
– (1-bounded also called safe)
– Application: places represent buffers and registers (check there is no
overflow)
Boundedness
Unbounded
![Page 46: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/46.jpg)
46
EE249Fall04
Conservation
• Conservation: the total number of tokens in the net is constant
Not conservative
![Page 47: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/47.jpg)
47
EE249Fall04
Conservation
• Conservation: the total number of tokens in the net is constant
Not conservative
![Page 48: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/48.jpg)
48
EE249Fall04
Conservation
• Conservation: the total number of tokens in the net is constant
Conservative
2
2
![Page 49: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/49.jpg)
49
EE249Fall04
Analysis techniques
• Structural analysis techniques
– Incidence matrix
– T- and S- Invariants
• State Space Analysis techniques
– Coverability Tree
– Reachability Graph
![Page 50: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/50.jpg)
50
EE249Fall04
Incidence Matrix
• Necessary condition for marking M to be reachable from initial marking M0:
there exists firing vector v s.t.:
M = M0 + A v
p1 p2 p3t1
t2
t3
A=A=
--11 00 00
11 11 --1100 --11 11
t1 t2 t3
p1
p2
p3
![Page 51: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/51.jpg)
51
EE249Fall04
State equations
p1 p2 p3t1
t3
A=A=
--11 00 0011 11 --1100 --11 11
• E.g. reachability of M = |0 0 1|T from M0 = |1 0 0|T
but also v2 = | 1 1 2 |T or any vk= | 1 (k) (k+1) |
T
t2
110000++--11 00 0011 11 --1100 --11 11
000011==
110011
vv1 1 ==
110011
![Page 52: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/52.jpg)
52
EE249Fall04
Necessary Condition only
22
Firing vector: (1,2,2)
t1
t2
t3
Deadlock!!
![Page 53: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/53.jpg)
53
EE249Fall04
State equations and invariants
• Solutions of Ax = 0 (in M = M0 + Ax, M = M0)
T-invariants
– sequences of transitions that (if fireable) bring back to original marking
– periodic schedule in SDF
– e.g. x =| 0 1 1 |T
p1 p2 p3t1
t3
A=A=
--11 00 0011 11 --1100 --11 11
t2
![Page 54: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/54.jpg)
54
EE249Fall04
Application of T-invariants
• Scheduling
– Cyclic schedules: need to return to the initial state
i *k2 +
*k1
Schedule: i *k2 *k1 + o
T-invariant: (1,1,1,1,1)
o
![Page 55: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/55.jpg)
55
EE249Fall04
State equations and invariants
• Solutions of yA = 0
S-invariants
– sets of places whose weighted total token count does not change after
the firing of any transition (y M = y M’)
– e.g. y =| 1 1 1 |T
p1 p2 p3t1
t3
AATT==
--11 11 0000 11 --1100 --11 11
t2
![Page 56: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/56.jpg)
56
EE249Fall04
Application of S-invariants
• Structural Boundedness: bounded for any finite initial marking M0
• Existence of a positive S-invariant is CS for structural boundedness
– initial marking is finite
– weighted token count does not change
![Page 57: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/57.jpg)
57
EE249Fall04
Summary of algebraic methods
• Extremely efficient
(polynomial in the size of the net)
• Generally provide only necessary or sufficient information
• Excellent for ruling out some deadlocks or otherwise dangerous conditions
• Can be used to infer structural boundedness
![Page 58: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/58.jpg)
58
EE249Fall04
Coverability Tree
• Build a (finite) tree representation of the markings
Karp-Miller algorithm
• Label initial marking M0 as the root of the tree and tag it as new
• While new markings exist do:
– select a new marking M
– if M is identical to a marking on the path from the root to M, then tag M as old and go to another new marking
– if no transitions are enabled at M, tag M dead-end
– while there exist enabled transitions at M do:
– obtain the marking M’ that results from firing t at M
– on the path from the root to M if there exists a marking M’’ such that M’(p)>=M’’(p) for each place
p and M’ is different from M’’, then replace M’(p) by ωωωω for each p such that M’(p) >M’’(p)
– introduce M’ as a node, draw an arc with label t from M to M’ and tag M’ as new.
![Page 59: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/59.jpg)
59
EE249Fall04
Coverability Tree
• Boundedness is decidable with coverability tree
p1 p2 p3
p4
t1
t2
t3
1000
![Page 60: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/60.jpg)
60
EE249Fall04
Coverability Tree
• Boundedness is decidable with coverability tree
p1 p2 p3
p4
t1
t2
t3
1000
0100
t1
![Page 61: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/61.jpg)
61
EE249Fall04
Coverability Tree
• Boundedness is decidable
with coverability tree
p1 p2 p3
p4
t1
t2
t3
1000
0100
0011
t1
t3
![Page 62: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/62.jpg)
62
EE249Fall04
Coverability Tree
• Boundedness is decidable
with coverability tree
p1 p2 p3
p4
t1
t2
t3
1000
0100
0011
t1
t3
0101
t2
![Page 63: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/63.jpg)
63
EE249Fall04
Coverability Tree
• Boundedness is decidable
with coverability tree
p1 p2 p3
p4
t1
t2
t3
1000
0100
0011
t1
t3
t2
010ωωωω
![Page 64: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/64.jpg)
64
EE249Fall04
Coverability Tree
• Is (1) reachable from (0)?
t1 p1 t2
t1 p1 t22 2
![Page 65: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/65.jpg)
65
EE249Fall04
Coverability Tree
• Is (1) reachable from (0)?
t1 p1 t2
t1
0
t1
ωωωω
p1 t22 2
(0) (1) (2)…
![Page 66: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/66.jpg)
66
EE249Fall04
Coverability Tree
• Is (1) reachable from (0)?
t1 p1 t2
t1
0
t1
ωωωω
0
t1
ωωωω
p1 t22 2
(0) (1) (2)…
(0) (2) (0)…
![Page 67: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/67.jpg)
67
EE249Fall04
Coverability Tree
• Cannot solve the reachability problem
t1 p1 t2
t1
0
t1
ωωωω
0
t1
ωωωω
p1 t22 2
(0) (1) (2)…
(0) (2) (0)…
• Is (1) reachable from (0)?
![Page 68: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/68.jpg)
68
EE249Fall04
Reachability graph
p1 p2 p3t1
t2
t3
100
• For bounded nets the Coverability Tree is called Reachability Tree since it contains all possible reachable markings
![Page 69: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/69.jpg)
69
EE249Fall04
Reachability graph
p1 p2 p3t1
t2
t3
100
010
t1
• For bounded nets the Coverability Tree is called Reachability Tree since it contains all possible reachable markings
![Page 70: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/70.jpg)
70
EE249Fall04
Reachability graph
p1 p2 p3t1
t2
t3
100
010
001
t1
t3
• For bounded nets the Coverability Tree is called Reachability Tree since it contains all possible reachable markings
![Page 71: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/71.jpg)
71
EE249Fall04
Reachability graph
p1 p2 p3t1
t2
t3
100
010
001
t1
t3t2
• For bounded nets the Coverability Tree is called Reachability Tree since it contains all possible reachable markings
![Page 72: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/72.jpg)
72
EE249Fall04
Subclasses of Petri nets
• Reachability analysis is too expensive
• State equations give only partial information
• Some properties are preserved by reduction rules
e.g. for liveness and safeness
• Even reduction rules only work in some cases
• Must restrict class in order to prove stronger results
![Page 73: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/73.jpg)
73
EE249Fall04
Marked Graphs
• Every place has at most 1 predecessor and 1 successor transition
• Models only causality and concurrency (no conflict)
NO
YES
![Page 74: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/74.jpg)
74
EE249Fall04
State Machines
• Every transition has at most 1 predecessor and 1 successor place
• Models only causality and conflict
– (no concurrency, no synchronization of parallel activities)
YES NO
![Page 75: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/75.jpg)
75
EE249Fall04
Free-Choice Petri Nets (FCPN)
Free-Choice (FC)
Extended Free-Choice Confusion (not-Free-Choice)
t1
t2
Free-Choice: the outcome of a choice depends on the
value of a token (abstracted non-deterministically)
rather than on its arrival time.
every transition after choice
has exactly 1 predecessor place
![Page 76: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/76.jpg)
76
EE249Fall04
Free-Choice nets
• Introduced by Hack (‘72)
• Extensively studied by Best (‘86) and Desel and Esparza (‘95)
• Can express concurrency, causality and choice without confusion
• Very strong structural theory
– necessary and sufficient conditions for liveness and safeness, based on decomposition
– exploits duality between MG and SM
![Page 77: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/77.jpg)
77
EE249Fall04
MG (& SM) decomposition
• An Allocation is a control function that chooses which transition fires among several conflicting ones ( A: P T).
• Eliminate the subnet that would be inactive if we were to use the allocation...
• Reduction Algorithm
– Delete all unallocated transitions
– Delete all places that have all input transitions already deleted
– Delete all transitions that have at least one input place already deleted
• Obtain a Reduction (one for each allocation) that is a conflict free subnet
![Page 78: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/78.jpg)
78
EE249Fall04
• Choose one successor for each conflicting place:
MG reduction and cover
![Page 79: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/79.jpg)
79
EE249Fall04
• Choose one successor for each conflicting place:
MG reduction and cover
![Page 80: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/80.jpg)
80
EE249Fall04
• Choose one successor for each conflicting place:
MG reduction and cover
![Page 81: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/81.jpg)
81
EE249Fall04
• Choose one successor for each conflicting place:
MG reduction and cover
![Page 82: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/82.jpg)
82
EE249Fall04
• Choose one successor for each conflicting place:
MG reduction and cover
![Page 83: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/83.jpg)
83
EE249Fall04
MG reductions
• The set of all reductions yields a cover of MG components (T-invariants)
![Page 84: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/84.jpg)
84
EE249Fall04
MG reductions
• The set of all reductions yields a cover of MG components (T-invariants)
![Page 85: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/85.jpg)
85
EE249Fall04
MG reductions
• The set of all reductions yields a cover of MG components (T-invariants)
![Page 86: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/86.jpg)
86
EE249Fall04
Hack’s theorem (‘72)
• Let N be a Free-Choice PN:
– N has a live and safe initial marking (well-formed)
if and only if
– every MG reduction is strongly connected and not empty, and
the set of all reductions covers the net
– every SM reduction is strongly connected and not empty, and
the set of all reductions covers the net
![Page 87: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/87.jpg)
87
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 88: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/88.jpg)
88
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 89: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/89.jpg)
89
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 90: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/90.jpg)
90
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 91: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/91.jpg)
91
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 92: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/92.jpg)
92
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 93: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/93.jpg)
93
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 94: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/94.jpg)
94
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 95: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/95.jpg)
95
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 96: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/96.jpg)
96
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 97: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/97.jpg)
97
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 98: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/98.jpg)
98
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 99: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/99.jpg)
99
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 100: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/100.jpg)
100
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 101: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/101.jpg)
101
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
![Page 102: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/102.jpg)
102
EE249Fall04
Hack’s theorem
• Example of non-live (but safe) FCN
Deadlock
![Page 103: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/103.jpg)
103
EE249Fall04
Summary of LSFC nets
• Largest class for which structural theory really helps
• Structural component analysis may be expensive
(exponential number of MG and SM components in the worst case)
• But…
– number of MG components is generally small
– FC restriction simplifies characterization of behavior
![Page 104: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/104.jpg)
104
EE249Fall04
Petri Net extensions
• Add interpretation to tokens and transitions
– Colored nets (tokens have value)
• Add time
– Time/timed Petri Nets (deterministic delay)
– type (duration, delay)
– where (place, transition)
– Stochastic PNs (probabilistic delay)
– Generalized Stochastic PNs (timed and immediate transitions)
• Add hierarchy
– Place Charts Nets
![Page 105: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/105.jpg)
105
EE249Fall04
PNs Summary
• PN Graph: places (buffers), transitions (actions), tokens (data)
• Firing rule: transition enabled if there are enough tokens in each input
place
• Properties
– Structural (consistency, structural boundedness…)
– Behavioral (reachability, boundedness, liveness…)
• Analysis techniques
– Structural (only CN or CS): State equations, Invariants
– Behavioral: coverability tree
• Reachability
• Subclasses: Marked Graphs, State Machines, Free-Choice PNs
2
![Page 106: Petri nets - EECS Instructional Support Group Home Page](https://reader031.vdocuments.mx/reader031/viewer/2022020703/61fb45bf2e268c58cd5c354d/html5/thumbnails/106.jpg)
106
EE249Fall04
References
• T. Murata Petri Nets: Properties, Analysis and Applications
• http://www.daimi.au.dk/PetriNets/