Checking Extended CTL Properties Using Guarded Quotient Structure
Xiaodong Wang advised by: Professor Sistla
Checking Extended CTL Properties Using Guarded Quotient Structure - - PowerPoint PPT Presentation
Checking Extended CTL Properties Using Guarded Quotient Structure Xiaodong Wang advised by: Professor Sistla Outline Part I: Symmetry based method Part II: CCTL logic Part III: Input language Part IV: Model checking algorithm
Xiaodong Wang advised by: Professor Sistla
– Overview – QS Method – AQS Method – GQS Method
model model building model checking system description correctness specification yes, system satisfy the correctness spec no, counter-example(s):
– Exponential number of
states in the state space
– Even infinite state space
methods are optimized for specific types of systems
client 2 client 1 client server 1 server Client Server
To model checking such systems, we employ symmetry in the system
each module consists
Quotient Structure model checking system description property (Temporal Logic formula) Yes, system satisfy the property No,
symmetries equivalence relation model building
N1 N2 N1 T2 T1 N2 N1 C2 T1 T2 C1 N2 T1 C2 C1 T2
Non-critical (N) Critical (C) Trying (T) Process 1 Non-critical (N) Critical (C) Trying (T) Process 2 s y n c h r
i z e d state graph
N1 N2 N1 T2 T1 N2 N1 C2 T1 T2 C1 N2 T1 C2 C1 T2 N2 N1 N2 T1 T2 N1 N2 C1 T2 T1 C2 N1 T2 C1 C2 T1 N2 N1 N2 T1 T2 N1 N2 C1 T2 T1 C2 N1 T2 C1 C2 T1
flip: 1 2
group:
be obtained from system description directly {flip, id}
s1 s2 c3 c2 c1 s1 s2 c3 c2 c1 Server client
permutations:
N1 N2 N1 T2 T1 N2 N1 C2 T1 T2 C1 N2 T1 C2 C1 T2
flip( ) =
T1 N2 T2 N1
N1 N2 N1 T2 T1 T2 C1 N2 C1 T2
Quotient Structure consisting of representative states
QS Method Overview [1]
Quotient Structure (QS) model checking: explore the product automata symmetric system description yes, system satisfies the LTL formula no,
symmetry group equivalence relation model building LTL formula automata symmetric property
flip id system symmetries formula symmetries symmetry group
{flip, id} G (!(C1 ^ C2)) {flip, id} larger symmetry group for symmetric system and symmetric property
N1 N2 T1 N2 T1 T2 C1 N2 C1 T2
symmetric system: mutual exclusion protocol symmetric property: G( !(C1 ^ C2) )
Annotated Quotient Structure (AQS) symmetric system Yes, system satisfies the formula No,
system symmetry equivalence relation model building LTL automata symmetric/ asymmetric property model checking: partially unwind AQS (indirectly by permuting process ids in formula)
system symmetries flip id symmetry group formula symmetry
EF (C2) {flip, id} {id}
symmetric system : mutual exclusion protocol
N1 N2 T1 N2 T1 T2 C1 N2 C1 T2
flip id id flip flip id id id id
does not depend on the formula
N1 N2 N2 T1 T2 T1 T2 C1 N2 T1 T2 T1
flip id flip flip id
T2 C1
id
N1 N2 N1 T2 T1 T2 T2 C1 T1 N2 T1 T2 T1 C2
path in AQS actual path
C2 C1 C1 C2 C1 C1 C1
atomic proposition C2 (flip*id*flip)([T2,C1]) satisfies C2 = [T2,C1] satisfies C(flip*id*flip)-1(2)
N1 N2 N2 T1 T2 T1 T2 C1 N2 T1 T2 T1
flip id flip flip id
T2 C1
id
path in AQS
Guarded Quotient Structure (GQS) symmetric/ asymmetric system Yes, system satisfy the property No,
equivalence relation model building LTL automata symmetric/ asymmetric property model checking: partially unwind GQS (check guards, permute process ids in formula and guards) symmetric system add edges symmetries AQS add guards
Non-critical (N) Critical (C) Trying (T) Process 1 Non-critical (N) Critical (C) Trying (T) Process 2
when process 1 and process 2 both in “T”, process 1 has higher priority to enter “C” a partial symmetric system
N1 N2 N1 T2 T1 N2 N1 C2 T1 T2 C1 N2 T1 C2 C1 T2 N1 N2 N1 T2 T1 N2 N1 C2 T1 T2 C1 N2 T1 C2 C1 T2
add edges to make it more symmetric
partially symmetric system symmetric system
This may be done directly with system description, i.e. by ignoring the priorities
N1 N2 T1 N2 T1 T2 C1 N2 C1 T2
flip id id flip flip id id id id
N1 N2 T1 N2 T1 T2 C1 N2 C1 T2
flip id id flip flip, T1^C1
'
id,T1^C1
'
id id id
AQS add edge conditions GQS
N1 N2 N2 T1 T2 T1 T2 C1 N2 T1 T2 T1
flip id flip,T1^C1
'
flip id
T2 C1
id,T1^C1
'
N1 N2 N1 T2 T1 T2 T2 C1 T1 N2 T1 T2 T1 C2
path in GQS corresponding actual path is infeasible
– Primary safety properties – Symmetric systems and symmetric properties
– Both safety and liveness properties – Symmetric systems
– Both safety and liveness properties – Partial symmetric and asymmetric systems
– CCTL syntax – CCTL semantics
<formula> :: <atomic formula> | <count-term> <comp-operator> <count-term> <formula> ^ <formula> | ! <formula> | EX(<formula>) | EfairX(<formula>) | EG(<formula>) | EfairG(<formula>) | E(<formula> U <formula>) | Efair(<formula> U <formula>) <count-term> :: COUNT(i,M,<formula>) | <constant>
weak/strong process fairness
– i: free process variable in h – M: set of process ids i ranges over – h(i): CCTL formula – Example: COUNT(i, client, Ci)
N1 N2 N1 T2 T1 T2 T2 C1 N1 T2 T1 T2 T2 C1
. . . . . . an “unfair” path
N2 C1 S: COUNT(i, client, Ci)S = 1 S
N1 N2 N1 T2 T1 N2 N1 C2 T1 T2 C1 N2 T1 C2 C1 T2
COUNT(i, client, Ti ^ EX(Ci))S = 2
COUNT(i, {1,2,3,4}, g(i)) = COUNT(i, {1,2,3,4}, h(i) ) f = (g(1)^!g(2)^!g(3)^!g(4) ^ h(1)^!h(2)^!h(3)^!h(4)) v (g(1)^!g(2)^!g(3)^!g(4) ^ !h(1)^h(2)^!h(3)^!h(4)) v ... ....
contain 70 sub-formulas
AX(f) = ! EX (! f) AG(f) = ! EF ( ! f) A(f1 U f2) = ! (EG (! f2) v E(! f2 U ! f1 ^ ! f2) Universal quantifier: COUNT(i, M, h(i)) = COUNT(i, M, True) Existential quantifier: COUNT(i, M, h(i)) > 0
CCTL formula evaluation for the CCTL formula initial values transition templates ... transition templates ... module 1 module2 Concurrent program processes are instantiated from modules by instantiating all the transition templates in that module
cl of controller {... lc[cl] == 0 & request[cl,k] == 1 & ALL(i: reply [i,k] == 0) reply[ck,k] = 1, buzy[cl] == 1, lc[cl] == 1 (Priority: 0-1;2-5) ...}
module
variables: AG(lk[i] != 2 V lk[j] != 2)
the formula: i = 1, j = 2
– Overview – Employing GQS – Evaluate COUNT term – Model checking procedures – Implementation and Experiments
employing GQS
– Indirectly unwind GQS – Quantifier elimination – Work inductively over the structure of the CCTL
formula
each equivalence classes
N1 N2 N2 T1 T2 T1 T2 C1 N2 T1 T2 T1
flip1 id2 flip3,T1^C1
'
flip4 id5
T2 C1
id6,T1^C1
'
N1 N2 N1 T2 T1 T2 T2 C1 T1 N2 T1 T2 T1 C2
path in GQS actual path i = j = T1^C1
'
1 2 2 1 2 1 1 2 2 1 2 1 T1^C1
'
T2^C2
'
T2^C2
'
T1^C1
'
T2^C2
'
T2^C2
'
inverse of accumulated permutation id Flip1
id2
flip3
flip4
id5
permuted evaluation permuted edge condition
To evaluate COUNT(i, {1,2,3,4,5,6}, h(i,j))
h(1,3) h(6,3) h(5,3) h(4,3) h(3,3) h(2,3)
COUNT(i, {1,2,3,4,5,6}, h(i,j)) = 3 may be quite inefficient for a large number of process ids
1, 2 4, 5, 6 3 1, 2, 3, 4, 5, 6 1 4 3 h(1,3) h(3,3) h(4,3) set of process ids i ranges over devide the set of process ids into equivalence class choose representitive check with representitive
COUNT(i, {1,2,3,4,5,6}, h(i,j)) = 3
S1 satisfy EG(C1 ) S1 satisfy EG(C2 )
T1 T2
State symmetry = {flip, id}
T2 C1
State symmetry = {id} S1 S2
formulas permuated from the same formula with state symmetries of a state have the same truth value on the state
flip(s1 ) = s1 flip flip(S1 ) satisfy flip(EG(C1 ))
1, 2, 3 4, 5, 6
S's state symmetry:
1 2: h(1,3) => h(2,3) h(2,3) => h(1,3) 4 5: h(4,3) => h(5,3) h(5,3) => h(4,3) 4 6: h(4,3) => h(6,3) h(6,3) => h(4,3) 1 3: h(1,3) => h(3,1) h(3,3) => h(1,1) 1, 2 3 1, 2, 3 4, 5, 6 4, 5, 6
classes: COUNT(i, {1,2,3,4,5,6}, h(i,j)) on S, f (j =3)
Let S be a state in GQS, Aut(S) be the set of state symmetries of S, f be the evaluation. i ~ j if and only if there exists p in Aut(S) such that for each v in dom(f), p(f(v)) = v and p(i) = j
fair path from S
EfairX(f) = EX(f ^ exist_fair_path) Efair(f1 U f2) = E(f1 U (f2 ^ exist_fair_path) EfairG(f): can not be transformed with exist_fair_path
– labels are associated with states in GQS – <h,f,k> in S denotes that h is satisfied on S with
evaluation f and edge vector k
– marks are associated with states in GQS – <h,f,k> in S denotes that we have checked h
against S with evaluation f and edge vector k
procedures: check procedure labels states with formula when its truth value is determined in the states
EfairGCheck (h,f,k,s) EGCheck (h,f,k,s) EUCheck (h,f,k,s) check(h,f,k,s) efpCheck (h,f,k,s) h=E(f1Uf2) h=EG(f) h=EfairG(f) h=exit_fair_path
procedures are invoked with the parameters on the state for the first time
<h, f, k> <h, p> (f0,k0) f0: evaluation in input, k0:processes ids in edge condition
<h, p1> <h, p2> <h, p3> hash(p(f0),p(k0)) k1 k3 k2
<h, p>
k Hash Table
compute the hash key hash(p(f0),p(k0)) efficiently
mutual exclusive property: no two clients can hold the cache line exclusively at the same time
mutual exclusive property: no two clients can hold the resource at the same time
Protocol Client# quant_elim Mark# Time(s) 10 Yes 208 0.02 10 No 3780 1.6 20 Yes 448 0.12 20 No * * 4 Yes 96712 5.7 4 No 115344 6.9
Resource Controller Protocol Cache Coherence Protocol
“*” indicate stack overflow
checking complex properties
Checking under Fairness Assumptions: An Automata-theoretic Approach.
Fairness that Exploits Symmetry
based Model Checker for Verification of Safety and Liveness Properties
in Model Checking