Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Petri Nets (for Planners)
B. Bonet, P. Haslum
... from various places ...
ICAPS 2011
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Introduction & Motivation
Petri Nets (PNs) is formalism for modelling discrete eventsystems
Developed by (and named after) C.A. Petri in 1960s
In general Petri nets, places are unbounded counters
advantages in expressivity and modelling convenience
questions of reachability, coverability, etc. arecomputationally harder to answer, but still decidable
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Exchange of ideas between Petri nets and planning holdspotential to benefit both areas:
Analysis methods for Petri nets are often based on ideas &techniques not common in planning:
– algebraic methods based on the state equation
– rich literature on the study of classes of nets with specialstructure
Yet, some standard planning techniques (e.g., searchheuristics) are unknown in the PN community
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Outline of the Tutorial
1 Definitions, notation and modelling
2 Decision problems, complexity and expressivity
3 Analysis techniques for general Petri nets
– Coverability
– The state equation
– Reachability
4 Petri nets with special structure
5 Conclusions
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Definitions, Notation and
Modelling
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Terminology and Intuition
A Petri net has places, transitions, and directed arcs
Arcs connect places to transitions or vice versa
Places contain zero or finite number of tokens
A marking is disposition of tokens in places
A transition is fireable if there is token at the start place ofeach input arc
When transition fires:
– it consumes token from start place of each input arc– it puts token at end place of each output arc
Execution is non-deterministic
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p1 p2
t1 t2 t3
t4
p3 p4 p5
t5
t6 t7
p6 p7
2
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Formal Definition
Place/Transition (P/T) net is tuple N = (P, T,W ) where:
– P is set of places
– T is set of transitions (and P ∩ T = ∅)– W ⊆ (P × T ) ∪ (T × P )→ N
(multiset of arcs: each (x, y) has multiplicity W (x, y))
For transition t:
– preset is •t = {s : W (s, t) > 0} (input places)
– postset is t• = {s : W (t, s) > 0} (output places)
Marking is m : P → N (zero or more tokens at each place)
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p1 p2
t1 t2 t3
t4
p3 p4 p5
t5
t6 t7
p6 p7
2
– marking m = 〈1, 1, 0, 0, 0, 0, 0〉– transition t6: •t6 = {p3, p5}, t6• = {p6, p7}
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Execution Semantics
A transition t is enabled or firable at marking m if
m(p) ≥W (p, t) for each p ∈ •t
Upon firing, t produces new marking m′ such that
m′(p) =
{m(p)−
consumed︷ ︸︸ ︷W (p, t) +
added︷ ︸︸ ︷W (t, p) if p ∈ •t ∪ t•
m(p) if p /∈ •t ∪ t•
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Execution Semantics
A transition t is enabled or firable at marking m if
m(p) ≥W (p, t) for each p ∈ •t
Upon firing, t produces new marking m′ such that
m′(p) =
{m(p)−
consumed︷ ︸︸ ︷W (p, t) +
added︷ ︸︸ ︷W (t, p) if p ∈ •t ∪ t•
m(p) if p /∈ •t ∪ t•
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Execution Semantics
Transition relations:
m [t〉m′ if t is enabled at m and produces m′
m [σ〉m′, for sequence σ = t1t2 · · · tn, if exists m′′ with
– m [t1〉m′′– m′′ [σ′〉m′ for σ′ = t2 · · · tn
m [〉m′ if m [t〉m′ for some t
[∗〉 is transitive closure of [〉
Marked net is (N = (P, T,W ),m0) where m0 is initialmarking
Reachable markings R(N,m0) = {m ∈ NP : m0 [∗〉m}
Firing sequences L(N,m0) = {σ ∈ T<∞ : ∃m.m0 [σ〉m}
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Execution Semantics
Transition relations:
m [t〉m′ if t is enabled at m and produces m′
m [σ〉m′, for sequence σ = t1t2 · · · tn, if exists m′′ with
– m [t1〉m′′– m′′ [σ′〉m′ for σ′ = t2 · · · tn
m [〉m′ if m [t〉m′ for some t
[∗〉 is transitive closure of [〉
Marked net is (N = (P, T,W ),m0) where m0 is initialmarking
Reachable markings R(N,m0) = {m ∈ NP : m0 [∗〉m}
Firing sequences L(N,m0) = {σ ∈ T<∞ : ∃m.m0 [σ〉m}
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Execution Semantics
Transition relations:
m [t〉m′ if t is enabled at m and produces m′
m [σ〉m′, for sequence σ = t1t2 · · · tn, if exists m′′ with
– m [t1〉m′′– m′′ [σ′〉m′ for σ′ = t2 · · · tn
m [〉m′ if m [t〉m′ for some t
[∗〉 is transitive closure of [〉
Marked net is (N = (P, T,W ),m0) where m0 is initialmarking
Reachable markings R(N,m0) = {m ∈ NP : m0 [∗〉m}
Firing sequences L(N,m0) = {σ ∈ T<∞ : ∃m.m0 [σ〉m}
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Execution Semantics
Transition relations:
m [t〉m′ if t is enabled at m and produces m′
m [σ〉m′, for sequence σ = t1t2 · · · tn, if exists m′′ with
– m [t1〉m′′– m′′ [σ′〉m′ for σ′ = t2 · · · tn
m [〉m′ if m [t〉m′ for some t
[∗〉 is transitive closure of [〉
Marked net is (N = (P, T,W ),m0) where m0 is initialmarking
Reachable markings R(N,m0) = {m ∈ NP : m0 [∗〉m}
Firing sequences L(N,m0) = {σ ∈ T<∞ : ∃m.m0 [σ〉m}
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p1 p2
p3 p4 p5
p6 p7
t1 t2 t3
t4 t5
t6 t7
2
– marking m = 〈1, 1, 0, 0, 0, 0, 0〉– enabled: t1, t2, t3
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p1 p2
p3 p4 p5
p6 p7
t1 t2 t3
t4 t5
t6 t7
2
– marking m = 〈0, 1, 1, 0, 0, 0, 0〉– enabled: t3
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p1 p2
p3 p4 p5
p6 p7
t1 t2 t3
t4 t5
t6 t7
2
– marking m = 〈0, 0, 1, 0, 2, 0, 0〉– enabled: t6
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p1 p2
p3 p4 p5
p6 p7
t1 t2 t3
t4 t5
t6 t7
2
– marking m = 〈0, 0, 0, 0, 1, 1, 1〉– enabled: t4, t5
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Arithmetic of Functions
For two functions f, g ∈ NX :
f ≥ g if f(x) ≥ g(x) for each place x
f > g if f ≥ g and there is x such that f(x) > g(x)
f + g defined pointwise as (f + g)(x) = f(x) + g(x)
Hence, m [t〉m′ iff
m ≥W (·, t) (enable condition)
m′ = m−W (·, t) +W (t, ·)
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Ordinary Nets
A P/T net N = (P, T,W ) is ordinary iff W (p, t) ≤ 1 for all p, t
Thm: any net can be transformed into equivalent ordinary net
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Transformation Rules
1) p t2k =⇒ p
kt
k
2) p t2k + 1 =⇒ p
kt
k + 1
3) t p2k =⇒ t p
k
k
4) t p2k + 1 =⇒ t p
k + 1
k
Each rule decrease multiplicity by half and add 2 nodes
Resulting size is O(∑
x,yW (x, y)) (exponential)
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p t q4
2
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p t
2
q2
2
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p t
2
q
2
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p t
2
q
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Types of Nets
Marking m is k-bounded if m(p) ≤ k for all p ∈ P
Marked net (N,m0) is k-bounded if every reachablemarking is k-bounded
It is bounded if it is k-bounded for some k
It is safe if it is 1-bounded
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Safe Networks
Every reachable marking is 1-bounded
Marking m can be thought as state where places representsfluents:
– if m(p) = 1 then fluent p is true at m– if m(p) = 0 then fluent p is false at m
Safe networks can be used for STRIPS planning
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Direct STRIPS to PN Translations
Each atom is a place
Each (grounded) action is a transition t:
– input arcs p→ t for each precondition p
– output arcs t→ p for each positive effect p
– output arcs t→ p for each precondition p that is notdeleted nor added
Initial state gives initial marking
Goal state gives partial desired marking
Plan existence becomes ”Coverability” problem
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Gripper w/ 1 Ball and 2 Arms
Ball@A Ball@B
Robby@A Robby@B
Ball@1
Ball@2
move2B
move2A
pick1@A
pick2@A
drop1@A
drop2@A
pick1@Bdrop1@B pick1@B
drop2@B pick2@B
move2B, pick1@B, move2A, drop1@A
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Gripper w/ 1 Ball and 2 Arms
Ball@A Ball@B
Robby@A Robby@B
Ball@1
Ball@2
move2B
move2A
pick1@A
pick2@A
drop1@A
drop2@A
pick1@Bdrop1@B pick1@B
drop2@B pick2@B
move2B, pick1@B, move2A, drop1@A
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Gripper w/ 1 Ball and 2 Arms
Ball@A Ball@B
Robby@A Robby@B
Ball@1
Ball@2
move2B
move2A
pick1@A
pick2@A
drop1@A
drop2@A
pick1@Bdrop1@B pick1@B
drop2@B pick2@B
move2B, pick1@B, move2A, drop1@A
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Gripper w/ 1 Ball and 2 Arms
Ball@A Ball@B
Robby@A Robby@B
Ball@1
Ball@2
move2B
move2A
pick1@A
pick2@A
drop1@A
drop2@A
pick1@Bdrop1@B pick1@B
drop2@B pick2@B
move2B, pick1@B, move2A, drop1@A
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Gripper w/ 1 Ball and 2 Arms
Ball@A Ball@B
Robby@A Robby@B
Ball@1
Ball@2
move2B
move2A
pick1@A
pick2@A
drop1@A
drop2@A
pick1@Bdrop1@B pick1@B
drop2@B pick2@B
move2B, pick1@B, move2A, drop1@A
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Safe STRIPS Problems
STRIPS problem is safe if its direct translation (N,m0) is safe
Sufficient Condition:
For each added atom p, there is precondition q that isdeleted such that {p, q} is mutex
Enforcing the condition:
Add ‘not-p’ atoms for each atom p
For each action that contains a deleted atom p that is notprecondition, generate two similar actions with p and not-pin precondition (respectively)
Worst-case size of pre-processing is exponential in numberof atoms that are deleted and don’t appear as preconditions
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Modelling Planning Problems
General nets can “store” multiple tokens at single place
Places can be used to represent:
– number of identical objects at location
– resource quantity
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Gripper with 3 identical balls and 2 identical arms
# in Room A # in Room B
Robby@A Robby@B
# held
# free
move2B
move2A
pick@A
drop@A
pick@B
drop@B
pick@A, pick@A, move2B, drop@B, drop@B, move2A, pick@A, move2B, drop@B
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Wargus Domain (Chan et al. 2007)
Gold Wood Peasant Supply
100
100
400
500250
4
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Other Types of Nets
State Machines:
– every transition has one incoming and one outgoing arci.e. |•t| = |t•| = 1 for each t ∈ T
Marked Graphs:
– every place has one incoming arc, and one outgoing arci.e. |•p| = |p•| = 1 for each p ∈ P
Free-choice Nets:
– every arc is either the only arc going from the place, oronly arc going to the transitioni.e. |p•| ≤ 1 or •(p•) = {p} for each p ∈ P
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Extensions
Inhibitor arcs (enablers):
– transition enabled when there is no token at place
Read arcs (enablers):
– do not consume tokens
Reset arcs: erase all tokens at place
Others:
– colored, hierarchical, prioritization, . . .
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Vector Notation
Two vectors associated with transition t:
W−t =
W (p1, t)...
W (p|P |, t)
W+t =
W (t, p1)...
W (t, p|P |)
t enabled at m iff m ≥W−t
Wt = W+t −W−
t is effect of t
firing t leads to m′ = m + Wt
W =(Wt1 , Wt2 , . . . , Wt|T |
)is incidence matrix
rp: row of W corresponding to place p
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Examples
p1 t1
p2
p3
t2
t3
W =
−1 0 11 −1 01 1 −1
p1
p2
p3
p4
p5
p6
p7
t1
t2
t3
t4
t5
t6
W =
1 −1 0 0 0 0−1 1 1 −1 0 0
1 0 0 0 −1 00 1 0 0 0 −10 0 −1 1 −1 10 0 0 0 1 −1−1 0 0 0 0 1
Introduction
Basics
Definitions
Ordinary Nets
Types of Nets
Vector Notation
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Representation Ambiguity and Pure Nets
Wt[i] = 0:
t
pi
or
t
pi
Pure nets have no “self loops”:•t ∩ t• = ∅ for every transition t
For pure nets, incidence matrix Wunambiguously defines the net
Any net can be transformed into apure net by splitting loops:
ta p′ tb
pi
Transformation is linear space
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Complexity & Expressivity
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Decision Problems for Marked Nets
Given a marked net (N,m0):
Reachability: Is there a firing sequence that ends withgiven marking m?
Coverability: Is there a firing sequence that ends withmarking m′ such that m′ ≥m for given m?
Boundedness: Does there exist a integer k such that everyreachable marking is k-bounded? m ≤ K?
Coverability and boundedness are EXPSPACE-complete
Reachability is EXPSPACE-hard, but existing algorithms arenon-primitive recursive (i.e., have unbounded complexity)
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
More Properties
Executability: Is there a firing sequence valid at m0 thatincludes transition t?
– Reduces to coverability: t is executable iff W−t is
coverable– and vice versa: reduction using a “goal transition”
Repeated Executability: Is there a firing sequence inwhich a given transition (or set of transitions) occurs aninfinite number of times?
Reachable Deadlock: Is there a reachable marking m atwhich no transition is enabled?
Liveness: Executability of every transition at everyreachable marking, i.e.,∀M : M0 [∗〉M → ∀t∃M ′,M ′′ : M [∗〉M ′ [t〉M ′′.
. . . and many more . . .
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Equivalence Problems
Equivalence: Given two marked nets, (N1,m1) and(N2,m2), with equal (or isomorphic) sets of places, do theyhave the equal sets of reachable markings?
Trace Equivalence: Given two marked nets, (N1,m1) and(N2,m2), with equal (or isomorphic) sets of transitions, dothey have equal sets of valid firing sequences?
Language Equivalence: Trace equivalence under mappingof transitions to a common alphabet
Bisimulation: Equivalence under a bijection betweenmarkings
In general, equivalence problems are undecidable
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Structural Properties
A structural property is independent of initial marking m0
Structural Liveness: It there a marking m such that(N,m) is live?
Structural Boundedness: Is (N,m) bounded for everyfinite initial marking m?
Repetitiveness: Is there a marking m and a firing sequenceσ valid at m such that a given transition (set of transitions)appears infinitely often in σ?
Deciding structural properties can be easier than correspondingproblem for marked net
Structural boundedness and repetitiveness are in NP
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Complexity: Implications Of and For Expressivity
Bounded Petri nets are expressively equivalent topropositional STRIPS/PDDL
– Reachability is PSPACE-complete for both
– Recall: direct STRIPS to PN translation may blow upexponentially
General Petri nets are stictly more expressive thanpropositional STRIPS/PDDL
General Petri nets are at least as expressive as “lifted”(finite 1st order) STRIPS/PDDL
– probably also strictly more expressive (but no proof yet)
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Counter TMs
A k-counter machine (kCM) is a deterministic finiteautomaton with k (positive) integer counters
– can increment/decrement (by 1), or reset, counters
– conditional jumps on ci > 0 or ci = 0
Note the differences:
– kCMs are deterministic: starting configurationdetermines unique execution; Petri nets have choice
– kCMs can branch on ci > 0/ci = 0; Petri nets can onlyprecondition transitions on m(pi) > 0
A kCM is k-bounded iff no counter ever exceeds k
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Counter TMs: Results
An n-size TM can be simulated by an O(n)-size 2CM (ifproperly initialised)
– Halting (i.e., reachability) for unbounded 2CMs isundecidable
– PNs are strictly less expressive than unbounded 2CMs
An n-size and 2n space bounded TM can be simulated byO(n)-size 22
n-bounded 2CM
A 22n
-bounded n-size 2CM can be (non-deterministically!)simulated by O(n2)-size Petri net
– Reachability for Petri nets is DSPACE(2√n)-hard
Introduction
Basics
Complexity &Expressivity
Properties
Equivalence
StructuralProperties
Expressivity
Invariants
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Invariants
A vector y ∈ N|P | is P-invariant for N iff for any markingsm [∗〉m′, yTm = yTm′
P-invariant = linear combination of place markings thatis invariant under any transition firing
A vector x ∈ N|T | is a T-invariant for N iff for any firingsequence σ such that n(σ) = x and any marking m whereσ is enabled, m [σ〉m
T-invariant = multiset of transitions whose combinedeffect is zero
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Analysis Techniques
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
The Coverability Tree Construction
The coverability tree of a marked net (N,m0) is an explicitrepresentation of reachable markings – but not exactly theset of reachable markings.
Constructed by forwards exploration:
Each enabled transition generates a successor marking.If reach m such that m >m′ for some ancestor m′ of m,replace m[i] by ω for all i s.t. m[i] >m′[i].
m′ [s = t1, . . . , tl〉m, and since m ≥m′, m [s〉m′′such that m′′ ≥m; sequence s can be repeated anynumber of times.ω means “arbitraribly large”.
Also check for regular loops (m = m′ for some ancestorm′ of m).
Every branch has finite depth.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p1
t1
p2
p3
t2
t3
(1 0 0)
(0 1 1)
t1
(0 0 2)
t2
(1 0ω)
t3
(0 1ω)
t1
(0 0ω)
t2
(1 0ω)
t3
(1ω ω)t3
. . .
t1
. . .t2
(ω ω ω)
t3
. . .t3
(1ω 0)t3
. . .
t1
. . .
t2
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Uses For The Coverability Tree
Decides coverability:
m is coverable iff m ≤m′ for some m′ in the tree (wheren < ω for any n ∈ N).If m is coverable, there exists a covering sequence oflength at most O(2n).
Decides boundedness:
(N,m0) is unbounded iff there exists a self-coveringsequence: m0 [σ〉m [σ′〉m′ such that m′ >m.I.e., (N,m0) is unbounded iff ω appears in some markingin the coverability tree.If (N,m0) is unbounded, there exists a self-coveringsequence of length at most O(2n).
In general, does not decide reachability.
Except if (N,m0) is bounded.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
The State Equation
The firing count vector (a.k.a. Parikh vector) of a firingsequence σ = ti1 , . . . , til is a |T |-dimensional vectorn(σ) = (n1, . . . , n|T |) where ni ∈ N is the number ofoccurrences of transition ti in σ.
If m0 [σ〉m′, then
m′ = m0+w(ti1)+. . .+w(til) = m0+∑
j=1...|T |
w(tj)n(σ)[j],
i.e., m′ = m0 +Wn(σ).
m is reachable from m0 only if Wn = (m−m0) has asolution n ∈ N|T |.This is a necessary condition but not sufficient.
A solution n is realisable iff, in addition, n = n(σ) forsome valid firing sequence σ.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
The State Equation & Invariance
y ∈ N|P | is a P-invariant iff it is a solution to yTW = 0.
yTm = yTm0 for any m reachable from m0.
x ∈ N|T | is a T-invariant iff it is a solution to Wx = 0.
m [σ〉m whenever n(σ) = x and σ enabled at m.
Any (positive) linear combination of P-/T-invariants is aP-/T-invariant.
The reverse dual of a net N is obtained by swapping placesfor transitions and vice versa, and reversing all arcs.
The incidence matrix of the reverse dual is the transposeof the incidence matrix of N .A P-(T-)invariant of N is a T-(P-)invariant of the reversedual.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: P-Invariants
1100110
T
1 −1 0 0 0 0−1 1 1 −1 0 0
1 0 0 0 −1 00 1 0 0 0 −10 0 −1 1 −1 10 0 0 0 1 −1−1 0 0 0 0 1
=
0000000
T
1011012
T
1 −1 0 0 0 0−1 1 1 −1 0 0
1 0 0 0 −1 00 1 0 0 0 −10 0 −1 1 −1 10 0 0 0 1 −1−1 0 0 0 0 1
=
0000000
T
p1
p2
p3
p4
p5
p6
p7
t1
t2
t3
t4
t5
t6
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: T-Invariants
1 −1 0 0 0 0−1 1 1 −1 0 0
1 0 0 0 −1 00 1 0 0 0 −10 0 −1 1 −1 10 0 0 0 1 −1−1 0 0 0 0 1
001100
=
000000
1 −1 0 0 0 0−1 1 1 −1 0 0
1 0 0 0 −1 00 1 0 0 0 −10 0 −1 1 −1 10 0 0 0 1 −1−1 0 0 0 0 1
110011
=
000000
p1
p2
p3
p4
p5
p6
p7
t1
t2
t3
t4
t5
t6
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Minimal Invariants
The support of a P-/T-invariant y is the set {i |y[i] > 0}.An invariant has minimal support iff no invariants support isa strict subset.
The number of minimal support P-/T-invariants of a netis finite, but may be exponential.All P-/T-invariants are (positive) linear combinations ofminimal support P-/T-invariants.
A P-/T-invariant y is minimal iff no y′ < y is invariant.
A minimal invariant need not have minimal support.For each minimal support, there is a unique minimalinvariant.
Algorithms exist to generate all minimal supportP-/T-invariants of a net.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
The Fourier-Motzkin Algorithm for P-Invariants
1 Initialise B = [W : In] (n = |P |).
2 For j = 1, . . . , |T |1 Append to B all rows resulting from positive linear
combinations of pairs of rows in B that eliminate columnj.
2 Remove from B all rows with non-zero jth element.
3 B = [0 : D], where the rows of D are P-invariants.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
B =
1 −1 0 0 0 0 | 1 0 0 0 0 0 0−1 1 1 −1 0 0 | 0 1 0 0 0 0 0
1 0 0 0 −1 0 | 0 0 1 0 0 0 00 1 0 0 0 −1 | 0 0 0 1 0 0 00 0 −1 1 −1 1 | 0 0 0 0 1 0 00 0 0 0 1 −1 | 0 0 0 0 0 1 0−1 0 0 0 0 1 | 0 0 0 0 0 0 1
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
B =
1 −1 0 0 0 0 | 1 0 0 0 0 0 0−1 1 1 −1 0 0 | 0 1 0 0 0 0 0
1 0 0 0 −1 0 | 0 0 1 0 0 0 00 1 0 0 0 −1 | 0 0 0 1 0 0 00 0 −1 1 −1 1 | 0 0 0 0 1 0 00 0 0 0 1 −1 | 0 0 0 0 0 1 0−1 0 0 0 0 1 | 0 0 0 0 0 0 1
0 0 1 −1 0 0 | 1 1 0 0 0 0 00 −1 0 0 0 1 | 1 0 0 0 0 0 10 1 1 −1 −1 0 | 0 1 1 0 0 0 00 0 0 0 −1 1 | 0 0 1 0 0 0 1
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
B =
0 1 0 0 0 −1 | 0 0 0 1 0 0 00 0 −1 1 −1 1 | 0 0 0 0 1 0 00 0 0 0 1 −1 | 0 0 0 0 0 1 00 0 1 −1 0 0 | 1 1 0 0 0 0 00 −1 0 0 0 1 | 1 0 0 0 0 0 10 1 1 −1 −1 0 | 0 1 1 0 0 0 00 0 0 0 −1 1 | 0 0 1 0 0 0 1
0 0 0 0 0 0 | 1 0 0 1 0 0 10 0 1 −1 −1 1 | 1 1 1 0 0 0 1
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
B =
0 0 −1 1 −1 1 | 0 0 0 0 1 0 00 0 0 0 1 −1 | 0 0 0 0 0 1 00 0 1 −1 0 0 | 1 1 0 0 0 0 00 0 0 0 −1 1 | 0 0 1 0 0 0 10 0 0 0 0 0 | 1 0 0 1 0 0 10 0 1 −1 −1 1 | 1 1 1 0 0 0 1
0 0 0 0 −1 1 | 1 1 0 0 1 0 00 0 0 0 −2 2 | 1 1 1 0 1 0 1
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
B =
0 0 0 0 1 −1 | 0 0 0 0 0 1 00 0 0 0 −1 1 | 0 0 1 0 0 0 10 0 0 0 0 0 | 1 0 0 1 0 0 10 0 0 0 −1 1 | 1 1 0 0 1 0 00 0 0 0 −2 2 | 1 1 1 0 1 0 1
0 0 0 0 0 0 | 0 0 1 0 0 1 10 0 0 0 0 0 | 1 1 0 0 1 1 00 0 0 0 0 0 | 1 1 1 0 1 2 1
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
B =
0 0 0 0 0 0 | 1 0 0 1 0 0 10 0 0 0 0 0 | 0 0 1 0 0 1 10 0 0 0 0 0 | 1 1 0 0 1 1 00 0 0 0 0 0 | 1 1 1 0 1 2 1
P-invariants:
z1 = (1 0 0 1 0 0 1)
z2 = (0 0 1 0 0 1 1)
z3 = (1 1 0 0 1 1 0)
z4 = (1 1 1 0 1 2 1)
p1
p2
p3
p4
p5
p6
p7
t1
t2
t3
t4
t5
t6
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
The State Equation & Structural Properties
N is structurally bounded iff yTW ≤ 0 has a solutiony ∈ N|P | such that y[i] ≥ 1 for i = 1, . . . , |P |.y is a linear combination of all place markings that isinvariant or decreasing under any transition firing.
N is repetitive w.r.t. transition t iff Wx ≥ 0 has a solutionx ∈ N|T | such that x[t] > 0.
x is a multiset of transitions, including t at least once,whose combined effect is zero or increasing.Can always find some initial marking m0 from which x isrealisable.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example
p1
p2
p3
p4
p5
p6
p7
t1
t2
t3
t4
t5
t6
z1 =(
1 0 0 1 0 0 1)
andz4 =
(1 1 1 0 1 2 1
)are P-invariants of the net.
y = z1 + z4 =(
2 1 1 1 1 2 2)
is also aP-invariant.
yTW = 0 and y ≥ 1: The net is structurally bounded.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Reachability
Decidability of the (exact) reachability problem for generalPetri nets was open for some time.
Algorithm proposed by Sacerdote & Tenney in 1977incorrect (or gaps in correctness proof).Correct algorithm by Mayr in 1981.Simpler correctness proof (for essentially the samealgorithm) by Kosaraju in 1982.
Other algorithms have been presented since.
All existing algorithms have unbounded complexity.
Fun fact: A 2-EXP algorithm was proposed in 1998, butlater shown to be incorrect.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Reachability: Preliminaries
m is semi-reachable from m0 iff there is a transitionsequence s = ti1 , . . . , tin such thatm = m0 + w(ti1) + . . .+ w(tin).
s is does not have to be valid (firable) at m0.m is semi-reachable from m0 iff Wn = (m−m0) has asolution n ∈ N|T |.
If m is semi-reachable from m0, then m + a is reachablefrom m0 + a for some sufficiently large a ≥ 0.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
A controlled net is a pair of a marked net(N = 〈P, T, F 〉,m0) and an NFA (A, q0) over alphabet T .
A defines a (regular) subset of (not necessarily firable)transition sequences.Define reachability/coverability/boundedness for (N,m0)w.r.t. A in the obvious way.The coverability tree construction is easily modified toconsider only sequences accepted by A.
The reverse of N , NRev (w.r.t. A) is obtained by reversingthe flow relation (and arcs in A).
W (NRev) = −W (N).
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Reachability: A Sufficient Condition
In (N,m0) w.r.t. (A, q0), if
(a) (m∗, q∗) is semi-reachable from (m0, q0),(b) (m0 + a, q0) is reachable from (m0, q0), for a ≥ 1,(c) (m∗ + b, q∗) is reachable from (m∗, q∗) in NRev w.r.t. A,
for b ≥ 1,(d) (b− a, q∗) is semi-reachable from (0, q∗),
then (m∗, q∗) is reachable from (m0, q0).
The conditions above are effectively checkable:
(b) & (c) by coverability tree construction,(a) & (d) through the state equation.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
(m0, q0)
+a
(m0 + ka, q0)
+a(m∗ + ka, q∗)
b− a(m∗ + kb, q∗)
b− a−b
(m∗, q∗)
−b
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Reachability: The Mayr/Kosaraju Algorithm
Consider a controlled net (N,A) of the form,
A1 A2 Ak
q0
m0 mout1 min
2 mout2 min
k
q∗
m∗
ti1
with constraints min/outi [j] = x
i/oi,j or m
in/outi [j] ≥ yi/o
i,j ≥ 0.
If the sufficient reachability condition holds for each(min
i , qini ) and (mout
i , qouti ) w.r.t Ai, then (m∗, q∗) is
reachable from (m0, q0).
Let ∆(Ai) = {m |m = Wn(s), s ∈ L(Ai)}.Let Γ = {min
i ,mouti ,ni |mi+1
in −miout =
w(tii),miout −mi
in ∈ ∆(Ai), and constraints hold}.If (m0, q0) [s〉 (m∗, q∗), s defines an element in Γ.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Γ is a semi-linear set: consistency (non-emptiness) isdecidable via Pressburger arithmetic.
If Γ is consistent, but the sufficient condition does not holdin some Ai, then Ai can be replaced by a new “chain” ofcontrollers, A1
i , . . . , Alii , each of which is “simpler”:
more equality constraints (min/out
il= x
i/o
il,j), or
same equality constraints and smaller automaton.
There can be several possible replacements(non-deterministic choice).
If (m∗, q∗) is not reachable from (m0, q0), every choice(branch) eventually leads to an inconsistent system.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Special Classes of Nets
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Special Classes of Nets
State Machines:
every transition has one incoming and one outgoing arci.e. |•t| = |t•| = 1 for each t ∈ T .
Marked Graphs:
every place has one incoming arc, and one outgoing arci.e. |•p| = |p•| = 1 for each p ∈ P .
Free-choice Nets:
every arc is either the only arc going from the place, oronly arc going to the transitioni.e. |p•| ≤ 1 or •(p•) = {p} for each p ∈ P .
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Marked Graphs
An ordinary Petri net with |•p| = |p•| = 1 for each place p isa T-graph, or marked graph.
Abstracting away places leaves a directed graph:
Called the underlying graph (usually denoted G).A marking of the net is a marking of the edges of G.
Marked graphs model “decision-free” concurrent systems.
Several properties of marked graphs are decidable inpolynomial time:
Structural liveness and boundedness.Liveness and boundedness for a given initial marking.
Simple condition for realisability (and thus reachability).
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Marked and Underlying Graphs
SD
RA
RD
SA
SD
RA
RD
SA
••
U
S
P
C
US
P
C••
•
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Some Properties of Marked Graphs
Theorem: The total number of tokens on every directedcircuit in the underlying graph is invariant.
Theorem: The maximum number of tokens an edge a→ bin (G,m0) can ever have is equal to the minimum numberof tokens m0 places on any directed circuit that containsthis edge.
Theorem: A marked graph (G,m0) is live iff m0 places atleast one token on every directed circuit of G.
Theorem: A live marked graph (G,m0) is k-bounded iffevery place (edge in G) belongs to a directed circuit and m0
places at most k tokens on every directed circuit of G.
Theorem: A marked graph net has a live and boundedmarking iff G is strongly connected.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Free Choice Nets
An ordinary Petri net such that |p•| ≤ 1 or •(p•) = {p} foreach place p, is a free choice net.
Equivalently: If p• ∩ p′• 6= ∅ then |p•| = |p′•| = 1, for allp, p′ ∈ P .
Extended free choice net: If p• ∩ p′• 6= ∅ then p• = p′•, forall p, p′ ∈ P .
An extended free choice net can be transformed to a basicfree choice net, adding at most a linear number of placesand transitions.
Note: Marked graphs and state machines are also freechoice nets.
A fundamental property of free choice nets: if •t ∩ •t′ 6= ∅then whenever t is enabled, so is t′.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Free Choice Nets
p1
p5p4
p7
p2
p3
p6
p2p1
p4p3
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Decomposition of Free Choice Nets
A subnet of N = (P, T,W ) is a net N ′ = (P ′, T ′,W ′) withP ′ ⊆ P , T ′ ⊆ T and W ′ = W|(P ′∪T ′).
The P-subnet induced by S ⊆ P is (S, •S ∪ S•,W ′)That is, the subnet consisting of S and all transitionincident on a place in S.
The T-subnet induced by U ⊆ T is (•U ∪ U•, U,W ′)That is, the subnet consisting of U and all places incidenton a transition in U .
A P-component is a strongly connected P-subnet such that|•t|, |t•| ≤ 1, for all t.
A P-component is a state machine.
A T-component is a strongly connected T-subnet such that|•p|, |p•| ≤ 1, for all p
A T-component is a marked graph.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Decomposition of Free Choice Nets
Theorem: A live free choice net (N,m0) is 1-bounded(safe) iff it is covered by P-components, each of which has asingle token at m0.
Theorem: A live and safe free choice net (N,m0) iscovered by T-components, and for each T-component, N ′,there is a reachable marking m such that (N ′,m|N ′) is liveand safe.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Decomposition into State Machines
p1
p5p4
p7
p2
p3
p6
p1
p5p4
p7
p2
p3
p6
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Decomposition into Marked Graphs
p1
p5p4
p7
p2
p3
p6
p1
p5p4
p7
p2
p3
p6
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Siphons and Traps
A siphon is a subset S of places such that •S ⊆ S•.Every transition that outputs a token to a place in S alsoconsumes a token from a place in S.If m places no token in S, no marking reachable from mdoes either.
A trap is a subset S of places such that S• ⊆ •S.
Every transition that consumes a token from a place in Salso outputs a token to a place in S.If m places at least one token in S, so does every markingreachable from m.
Theorem: A free choice net (N,m0) is live iff every siphoncontains a marked trap.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Example: Siphons and Traps
p1
p5p4
p7
p2
p3
p6
The only siphon is P .
P is also a trap.
p2p1
p4p3
{p2} and {p3, p4} aresiphons.
{p1} and {p3, p4} are traps.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Some Complexity Results for Free Choice Nets
Liveness for marked free choice nets is decidable inpolynomial time.
Boundedness of live free choice nets is decidable inpolynomial time.
A number of properties of live and bounded free choice netsare decidable in polynomial time, e.g.,
Transition executability and repeated executability.The “home state” property (markings that can always bere-reached).
Reachability in free choice nets is NP-hard.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Characterisation by Derivation Rules
Initial net:
Rule #1: Add a new place p′ with r(p′) =∑
p∈P λpr(p)
and |p′•| = 1.
Rule #2: Replace place p with a connected P-graph N ′,and connect each input and output of p to at least oneplace in N ′.
Must have |•p| > 1 and |p•| > 1, except for initial net.Every place p′ ∈ N ′ must appear on a path in theresulting net that enters and leaves N ′.
Theorem: The class of nets obtained by applying the aboverules to the initial net is exactly the class of structurally liveand structurally bounded free choice nets.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Reachability: Acyclic Nets
Recall: m0 [s〉m implies∃n ∈ N|T | : Wn = (m−m0).
A solution n is realisable iffn = n(s) for some valid firingsequence s.
Theorem: For an acyclic net,every solution to Wn = (m−m0)is realisable.
Reachability in acyclic nets isNP-hard.
tx px
p1 t1 p′1
p2 t2 p′2
......
...
pn tn p′n
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Reachability: Marked Graphs
Theorem: In a live marked graph, m is reachable from m0
iff m0 and m place the same total number of tokens onevery fundamental circuit of the underlying graph.
A fundamental circuit is obtained by adding one edge to aspanning tree.The directed fundamental circuits of a marked graph are afull set of linearly independent P-invariants.
SD
RA
RD
SA
••
SD
RA
RD
SA
••
SD
RA
RD
SA
••
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Conclusions
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
Summary & Conclusions
Petri nets: Intuitive, graphical modelling formalism, closelyrelated to planning.
Petri net theory offers a different set of tools:
Algebraic methods (based on the state equation).Characterisation and study of classes of nets with specialstructure.
Planning also has tools potentially applicable to Petri nets.
Introduction
Basics
Complexity &Expressivity
AnalysisTechniques
SpecialClasses ofNets
Conclusion
The Many Things We Haven’t Talked About
Extensions of basic Place-Transition nets:
Read arcs, reset arcs and inhibitor arcs.Colored Petri nets, timed nets, stochastic nets, etc.
Other properties of Petri nets (and related decisionproblems):
Model checking (tense logics, process calculi).Language (trace) properties.
Heaps more results concerning different Petri net subclasses.