Petri Nets and Model Checking Natasa Gkolfi Petri Nets and Model Checking Natasa Gkolfi University of Oslo March 31, 2017
Petri Nets and Model Petri Nets Checking Natasa Gkolfi Petri Nets : ◮ mathematically founded formalism ◮ concurrency ◮ synchronization ◮ modeling distributed systems
Petri Nets and Model Petri Nets Checking Natasa Gkolfi Petri Nets : ◮ mathematically founded formalism ◮ concurrency ◮ synchronization ◮ modeling distributed systems ◮ Invented by C.A.Petri
Petri Nets and Model Petri Nets Checking Natasa Gkolfi Petri Nets : ◮ mathematically founded formalism ◮ concurrency ◮ synchronization ◮ modeling distributed systems ◮ Invented by C.A.Petri p 1 p 2 They are consisting of: t 1 1 ◮ places 1 ◮ transitions 2 ◮ arcs 1 ◮ tokens ◮ initial marking t 2
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Petri Nets - Mutual Exclusion Checking Natasa Gkolfi p 1 p 3 t 1 t 3 s p 2 p 4 t 2 t 4
Petri Nets and Model Colored Petri nets Checking Natasa Gkolfi High-level Petri nets The extension of Petri nets (called place/transition nets ) with abstract data types. Colored Petri nets COLORSET ( TYPE ) Guard EXPR COLORS(TYPE VALUES)
Petri Nets and Model Example: Dining Philosophers Checking Natasa Gkolfi ph1 cs1 cs2 ph5 ph2 Rice Dish cs5 cs3 ph4 ph3 cs4 opher system is modelled by the CP-net shown below. Th
Petri Nets and Model Example: Dining Philosophers Checking Natasa Gkolfi val n = 5; color PH = index ph with 1..n; color CS = index cs with 1..n; PH.all() var p: PH; Think fun Chopsticks(ph(i)) = PH 1`cs(i)++1`cs(if i=n then 1 else i+1); p Take Chopsticks(p) Chopstick p p CS.all() Unused Eat Chopsticks PH CS p Put Down Chopstick Chopsticks(p)
Petri Nets and Model State Space Checking Natasa Gkolfi State Space A directed graph having a node for each reachable marking and an arc for each occurring binding element.
Petri Nets and Model State Space Checking Natasa Gkolfi State Space A directed graph having a node for each reachable marking and an arc for each occurring binding element. There is one to one correspondence between the paths in the state space and the occurrence sequences (where all steps consisting of a single binding element)
Petri Nets and Model State Space Checking Natasa Gkolfi State Space A directed graph having a node for each reachable marking and an arc for each occurring binding element. There is one to one correspondence between the paths in the state space and the occurrence sequences (where all steps consisting of a single binding element) The strongly-connected-component graph (SCC graph) is the graph derived from the state space where each node is a SCC of the state space. SCC graph ◮ is an acyclic graph ◮ fewer nodes than the ss mean that there exist infinite occurrence sequences ◮ more efficient since often much smaller than the ss
Petri Nets and Model Example: Dining Philosophers State Space Checking Natasa Gkolfi Unused: 1`cs(3) Think: 1`ph(2)+ 1`ph(3)+ 1`ph(5) Eat: 1`ph(1)+ 1`ph(4) 10 2:2 Take: {p=ph(1)} Take: {p=ph(4)} 2 3:3 7 8 2:2 2:2 3 6 3:3 3:3 1 5:5 4 5 Put: {p=ph(2)} Put: {p=ph(3)} 3:3 3:3 9 11 2:2 2:2 Unused: 1`cs(1) Unused: 1`cs(5) Think: 1`ph(1)+ 1`ph(3)+ 1`ph(5) Think: 1`ph(2)+ 1`ph(4)+ 1`ph(5) Eat: 1`ph(2)+ 1`ph(4) Eat: 1`ph(1)+ 1`ph(3)
Petri Nets and Model Behavioral Properties Checking Natasa Gkolfi Boundedness properties How many and which tokes a place may hold when all reachable markings are considered. Home Properties A home marking is a marking that can be reached from any reachable marking ◮ All the markings in a (single) terminal SCC are home markings
Petri Nets and Model Behavioral Properties Checking Natasa Gkolfi Liveness Properties A dead marking is a marking in which no binding elements are enabled. Similarly dead transition . A transition is live if, starting from any reachable marking, we can always find an occurrence sequence containing it.
Petri Nets and Model Behavioral Properties Checking Natasa Gkolfi Liveness Properties A dead marking is a marking in which no binding elements are enabled. Similarly dead transition . A transition is live if, starting from any reachable marking, we can always find an occurrence sequence containing it. Fairness Properties How often transitions occur in infinite occurrence sequences. A transition is impartial if it occurs infinitely often in all infinite occurrence sequences. ◮ Removal of this transition implies no infinite occurrence sequences!
Petri Nets and Model Example: Dining Philosophers Checking Natasa Gkolfi r of philosophers: | PH | Nodes Arcs 2 3 4 3 4 6 4 7 16 5 11 30 6 18 60 7 29 112 8 47 208 9 76 378 10 123 680 15 1,364 11,310
Petri Nets and Model State Space Reduction Methods Checking Natasa Gkolfi ◮ Sweep-Line method A progress measure is a function that maps each marking into a progress value . For a given marking, the progress value of any successor marking must be greater or equal to its progress value.
Petri Nets and Model State Space Reduction Methods Checking Natasa Gkolfi ◮ Sweep-Line method A progress measure is a function that maps each marking into a progress value . For a given marking, the progress value of any successor marking must be greater or equal to its progress value. ◮ Symmetry method Equivalence classes used for symmetric markings and symmetric binding elements. ◮ the ss can be significantly reduced ◮ can check all behavioral properties that are invariant under symmetry ◮ computing canonical representations of markings and binding elements is computationally expensive
Petri Nets and Model State Space Reduction Methods Checking Natasa Gkolfi ◮ Sweep-Line method A progress measure is a function that maps each marking into a progress value . For a given marking, the progress value of any successor marking must be greater or equal to its progress value. ◮ Symmetry method Equivalence classes used for symmetric markings and symmetric binding elements. ◮ the ss can be significantly reduced ◮ can check all behavioral properties that are invariant under symmetry ◮ computing canonical representations of markings and binding elements is computationally expensive ◮ Equivalence method A generalization of the symmetry method. Here, no requirement that the equivalence relations should be induced by symmetries.
Petri Nets and Model Checking Natasa Gkolfi Thank you!
Recommend
More recommend