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. WozΜ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. WozΜ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. WozΜ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
© Copyright 2026 Paperzz