Bounded Parametric Model Checking for Petri Nets

Bounded Parametric Model Checking
for
Petri Nets
Wojciech Penczek
a joint work with MichaΕ‚ Knapik and Agata PóΕ‚rola
Institute of Computer Science, Polish Academy of Sciences
Carl Adam Petri Memorial Symposium, Berlin, 4 February 2011
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
1 / 29
Outline
1
Introduction to Parametric Model Checking
2
Benchmark: Mutual exclusion (MUTEX)
3
Syntax and Semantics of PRTCTL
4
Bounded parametric model checking for ENS
5
Parametric reachability for DTPN
6
Experimental Results
7
Final Remarks
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
2 / 29
Model Checking
Standard
?
M
πœ‘
∣=
a Kripke model
a modal formula
For Petri Nets
M is a model corresponding either to the marking graph of an EPN or
to the concrete state graph of a TPN.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
3 / 29
Parametric Model Checking
Parameters can appear in:
{p}
{p, q}
x ≀ Θ1
a (timed) model1,5
y ≀ Θ2
start
{p, q}
a formula2,3
x β‰₯ Θ1 + Θ2
a model and a formula4
y ≀ Θ1
{q}
βˆ€Ξ˜β‰€b EF (¬p ∧ EGβ‰€Ξ˜ c1 )
1
T. Hune, J. Romijn, M. Stoelinga, F. Vaandrager, Linear parametric model checking of timed automata, TACAS’01, LNCS
2031, 2001, pp. 189–203.
2
V. Bruyére, E. Dall’Olio, J-F. Raskin, Durations and Parametric Model-Checking in Timed Automata, ACM Transactions on
Computational Logic 9(2), 2008, pp. 1–21.
3
E.A. Emerson, R. Trefler, Parametric quantitative temporal reasoning, LICS’99, 1999, pp. 336–343.
4
F. Raskin, V. Bruyère, Real-Time Model Checking: Parameters Everywhere, FSTTCS’03, LNCS 2914, 2003, pp. 100–111.
5
L-M. Tranouez, D. Lime, and O. H. Roux, Parametric model checking of time Petri nets with stopwatches using the state-class
graph, FORMATS’08, LNCS 5215, 2008, pp. 280–294.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
4 / 29
Parametric Model Checking
Parameters can appear in:
{p}
{p, q}
x ≀ Θ1
a (timed) model1,5
y ≀ Θ2
start
{p, q}
a formula2,3
x β‰₯ Θ1 + Θ2
a model and a formula4
y ≀ Θ1
{q}
βˆ€Ξ˜β‰€b EF (¬p ∧ EGβ‰€Ξ˜ c1 )
1
T. Hune, J. Romijn, M. Stoelinga, F. Vaandrager, Linear parametric model checking of timed automata, TACAS’01, LNCS
2031, 2001, pp. 189–203.
2
V. Bruyére, E. Dall’Olio, J-F. Raskin, Durations and Parametric Model-Checking in Timed Automata, ACM Transactions on
Computational Logic 9(2), 2008, pp. 1–21.
3
E.A. Emerson, R. Trefler, Parametric quantitative temporal reasoning, LICS’99, 1999, pp. 336–343.
4
F. Raskin, V. Bruyère, Real-Time Model Checking: Parameters Everywhere, FSTTCS’03, LNCS 2914, 2003, pp. 100–111.
5
L-M. Tranouez, D. Lime, and O. H. Roux, Parametric model checking of time Petri nets with stopwatches using the state-class
graph, FORMATS’08, LNCS 5215, 2008, pp. 280–294.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
4 / 29
Parametric Model Checking
Parameters can appear in:
{p}
{p, q}
x ≀ Θ1
a (timed) model1,5
y ≀ Θ2
start
{p, q}
a formula2,3
x β‰₯ Θ1 + Θ2
a model and a formula4
y ≀ Θ1
{q}
βˆ€Ξ˜β‰€b EF (¬p ∧ EGβ‰€Ξ˜ c1 )
1
T. Hune, J. Romijn, M. Stoelinga, F. Vaandrager, Linear parametric model checking of timed automata, TACAS’01, LNCS
2031, 2001, pp. 189–203.
2
V. Bruyére, E. Dall’Olio, J-F. Raskin, Durations and Parametric Model-Checking in Timed Automata, ACM Transactions on
Computational Logic 9(2), 2008, pp. 1–21.
3
E.A. Emerson, R. Trefler, Parametric quantitative temporal reasoning, LICS’99, 1999, pp. 336–343.
4
F. Raskin, V. Bruyère, Real-Time Model Checking: Parameters Everywhere, FSTTCS’03, LNCS 2914, 2003, pp. 100–111.
5
L-M. Tranouez, D. Lime, and O. H. Roux, Parametric model checking of time Petri nets with stopwatches using the state-class
graph, FORMATS’08, LNCS 5215, 2008, pp. 280–294.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
4 / 29
Time Petri Net: Timed Mutex
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
5 / 29
Parametric Model Checking
Complexity
If parameters are in:
a model (e.g., TA, TPN), then reachability is undecidable,
a formula, then for TECTL – 3EXPTIME,
both a model and a formula, then reachability is undecidable.
Idea
SAT-based Bounded Model Checking applied to parametric verification.
Applications
BMC for PRTCTL1 :
parameters in formulas for Elementary Petri Nets2 , and
parametric reachability for Time Petri Nets3 .
1
E.A. Emerson, R. Trefler, Parametric quantitative temporal reasoning, LICS’99, 1999, pp. 336–343.
M. Knapik, M. Szreter, W. Penczek, Bounded Parametric Model Checking for ENS, TOPNOC 4:42-71, 2010
M. Knapik, W. Penczek, M. Szreter, A. Polrola:, Bounded Parametric Verification for Distributed TPS with Discrete-Time
Semantics, FI, 101(1-2): 9-27, 2010
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
2
3
6 / 29
Parametric Model Checking
Complexity
If parameters are in:
a model (e.g., TA, TPN), then reachability is undecidable,
a formula, then for TECTL – 3EXPTIME,
both a model and a formula, then reachability is undecidable.
Idea
SAT-based Bounded Model Checking applied to parametric verification.
Applications
BMC for PRTCTL1 :
parameters in formulas for Elementary Petri Nets2 , and
parametric reachability for Time Petri Nets3 .
1
E.A. Emerson, R. Trefler, Parametric quantitative temporal reasoning, LICS’99, 1999, pp. 336–343.
M. Knapik, M. Szreter, W. Penczek, Bounded Parametric Model Checking for ENS, TOPNOC 4:42-71, 2010
M. Knapik, W. Penczek, M. Szreter, A. Polrola:, Bounded Parametric Verification for Distributed TPS with Discrete-Time
Semantics, FI, 101(1-2): 9-27, 2010
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
2
3
6 / 29
Parametric Model Checking
Complexity
If parameters are in:
a model (e.g., TA, TPN), then reachability is undecidable,
a formula, then for TECTL – 3EXPTIME,
both a model and a formula, then reachability is undecidable.
Idea
SAT-based Bounded Model Checking applied to parametric verification.
Applications
BMC for PRTCTL1 :
parameters in formulas for Elementary Petri Nets2 , and
parametric reachability for Time Petri Nets3 .
1
E.A. Emerson, R. Trefler, Parametric quantitative temporal reasoning, LICS’99, 1999, pp. 336–343.
M. Knapik, M. Szreter, W. Penczek, Bounded Parametric Model Checking for ENS, TOPNOC 4:42-71, 2010
M. Knapik, W. Penczek, M. Szreter, A. Polrola:, Bounded Parametric Verification for Distributed TPS with Discrete-Time
Semantics, FI, 101(1-2): 9-27, 2010
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
2
3
6 / 29
Working example: mutual exclusion
Petri Net: MUTEX
Mutual exclusion:
n processes compete for access to
the shared resource p,
token in:
β–Ά
β–Ά
β–Ά
β–Ά
wi : the i–th process is waiting,
ci : the i–th process in a critical
section,
ri : the i–th process is in an
unguarded section,
p: the resource is available.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
7 / 29
Syntax and Semantics
Syntax of vRTCTL
𝒫𝒱 – propositional formulas, containing the symbol true,
Parameters = {Θ1 , . . . , Θn } – parameter variables,
βˆ‘
Linear expressions – πœ‚ = ni=1 ci Θi + c0 , where c0 , . . . , cn ∈ β„•.
vRTCTL syntax:
𝒫𝒱 βŠ† vRTCTL,
if 𝛼, 𝛽 ∈ vRTCTL, then ¬π›Ό, 𝛼 ∨ 𝛽, 𝛼 ∧ 𝛽 ∈ vRTCTL,
if 𝛼, 𝛽 ∈ vRTCTL, then EX 𝛼, EG𝛼, E𝛼U𝛽 ∈ vRTCTL,
if 𝛼, 𝛽 ∈ vRTCTL, then EGβ‰€πœ‚ 𝛼, E𝛼U β‰€πœ‚ 𝛽 ∈ vRTCTL.
Example
πœ‘(Θ) = EF (¬p ∧ EGβ‰€Ξ˜ c1 )
(EF 𝛼 = EtrueU𝛼 – a derived modality)
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
8 / 29
Syntax and Semantics
Syntax of vRTCTL
𝒫𝒱 – propositional formulas, containing the symbol true,
Parameters = {Θ1 , . . . , Θn } – parameter variables,
βˆ‘
Linear expressions – πœ‚ = ni=1 ci Θi + c0 , where c0 , . . . , cn ∈ β„•.
vRTCTL syntax:
𝒫𝒱 βŠ† vRTCTL,
if 𝛼, 𝛽 ∈ vRTCTL, then ¬π›Ό, 𝛼 ∨ 𝛽, 𝛼 ∧ 𝛽 ∈ vRTCTL,
if 𝛼, 𝛽 ∈ vRTCTL, then EX 𝛼, EG𝛼, E𝛼U𝛽 ∈ vRTCTL,
if 𝛼, 𝛽 ∈ vRTCTL, then EGβ‰€πœ‚ 𝛼, E𝛼U β‰€πœ‚ 𝛽 ∈ vRTCTL.
Example
πœ‘(Θ) = EF (¬p ∧ EGβ‰€Ξ˜ c1 )
(EF 𝛼 = EtrueU𝛼 – a derived modality)
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
8 / 29
Syntax and semantics
Model for vRTCTL and PRTCTL
A Kripke structure M = (S, β†’, β„’) is a model, where
S – a finite set of states,
β†’ βŠ† S × S – a transition relation s.t. βˆ€s∈S βˆƒsβ€² ∈S s β†’ sβ€² ,
β„’ : S βˆ’β†’ 2𝒫𝒱 – a labelling function s.t. βˆ€s∈S true ∈ β„’(s).
Parameter valuations
vRTCTL formulae are interpreted under parameter valuations:
𝜐 : Parameters β†’ β„•,
𝜐 is extended to the linear expressions πœ‚.
Example
For πœ‘(Θ) = EF (¬p ∧ EGβ‰€Ξ˜ c1 ) and 𝜐 s.t. 𝜐(Θ) = 2
πœ‘(𝜐) = EF (¬p ∧ EG≀2 c1 )
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
9 / 29
Syntax and semantics
Model for vRTCTL and PRTCTL
A Kripke structure M = (S, β†’, β„’) is a model, where
S – a finite set of states,
β†’ βŠ† S × S – a transition relation s.t. βˆ€s∈S βˆƒsβ€² ∈S s β†’ sβ€² ,
β„’ : S βˆ’β†’ 2𝒫𝒱 – a labelling function s.t. βˆ€s∈S true ∈ β„’(s).
Parameter valuations
vRTCTL formulae are interpreted under parameter valuations:
𝜐 : Parameters β†’ β„•,
𝜐 is extended to the linear expressions πœ‚.
Example
For πœ‘(Θ) = EF (¬p ∧ EGβ‰€Ξ˜ c1 ) and 𝜐 s.t. 𝜐(Θ) = 2
πœ‘(𝜐) = EF (¬p ∧ EG≀2 c1 )
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
9 / 29
Syntax and semantics
Model for vRTCTL and PRTCTL
A Kripke structure M = (S, β†’, β„’) is a model, where
S – a finite set of states,
β†’ βŠ† S × S – a transition relation s.t. βˆ€s∈S βˆƒsβ€² ∈S s β†’ sβ€² ,
β„’ : S βˆ’β†’ 2𝒫𝒱 – a labelling function s.t. βˆ€s∈S true ∈ β„’(s).
Parameter valuations
vRTCTL formulae are interpreted under parameter valuations:
𝜐 : Parameters β†’ β„•,
𝜐 is extended to the linear expressions πœ‚.
Example
For πœ‘(Θ) = EF (¬p ∧ EGβ‰€Ξ˜ c1 ) and 𝜐 s.t. 𝜐(Θ) = 2
πœ‘(𝜐) = EF (¬p ∧ EG≀2 c1 )
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
9 / 29
Syntax and semantics
start
𝛼
start
𝛼
𝛼
𝛼
𝛼
𝛼
𝛼
𝛽
M, start ∣= EG≀3 𝛼
W. Penczek (ICS PAS)
M, start ∣= E𝛼U ≀3 𝛽
Parametric BMC for Petri Nets
the 4th of February, 2011
10 / 29
Syntax and Semantics
start
start
𝛼
𝛼
M, start ∣= EF ≀2 𝛼
M, start ∣= EX 𝛼
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
11 / 29
Syntax
Syntax of PRTCTL
vRTCTL βŠ† PRTCTL,
if 𝛼(Θ) ∈ vRTCTL βˆͺ PRTCTL, then
βˆ€Ξ˜ 𝛼(Θ), βˆƒΞ˜ 𝛼(Θ), βˆ€Ξ˜β‰€a 𝛼(Θ), βˆƒΞ˜β‰€a 𝛼(Θ) ∈ PRTCTL for a ∈ β„•.
Notation: 𝛼(Θ1 , . . . , Θn ) denotes that Θ1 , . . . , Θn are free in 𝛼.
Example
πœ‘31 = βˆ€Ξ˜β‰€3 EF (¬p ∧ EGβ‰€Ξ˜ c1 )
We consider the closed formulae (sentences) of PRTCTL only.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
12 / 29
Syntax
Syntax of PRTCTL
vRTCTL βŠ† PRTCTL,
if 𝛼(Θ) ∈ vRTCTL βˆͺ PRTCTL, then
βˆ€Ξ˜ 𝛼(Θ), βˆƒΞ˜ 𝛼(Θ), βˆ€Ξ˜β‰€a 𝛼(Θ), βˆƒΞ˜β‰€a 𝛼(Θ) ∈ PRTCTL for a ∈ β„•.
Notation: 𝛼(Θ1 , . . . , Θn ) denotes that Θ1 , . . . , Θn are free in 𝛼.
Example
πœ‘31 = βˆ€Ξ˜β‰€3 EF (¬p ∧ EGβ‰€Ξ˜ c1 )
We consider the closed formulae (sentences) of PRTCTL only.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
12 / 29
Semantics
Semantics of PRTCTL (the closed formulae)
β‹€
M, s ∣= βˆ€Ξ˜ 𝛼(Θ) iff 0≀iΘ M, s ∣= 𝛼(Θ ← iΘ ),
β‹€
M, s ∣= βˆ€Ξ˜β‰€a 𝛼(Θ) iff 0≀iΘ ≀a M, s ∣= 𝛼(Θ ← iΘ ),
⋁
M, s ∣= βˆƒΞ˜ 𝛼(Θ) iff 0≀iΘ M, s ∣= 𝛼(Θ ← iΘ ),
⋁
M, s ∣= βˆƒΞ˜β‰€a 𝛼(Θ) iff 0≀iΘ ≀a M, s ∣= 𝛼(Θ ← iΘ ).
Example
M, s ∣= πœ‘31 iff
W. Penczek (ICS PAS)
β‹€
iΘ ≀3 M, s
∣= EF (¬p ∧ EG≀iΘ c1 )
Parametric BMC for Petri Nets
the 4th of February, 2011
13 / 29
Semantics
Semantics of PRTCTL (the closed formulae)
β‹€
M, s ∣= βˆ€Ξ˜ 𝛼(Θ) iff 0≀iΘ M, s ∣= 𝛼(Θ ← iΘ ),
β‹€
M, s ∣= βˆ€Ξ˜β‰€a 𝛼(Θ) iff 0≀iΘ ≀a M, s ∣= 𝛼(Θ ← iΘ ),
⋁
M, s ∣= βˆƒΞ˜ 𝛼(Θ) iff 0≀iΘ M, s ∣= 𝛼(Θ ← iΘ ),
⋁
M, s ∣= βˆƒΞ˜β‰€a 𝛼(Θ) iff 0≀iΘ ≀a M, s ∣= 𝛼(Θ ← iΘ ).
Example
M, s ∣= πœ‘31 iff
W. Penczek (ICS PAS)
β‹€
iΘ ≀3 M, s
∣= EF (¬p ∧ EG≀iΘ c1 )
Parametric BMC for Petri Nets
the 4th of February, 2011
13 / 29
Example of a PRTCTL formula
βˆ€Ξ˜ [AG(request β‡’ AF β‰€Ξ˜ receive) β‡’ AG(request β‡’ AF ≀2×Θ grant)]
expresses much more than the corresponding CTL formula
[AG(request β‡’ AFreceive) β‡’ AG(request β‡’ AFgrant)]
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
14 / 29
Complexity of model checking
For CTL, vRTCTL, and PRTCTL
CTL and vRTCTL can be model checked in time O(∣M∣ β‹… βˆ£πœ‘βˆ£).
PRTCTL can be model checked in time O(∣M∣k +1 β‹… βˆ£πœ‘βˆ£), where k is
the number of parameters in πœ‘.
E.A. Emerson, R. Trefler, Parametric quantitative temporal reasoning, LICS’99, 1999, pp.
336–343.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
15 / 29
Syntax and Semantics
Existential fragments
The logics vRTECTL and PRTECTL are defined as the restrictions of,
respectively, vRTCTL and the set of sentences of PRTCTL such that
the negation can be applied to propositions only.
Example: πœ‘41 = βˆ€Ξ˜β‰€4 EF (¬p ∧ EGβ‰€Ξ˜ c1 )
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
16 / 29
Syntax and Semantics
Existential fragments
The logics vRTECTL and PRTECTL are defined as the restrictions of,
respectively, vRTCTL and the set of sentences of PRTCTL such that
the negation can be applied to propositions only.
Example: πœ‘41 = βˆ€Ξ˜β‰€4 EF (¬p ∧ EGβ‰€Ξ˜ c1 )
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
16 / 29
Syntax and semantics – back to MUTEX
Petri Net for MUTEX
The marking graph
start
(w1 , w2 , p)
(c1 , w2 )
(w1 , c2 )
(r1 , w2 , p)
(w1 , r2 , p)
(c1 , r2 )
(r1 , c2 )
(r1 , r2 , p)
Let πœ‘b1 = βˆ€Ξ˜β‰€b EF (¬p ∧ EGβ‰€Ξ˜ c1 ).
Intuitive meaning of M, start ∣= πœ‘b1 :
"There exists a future state, such that the resource is taken
and the first process stays in the critical section for any time
value bounded by b"
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
17 / 29
Bounded semantics
k –models
Idea – to unwind the computation tree of a model
M up to depth k .
M – a model, k ∈ β„•,
Pathk – the set of all sequences (s0 , . . . , sk ),
where si β†’ si+1 .
Mk = (Pathk , β„’) is called the k -model.
If an existential formula πœ‘ holds in Mk , then πœ‘
holds in M.
The problem Mk ∣= πœ‘ is translated to
checking satisfiability of the propositional
formula [Mk ] ∧ [πœ‘] using a SAT-solver.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
18 / 29
Bounded semantics
k –models
Idea – to unwind the computation tree of a model
M up to depth k .
M – a model, k ∈ β„•,
Pathk – the set of all sequences (s0 , . . . , sk ),
where si β†’ si+1 .
Mk = (Pathk , β„’) is called the k-model.
If an existential formula πœ‘ holds in Mk , then πœ‘
holds in M.
The problem Mk ∣= πœ‘ is translated to
checking satisfiability of the propositional
formula [Mk ] ∧ [πœ‘] using a SAT-solver.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
18 / 29
Bounded semantics
k –models
Idea – to unwind the computation tree of a model
M up to depth k .
M – a model, k ∈ β„•,
Pathk – the set of all sequences (s0 , . . . , sk ),
where si β†’ si+1 .
Mk = (Pathk , β„’) is called the k-model.
If an existential formula πœ‘ holds in Mk , then πœ‘
holds in M.
The problem Mk ∣= πœ‘ is translated to
checking satisfiability of the propositional
formula [Mk ] ∧ [πœ‘] using a SAT-solver.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
18 / 29
Bounded semantics
k –models
Idea – to unwind the computation tree of a model
M up to depth k .
M – a model, k ∈ β„•,
Pathk – the set of all sequences (s0 , . . . , sk ),
where si β†’ si+1 .
Mk = (Pathk , β„’) is called the k-model.
If an existential formula πœ‘ holds in Mk , then πœ‘
holds in M.
The problem Mk ∣= πœ‘ is translated to
checking satisfiability of the propositional
formula [Mk ] ∧ [πœ‘] using a SAT-solver.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
18 / 29
Bounded semantics
k –models
Idea – to unwind the computation tree of a model
M up to depth k .
M – a model, k ∈ β„•,
Pathk – the set of all sequences (s0 , . . . , sk ),
where si β†’ si+1 .
Mk = (Pathk , β„’) is called the k-model.
If an existential formula πœ‘ holds in Mk , then πœ‘
holds in M.
The problem Mk ∣= πœ‘ is translated to
checking satisfiability of the propositional
formula [Mk ] ∧ [πœ‘] using a SAT-solver.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
18 / 29
Translation to boolean formula
Encoding submodels
[ ]A
β‹€ β‹€ βˆ’1
M k := j∈A ki=0
T (wi,j , wi+1,j )
Where A – a set of path indices determined by function5 fk .
[ ]A
V ∣= M k iff V encodes k –model
Encoding formulae
πœ‘ – a PRTCTL formula
⇓
[ ]
πœ‘ k – a propositional
formula
5
Testing formula
[ ]Fk (𝛼)
[ ]
M k
∧ Is (w0,0 ) ∧ πœ‘ k
W. Penczek, B. Woźna, A. Zbrzezny, Bounded Model Checking for the Universal Fragment of CTL, Fundamenta Informaticae,
vol. 51(1-2), 2002, pp. 135–156.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
19 / 29
Translation to boolean formula
Encoding submodels
[ ]A
β‹€ β‹€ βˆ’1
M k := j∈A ki=0
T (wi,j , wi+1,j )
Where A – a set of path indices determined by function5 fk .
[ ]A
V ∣= M k iff V encodes k –model
Encoding formulae
πœ‘ – a PRTCTL formula
⇓
[ ]
πœ‘ k – a propositional
formula
5
Testing formula
[ ]Fk (𝛼)
[ ]
M k
∧ Is (w0,0 ) ∧ πœ‘ k
W. Penczek, B. Woźna, A. Zbrzezny, Bounded Model Checking for the Universal Fragment of CTL, Fundamenta Informaticae,
vol. 51(1-2), 2002, pp. 135–156.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
19 / 29
Translation to boolean formula
Encoding submodels
[ ]A
β‹€ β‹€ βˆ’1
M k := j∈A ki=0
T (wi,j , wi+1,j )
Where A – a set of path indices determined by function5 fk .
[ ]A
V ∣= M k iff V encodes k –model
Encoding formulae
πœ‘ – a PRTCTL formula
⇓
[ ]
πœ‘ k – a propositional
formula
5
Testing formula
[ ]Fk (𝛼)
[ ]
M k
∧ Is (w0,0 ) ∧ πœ‘ k
W. Penczek, B. Woźna, A. Zbrzezny, Bounded Model Checking for the Universal Fragment of CTL, Fundamenta Informaticae,
vol. 51(1-2), 2002, pp. 135–156.
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
19 / 29
Distributed Time Petri Nets
Time Petri Nets
A Time Petri Net (TPN) - a tuple N = (P, T , F , m0 , Eft, Lft), where:
P, T , F , m0 - like before,
Eft : T β†’ IN, Lft : T β†’ IN βˆͺ {∞} - earliest and latest firing times of
transitions (Eft(t) ≀ Lft(t) for each t ∈ T )
Distributed Time Petri Nets
A Distributed Time Petri Net (DTPN) - a set of sequential(βˆ—) TPNs, of
pairwise disjoint sets of places, and communicating via joint transitions.
(βˆ—)
a net is sequential if none of its reachable markings concurrently enables two transitions
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
20 / 29
Distributed Time Petri Nets
Time Petri Nets
A Time Petri Net (TPN) - a tuple N = (P, T , F , m0 , Eft, Lft), where:
P, T , F , m0 - like before,
Eft : T β†’ IN, Lft : T β†’ IN βˆͺ {∞} - earliest and latest firing times of
transitions (Eft(t) ≀ Lft(t) for each t ∈ T )
Distributed Time Petri Nets
A Distributed Time Petri Net (DTPN) - a set of sequential(βˆ—) TPNs, of
pairwise disjoint sets of places, and communicating via joint transitions.
(βˆ—)
a net is sequential if none of its reachable markings concurrently enables two transitions
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
20 / 29
Example: Fischer’s mutual exclusion protocol
setx0_1
[0, ∞)
setx1
[0, Ξ”]
idle1
start1
trying1
critical1
setx1βˆ’copy1
enter1
[0, Ξ”]
[0, ∞)
waiting1
[𝛿, ∞)
[0, Ξ”]
setx1βˆ’copy2
place 1
place 0
place 2
setx2βˆ’copy2
[0, Ξ”]
start2
idle2
[0, ∞)
trying2
[0, Ξ”]
setx2βˆ’copy1
waiting2
enter2
[𝛿, ∞)
critical2
[0, Ξ”]
setx2
setx0_2[0, ∞)
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
21 / 29
Parametric verification for DTPNs
Parametric reachability - a general problem
Given a property p, we want to find:
the minimal time c ∈ N at which a state satisfying p can be
reached
(corresponds to finding the minimal c s.t. EF≀c p or EF<c p holds),
Details of the verification method:
W.Penczek, A.PóΕ‚rola, A.Zbrzezny: SAT-Based (Parametric)
Reachability for a Class of Distributed Time Petri Nets, T. Petri Nets
and Other Models of Concurrency 4: 72-97 (2010).
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
22 / 29
Parametric reachability
A general solution
Searching for a minimal c ∈ IN s.t. EF≀c p:
1
test whether p is reachable
2
if so, extract the time x at which it has been reached (we know
that c ≀ ⌈xβŒ‰)
3
check whether there is a path of a shorter time at which p is
reachable
4
if such a path exists return to 2, otherwise return ⌈xβŒ‰
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
23 / 29
Parametric reachability
A general solution
Searching for a minimal c ∈ IN s.t. EF≀c p:
1
test whether p is reachable
2
if so, extract the time x at which it has been reached (we know
that c ≀ ⌈xβŒ‰)
3
check whether there is a path of a shorter time at which p is
reachable
4
if such a path exists return to 2, otherwise return ⌈xβŒ‰
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
23 / 29
Parametric reachability
A general solution
Searching for a minimal c ∈ IN s.t. EF≀c p:
1
test whether p is reachable
2
if so, extract the time x at which it has been reached (we know
that c ≀ ⌈xβŒ‰)
3
check whether there is a path of a shorter time at which p is
reachable
4
if such a path exists return to 2, otherwise return ⌈xβŒ‰
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
23 / 29
Parametric reachability
A general solution
Searching for a minimal c ∈ IN s.t. EF≀c p:
1
test whether p is reachable
2
if so, extract the time x at which it has been reached (we know
that c ≀ ⌈xβŒ‰)
3
check whether there is a path of a shorter time at which p is
reachable
4
if such a path exists return to 2, otherwise return ⌈xβŒ‰
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
23 / 29
Parametric reachability
A general solution
Searching for a minimal c ∈ IN s.t. EF≀c p:
1
test whether p is reachable
2
if so, extract the time x at which it has been reached (we know
that c ≀ ⌈xβŒ‰)
3
check whether there is a path of a shorter time at which p is
reachable
4
if such a path exists return to 2, otherwise return ⌈xβŒ‰
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
23 / 29
Parametric Reachability
Solving the problem using BMC
Searching for a minimal c ∈ IN s.t. EF≀c p:
we run the standard reachability test to find the first time value x
at which p can be reached
we obtain a shortest path (of a length k0 ), but not necessarily of the shortest time
in order to test whether p can be reached at the time shorter than
n, we augment the net with an additional component and test
reachability of p ∧ pin
pin
t
pout
[n, n]
we can start with k = k0
in order to know that a state is unreachable, we need either to run
proving unreachability, or to find an upper bound on the path
for certain types of nets such an upper bound can be deduced
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
24 / 29
Parametric Reachability
Solving the problem using BMC
Searching for a minimal c ∈ IN s.t. EF≀c p:
we run the standard reachability test to find the first time value x
at which p can be reached
we obtain a shortest path (of a length k0 ), but not necessarily of the shortest time
in order to test whether p can be reached at the time shorter than
n, we augment the net with an additional component and test
reachability of p ∧ pin
pin
t
pout
[n, n]
we can start with k = k0
in order to know that a state is unreachable, we need either to run
proving unreachability, or to find an upper bound on the path
for certain types of nets such an upper bound can be deduced
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
24 / 29
Parametric Reachability
Solving the problem using BMC
Searching for a minimal c ∈ IN s.t. EF≀c p:
we run the standard reachability test to find the first time value x
at which p can be reached
we obtain a shortest path (of a length k0 ), but not necessarily of the shortest time
in order to test whether p can be reached at the time shorter than
n, we augment the net with an additional component and test
reachability of p ∧ pin
pin
t
pout
[n, n]
we can start with k = k0
in order to know that a state is unreachable, we need either to run
proving unreachability, or to find an upper bound on the path
for certain types of nets such an upper bound can be deduced
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
24 / 29
Parametric Reachability
Solving the problem using BMC
Searching for a minimal c ∈ IN s.t. EF≀c p:
we run the standard reachability test to find the first time value x
at which p can be reached
we obtain a shortest path (of a length k0 ), but not necessarily of the shortest time
in order to test whether p can be reached at the time shorter than
n, we augment the net with an additional component and test
reachability of p ∧ pin
pin
t
pout
[n, n]
we can start with k = k0
in order to know that a state is unreachable, we need either to run
proving unreachability, or to find an upper bound on the path
for certain types of nets such an upper bound can be deduced
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
24 / 29
VerICS: architecture
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
25 / 29
Experimental Results
EPNs: mutex of NoP processes; πœ‘b1 = βˆ€Ξ˜β‰€b EF (¬p ∧ EGβ‰€Ξ˜ c1 )
formula
πœ‘11
πœ‘11
πœ‘21
πœ‘21
πœ‘21
πœ‘21
πœ‘31
πœ‘31
NoP
k
3
3
3
3
30
30
4
4
2
3
4
5
4
5
6
7
W. Penczek (ICS PAS)
vars
1063
1505
2930
3593
37825
46688
8001
9244
PBMC
clauses
2920
4164
8144
10010
108371
133955
22378
25886
sec
0.01
0.01
0.01
0.01
0.3
0.4
0.06
0.05
Parametric BMC for Petri Nets
MB
1.3
1.5
1.5
1.6
7.4
8.9
2.5
2.8
MiniSAT
sec
0.003
0.008
0.01
0.03
0.2
0.52
0.04
0.05
SAT?
NO
YES
NO
YES
NO
YES
NO
YES
the 4th of February, 2011
26 / 29
DTPNs: Fischer’s protocol of 25 processes; Ξ” = 2, 𝛿 = 1;
searching for minimal c s.t. EF≀c p,
where p - violation of mutual exclusion
k
0
2
4
6
8
10
12
12
12
12
12
12
12
12
n
7
6
5
4
3
2
1
variables
840
16263
33835
51406
72752
92629
113292
120042
120054
120102
120054
115475
115481
115529
W. Penczek (ICS PAS)
tpnBMC
clauses
2194
47707
99739
151699
214853
273491
334357
354571
354613
354763
354601
340834
340852
341008
sec
0.0
0.5
1.0
1.6
2.4
3.0
3.7
4.1
4.0
4.0
4.1
3.9
3.9
3.9
40.1
MB
3.2
5.2
7.3
9.6
12.3
14.8
17.5
18.3
18.3
18.3
18.3
17.7
17.8
17.7
18.3
sec
0.0
0.1
0.6
1.8
20.6
321.4
14.3
45.7
312.7
64.0
8.8
24.2
138.7
2355.4
3308.3
Parametric BMC for Petri Nets
RSat
MB
1.4
4.9
9.1
13.8
27.7
200.8
39.0
59.3
206.8
77.7
35.0
45.0
100.8
433.4
433.4
sat
NO
NO
NO
NO
NO
NO
YES
YES
YES
YES
YES
YES
YES
NO
the 4th of February, 2011
27 / 29
Final Remarks
Final Remarks
Parametric BMC for EPN and DTPN,
New modules of VerICS are aimed at SAT-based parametric
verification of Elementary Petri Nets, Distributed Time Petri Nets,
and UML,
Avaialable at http://pegaz.ipipan.waw.pl/verics/
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
28 / 29
The End
Thank You
W. Penczek (ICS PAS)
Parametric BMC for Petri Nets
the 4th of February, 2011
29 / 29