Professional Documents
Culture Documents
approach to model-checking
Overview*
• Kripke structures
• Temporal logics: LTL, CTL, CTL*
• From LTL to Buchi automata
• Model checking
G(p -> F q)
yes
temporal formula
MC algorithm
no
p
p
q
q
counterexample
finite-state model
• Hardware designs
• Communication protocols
• High level description of non finite state systems
• Web service abstractions
Properties in temporal logic
• mutual exclusion:
always ( cs1 cs2)
• non starvation:
always (request eventually grant)
• communication protocols:
( get-message) until send-message
Kripke structures
• A Kripke structure (S,AP,R,L) consists of
– set of states S, atomic propositions AP
– set of transitions R SS
– labeling L SAP
repeat
p := true; p p
p := false;
end
Kripke structure / transition system
a,b a
b,c a
b a,c a,b
c
=s0s1s2... is a run in M from s iff
s = s0 and for every i0: (si,si+1)R
Gp
Fp
Xp
pUq
Examples of LTL properties
• x=a y=b XXXX z=a+b
• pay B deliver B: “before”
• liveness: “if input, then eventually output”
G (input F output)
• strong fairness: “infinitely sent implies infinitely
received”
GF send GF receive
Branching time logics: CTL, CTL*
• Model of time is a tree, not a sequence
• Path quantifiers A: “for every path”
E: “there exists a path”
AF p
p
Computation Tree Logic: CTL
p p p
p p p p p p
...
...
...
...
...
...
...
...
CTL, cont...
• Existential modalities:
EG p EF p
p
...
p
...
...
...
...
...
...
...
CTL, cont
• Other modalities
AX p, EX p, A(p U q), E(p U q)
LTL CTL
O(2f (V+E)) O(f (V+E))
PSPACE COMPLETE
Examples: p accept
• if φ = X p then B(φ) is
p
q
• if φ = p U q then B(φ) is accept
p, q p U q
p, q, p U q
States (consistent sets): p, q, (p U q)
p, q, p U q
p q, (p U q)
all
p, q, p, q,
pUq (p U q)
all all
1. Construct B( φ)