An SMT-Based Approach to Coverability Analysis
Javier Esparza1, Ruslán Ledesma-Garza1, Rupak Majumdar2, Philipp Meyer1, Filip Niksic2
1 Technische Universität München 2 MPI-SWS
An SMT-Based Approach to Coverability Analysis Javier Esparza 1 , - - PowerPoint PPT Presentation
An SMT-Based Approach to Coverability Analysis Javier Esparza 1 , Rusln Ledesma-Garza 1 , Rupak Majumdar 2 , Philipp Meyer 1 , Filip Niksic 2 1 Technische Universitt Mnchen 2 MPI-SWS Petri net coverability is important, but difficult
Javier Esparza1, Ruslán Ledesma-Garza1, Rupak Majumdar2, Philipp Meyer1, Filip Niksic2
1 Technische Universität München 2 MPI-SWS
coverability problem
MIST — Expand-enlarge-check [GRB ’06] BFC — Minimal uncoverability proof [KKW ’12] IIC — Incremental, inductive coverability [KMNP ’13]
Examples proved safe
23 46 69 92 115 MIST BFC IIC Together
64 51 61 33
Incomplete
Traps — essentially Boolean constraints Still incomplete
Use SMT for linear and Boolean constraints. But LinCon is incomplete.
Examples proved safe
23 46 69 92 115 MIST BFC IIC Together LinCon
96 64 51 61 33
Examples proved safe
23 46 69 92 115 MIST BFC IIC Together LinCon
96 64 51 61 33
All but one example in under 100 s
Main contribution:
LinCon works well Also:
succinct inductive invariants
Main contribution:
LinCon works well Also:
succinct inductive invariants
Petri nets and LinCon Experiments
Petri nets and LinCon Experiments
x y z s t r
x y z s t r
transitions places token
x y z s t r
transitions places token
(0, 1, 0) initial marking
x y z s t r
transitions places token
(0, 1, 0) initial marking
x y z s t r
transitions places token
(0, 1, 0) (1, 1, 0) initial marking +(1, 0, 0)
x y z s t r
transitions places token
(0, 1, 0) (1, 1, 0) initial marking +(1, 0, 0)
x y z s t r
transitions places token
(0, 1, 0) (1, 1, 0) (0, 1, 1) initial marking +(1, 0, 0) +(-1, 0, 1)
x y z s t r
transitions places token
(0, 1, 0) (1, 1, 0) (0, 1, 1) initial marking reachable markings +(1, 0, 0) +(-1, 0, 1)
x y z s t r x y z = 1 + 1 −1 1 −1 s t r Ignore the order of transitions:
x y z s t r Ignore the order of transitions:
transition vector incidence matrix initial marking marking vector
Given a Petri net with:
Is there a reachable marking mr that covers mt?
m0 mt mr
Given a Petri net with:
Is there a reachable marking mr that covers mt?
m0 mt mr
If mt is not coverable, Petri net is safe.
If the constraints are not feasible, the Petri net is safe.
Trap — set of places such that every transition that consumes tokens from it also puts tokens into it. x y z
Trap — set of places such that every transition that consumes tokens from it also puts tokens into it. x y z
Trap — set of places such that every transition that consumes tokens from it also puts tokens into it. If a trap is marked, it stays marked. x y z
Trap — set of places such that every transition that consumes tokens from it also puts tokens into it. If a trap is marked, it stays marked. x y z x + y ≥ 1
M = m0 + CX M ≥ mt X ≥ 0
M = m0 + CX M ≥ mt X ≥ 0
no solution safe
M = m0 + CX M ≥ mt X ≥ 0
no solution safe
M = mr X = xr
M = m0 + CX M ≥ mt X ≥ 0
no solution safe
M = mr X = xr
Is there a trap
M = m0 + CX M ≥ mt X ≥ 0
no solution safe
M = mr X = xr
Is there a trap
SAT query:
M = m0 + CX M ≥ mt X ≥ 0
no solution safe
M = mr X = xr
Is there a trap
no solution inconclusive SAT query:
M = m0 + CX M ≥ mt X ≥ 0
no solution safe
M = mr X = xr
Is there a trap
no solution inconclusive SAT query:
Tp = ( 1, p in trap 0,
no solution safe
M = mr X = xr
Is there a trap
no solution inconclusive SAT query:
Tp = ( 1, p in trap 0,
M = m0 + CX M ≥ mt X ≥ 0 T τM ≥ 1
Experiments Petri nets and LinCon
Experiments Petri nets and LinCon
Examples from the literature
Examples from verification of concurrent C programs
programs [MMW ’13]
Examples modeling a medical system and a bug-tracking system
Examples from verification of Erlang programs Contains a Petri net with 66,950 places and 213,625 transitions
BFC (time in sec)
0,01 0,1 1 10 100 1000 10000 100000
LinCon (time in sec)
0,01 0,1 1 10 100 1000 10000 100000
BFC (time in sec)
0,01 0,1 1 10 100 1000 10000 100000
LinCon (time in sec)
0,01 0,1 1 10 100 1000 10000 100000
30 min
BFC (time in sec)
0,01 0,1 1 10 100 1000 10000 100000
LinCon (time in sec)
0,01 0,1 1 10 100 1000 10000 100000
30 min 25 s
BFC (time in sec)
0,01 0,1 1 10 100 1000 10000 100000
LinCon (time in sec)
0,01 0,1 1 10 100 1000 10000 100000
30 min 25 s 2 h
Examples proved safe
23 46 69 92 115 MIST BFC IIC Together LinCon
96 64 51 61 33
Examples proved safe
23 46 69 92 115 MIST BFC IIC Together LinCon
96 64 51 61 33
Examples proved safe
23 46 69 92 115 MIST BFC IIC Together LinCon
84 64 51 61 33
Examples proved safe
23 46 69 92 115 BFC BFC+LinCon Together Together+LinCon
107 105 64 61
Petri net coverability
… on its own … as a cheap preprocessing step in other tools