Model Checking Finite State Finite State Model Checking Finite - - PDF document
Model Checking Finite State Finite State Model Checking Finite - - PDF document
Model Checking Finite State Finite State Model Checking Finite State Systems Informationsteknologi System Description A No! Debugging Information TOOL TOOL Yes, Requirement F Prototypes C T L Executable Code Test sequences Tools:
Informationsteknologi
UC UCb
Finite State Model Checking
TOOL TOOL
System Description A Requirement F
Yes,
Prototypes Executable Code Test sequences
No!
Debugging Information
Tools: visualSTATE, SPI N,
Statemate, Verilog, Formalcheck,...
Finite State Systems
C T L
Informationsteknologi
UC UCb
From Programs to Net wor ks Net wor ks
P1 :: while True do T1 : wait(turn=1) C1 : turn:=0 endwhile || P2 :: while True do T2 : wait(turn=0) C2 : turn:=1 endwhile P1 :: while True do T1 : wait(turn=1) C1 : turn:=0 endwhile || P2 :: while True do T2 : wait(turn=0) C2 : turn:=1 endwhile Mutual Exclusion Program
Informationsteknologi
UC UCb
From Net wor k
Net wor k Models to
Kripke Structures
I 1 I 2 t= 0 T1 I 2 t= 0 T1 T2 t= 0 I 1 T2 t= 0 I 1 C2 t= 0 T1 C2 t= 0 C1 I 2 t= 1 T1 T2 t= 1 C1 T2 t= 1 T1 I 2 t= 1 I 1 T2 t= 1 I 1 I 2 t= 1
Informationsteknologi
UC UCb
CTL Models = Kripke Structures
Informationsteknologi
UC UCb
Com putation Tree Logic, CTL
Clarke & Em erson 1 9 8 0 Syntax
Informationsteknologi
UC UCb
Path
p p p
s s1 s2 s3...
The set of path starting in s
Informationsteknologi
UC UCb
Form al Sem antics
( )
Informationsteknologi
UC UCb
CTL, Derived Operators
. . . . . . . . . . . . p p p AF p . . . . . . . . . . . . p EF p
possible inevitable
Informationsteknologi
UC UCb
CTL, Derived Operators
p p p . . . . . . . . . . . . AG p p p p p p p . . . . . . . . . . . . EG p p
always potentially always
Informationsteknologi
UC UCb
Theorem
All operators are derivable from
- EX f
- EG f
- E[ f U g ]
and boolean connectives All operators are derivable from
- EX f
- EG f
- E[ f U g ]
and boolean connectives
[ ]
( )
[ ]
g g f g g f ¬ ¬ ∧ ¬ ∧ ¬ ¬ ¬ ≡ EG U E U A
Informationsteknologi
UC UCb
Exam ple
p p q p,q
EX p
1 2 3 4
Informationsteknologi
UC UCb
Exam ple
p p q p,q
AX p
1 2 3 4
Informationsteknologi
UC UCb
Properties of MUTEX exam ple ?
I 1 I 2 t= 0 T1 I 2 t= 0 T1 T2 t= 0 I 1 T2 t= 0 I 1 C2 t= 0 T1 C2 t= 0 C1 I 2 t= 1 T1 T2 t= 1 C1 T2 t= 1 T1 I 2 t= 1 I 1 T2 t= 1 I 1 I 2 t= 1
[ ] [ ] ( ) [ ] [ ]
C U C A C U C A C AG C EG AF(C T AG[ C (C AG
2 1 1 1 1 1 1 1 2 1
¬ ∧ ¬ ⇒ ¬ ⇒ ∧ ¬ )] )
HOW to DECI DE I N GENERAL
CTL Model Checking Algorithm s
Informationsteknologi
UC UCb
Fixpoint Characterizations
p p p EF EX EF ∨ ≡
- r let A be the set of states satisfying
EF p then
A EX A ∨ ≡ p
in fact A is the smallest such set (the least fixpoint)
Informationsteknologi
UC UCb
Exam ple
p q p,q
EF q
A
A EX ∨ q
p
1 2 3 4
Informationsteknologi
UC UCb
Fixed points of m onotonic functions
Let τ be a function 2S → 2S Say τ is monotonic when Fixed point of τ is y such that If τ monotonic, then it has
− least fixed point μy. τ(y) − greatest fixed point νy. τ(y)
) ( ) ( implies y x y x τ τ ⊆ ⊆
y y = ) ( τ
Informationsteknologi
UC UCb
I teratively com puting fixed points
Suppose S is finite
− The least fixed point μy. τ(y) is the limit of − The greatest fixed point νy. τ(y) is the limit of
L ⊆ ⊆ ⊆ (false)) ( (false) false τ τ τ L ⊇ ⊇ ⊇ (true)) ( (true) true τ τ τ
Note, since S is finite, convergence is finite
Informationsteknologi
UC UCb
Exam ple: EF p
EF p is characterized by Thus, it is the limit of the increasing series...
) ( . y EX p y p EF ∨ = μ
p p ∨ EX p p ∨ EX(p ∨ EX p) . . .
Informationsteknologi
UC UCb
Exam ple: EG p
EG p is characterized by Thus, it is the limit of the decreasing series...
) ( . y EX p y p EG ∧ = ν
p ∧ EX p p p ∧ EX(p ∧ EX p) ...
Informationsteknologi
UC UCb
Exam ple, continued
p q p,q
EF q
p 1 2 3 4
} 3 , 2 , 1 { } 3 , 2 , 1 { } 3 , 2 {
3 2 1
= = = = A A A Ø A
) ( . y EX q y q EF ∨ = μ
Informationsteknologi
UC UCb
Rem aining operators
)) ( ( . ) ( )) ( ( . ) ( ) ( . ) ( . y AX p q y q U p A y EX p q y q U p E y AX p y p AG y AX p y p AF ∧ ∨ = ∧ ∨ = ∧ = ∨ = μ μ ν μ
Informationsteknologi
UC UCb
Properties of MUTEX exam ple ?
I 1 I 2 t= 0 T1 I 2 t= 0 T1 T2 t= 0 I 1 T2 t= 0 I 1 C2 t= 0 T1 C2 t= 0 C1 I 2 t= 1 T1 T2 t= 1 C1 T2 t= 1 T1 I 2 t= 1 I 1 T2 t= 1 I 1 I 2 t= 1
)] )]
1 1 1
AF(C AF(C T AG[ ⇒
Informationsteknologi
UC UCb
Informationsteknologi
UC UCb
Informationsteknologi
UC UCb )) ( } ' ) ' , '.( | ({ φ Sat Q s R s s s s ∩ ∈ ⇒ ∈ ∀
Informationsteknologi
UC UCb
p SCC SCC SCC
EG p
More Efficient Check
Informationsteknologi
UC UCb
Exam ple
p q p p,q
EG p
q p
Informationsteknologi
UC UCb
Exam ple
p p p,q
EG p
p
Reduced Model
Informationsteknologi
UC UCb
Exam ple
p p p
EG p
p
Non trivial Strongly Connected Component
Informationsteknologi
UC UCb
Properties of MUTEX exam ple ?
I 1 I 2 t= 0 T1 I 2 t= 0 T1 T2 t= 0 I 1 T2 t= 0 I 1 C2 t= 0 T1 C2 t= 0 C1 I 2 t= 1 T1 T2 t= 1 C1 T2 t= 1 T1 I 2 t= 1 I 1 T2 t= 1 I 1 I 2 t= 1
[ ]
1
C EG ¬
Informationsteknologi
UC UCb
Properties of MUTEX exam ple ?
I 1 I 2 t= 0 T1 I 2 t= 0 T1 T2 t= 0 I 1 T2 t= 0 I 1 C2 t= 0 T1 C2 t= 0 T1 T2 t= 1 T1 I 2 t= 1 I 1 T2 t= 1 I 1 I 2 t= 1
[ ]
1
C EG ¬
Reduced Model
which are the non-trivial SCC’s?
Informationsteknologi
UC UCb
Com plexity
However Ssys may be EXPONENTI AL in number of parallel components!
- FI XPOI NT COMPUTATI ONS may be carried
- ut using
ROBDD’s (Reduced Ordered Binary Decision Diagrams) Bryant, 86 However Ssys may be EXPONENTI AL in number of parallel components!
- FI XPOI NT COMPUTATI ONS may be carried
- ut using
ROBDD’s (Reduced Ordered Binary Decision Diagrams) Bryant, 86