Checking Extended CTL Properties Using Guarded Quotient Structure - - PowerPoint PPT Presentation

checking extended ctl properties using guarded quotient
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Checking Extended CTL Properties Using Guarded Quotient Structure

Xiaodong Wang advised by: Professor Sistla

slide-2
SLIDE 2

Outline

  • Part I: Symmetry based method
  • Part II: CCTL logic
  • Part III: Input language
  • Part IV: Model checking algorithm
slide-3
SLIDE 3

Part I: Symmetry Based Method

  • Part I: Symmetry based method

– Overview – QS Method – AQS Method – GQS Method

  • Part II: CCTL
  • Part II: Input language
  • Part IV: Model checking algorithm
  • Conclusion
slide-4
SLIDE 4

Model Checking Overivew

model model building model checking system description correctness specification yes, system satisfy the correctness spec no, counter-example(s):

slide-5
SLIDE 5

State Explosion Problem

  • State explosion problem

– Exponential number of

states in the state space

– Even infinite state space

  • Generally undecidable
  • Some model checking

methods are optimized for specific types of systems

slide-6
SLIDE 6

Symmetric System

client 2 client 1 client server 1 server Client Server

To model checking such systems, we employ symmetry in the system

each module consists

  • f identical processes
slide-7
SLIDE 7

Symmetry Based Methods Overview

Quotient Structure model checking system description property (Temporal Logic formula) Yes, system satisfy the property No,

  • utput path(s):

symmetries equivalence relation model building

  • n-the-fly
slide-8
SLIDE 8

Example: Mutual Exclusion Protocol with 2 processes

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

  • n

i z e d state graph

slide-9
SLIDE 9

Process Symmetry

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

slide-10
SLIDE 10

Symmetry Group

  • Process symmetries of the system form a

group:

  • Process symmetries of some systems may

be obtained from system description directly {flip, id}

s1 s2 c3 c2 c1 s1 s2 c3 c2 c1 Server client

permutations:

slide-11
SLIDE 11

Equivalence Relation over States

N1 N2 N1 T2 T1 N2 N1 C2 T1 T2 C1 N2 T1 C2 C1 T2

flip( ) =

T1 N2 T2 N1

slide-12
SLIDE 12

Quotient Structure

N1 N2 N1 T2 T1 T2 C1 N2 C1 T2

Quotient Structure consisting of representative states

slide-13
SLIDE 13

QS Method Overview [1]

Quotient Structure (QS) model checking: explore the product automata symmetric system description yes, system satisfies the LTL formula no,

  • utput a trace:

symmetry group equivalence relation model building LTL formula automata symmetric property

slide-14
SLIDE 14

Symmetry Group for QS Method

  • System symmetries
  • formula symmetries for
  • Symmetry group

flip id system symmetries formula symmetries symmetry group

{flip, id} G (!(C1 ^ C2)) {flip, id} larger symmetry group for symmetric system and symmetric property

slide-15
SLIDE 15

Quotient Structure

N1 N2 T1 N2 T1 T2 C1 N2 C1 T2

symmetric system: mutual exclusion protocol symmetric property: G( !(C1 ^ C2) )

slide-16
SLIDE 16

AQS Method Overview [2,3,4]

Annotated Quotient Structure (AQS) symmetric system Yes, system satisfies the formula No,

  • utput a trace:

system symmetry equivalence relation model building LTL automata symmetric/ asymmetric property model checking: partially unwind AQS (indirectly by permuting process ids in formula)

  • n-the-fly
slide-17
SLIDE 17

Symmetry Group for AQS Method

  • System symmetries
  • Formula symmetry for
  • Symmetry group

system symmetries flip id symmetry group formula symmetry

EF (C2) {flip, id} {id}

slide-18
SLIDE 18

Annotated Quotient Structure

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

slide-19
SLIDE 19

Directly Unwind AQS

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

slide-20
SLIDE 20

Indirectly Unwind AQS

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

slide-21
SLIDE 21

GQS Method Overview [5]

Guarded Quotient Structure (GQS) symmetric/ asymmetric system Yes, system satisfy the property No,

  • utput a trace:

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

slide-22
SLIDE 22

Partial Symmetric / Asymmetric Systems

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

slide-23
SLIDE 23

from Partially Symmetric to Symmetric

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

slide-24
SLIDE 24

Guarded Quotient Structure

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

slide-25
SLIDE 25

Infeasible Path

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

slide-26
SLIDE 26

Summary of the Three Symmetric Based Methods

  • QS method

– Primary safety properties – Symmetric systems and symmetric properties

  • AQS method

– Both safety and liveness properties – Symmetric systems

  • GQS method

– Both safety and liveness properties – Partial symmetric and asymmetric systems

slide-27
SLIDE 27

Question ?

slide-28
SLIDE 28

Part II : CCTL Logic

  • Part I: Symmetry based method
  • Part II: CCTL

– CCTL syntax – CCTL semantics

  • Part II: Input language
  • Part IV: Model checking algorithm
  • Conclusion
slide-29
SLIDE 29

CCTL Syntax

<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>

slide-30
SLIDE 30

CCTL Syntax Cont.

  • Fairness path quantifier: Efair

weak/strong process fairness

  • COUNT term: COUNT(i, M, h(i))

– 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

slide-31
SLIDE 31

COUNT Term's Semantics

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

slide-32
SLIDE 32

Why Introduce the COUNT Term

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

  • Uniformly express properties such as
  • Efficient evaluate COUNT term
slide-33
SLIDE 33

Express Other Temporal Opertor and Process Quantifier

  • Other temporal operators:
  • Process quantifiers:

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

slide-34
SLIDE 34

Question ?

slide-35
SLIDE 35

Part III: Input Language

  • Part I: Symmetry based method
  • Part II: CCTL
  • Part III: Input language
  • Part IV: Model checking algorithm
  • Conclusion
slide-36
SLIDE 36

Structure of Input

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

slide-37
SLIDE 37

Concurrent Program

  • Program variable: reply[i,j]
  • Process variable: i, j
  • Transition template:

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) ...}

  • Priority specification (Priority: 0-1;2-5)
  • Allow multiple priority specifications in one

module

slide-38
SLIDE 38

CCTL Formula and Evaluation

  • CCTL formula using only free process

variables: AG(lk[i] != 2 V lk[j] != 2)

  • Evaluation of the free process variables in

the formula: i = 1, j = 2

slide-39
SLIDE 39

Question ?

slide-40
SLIDE 40

Part IV: Model Checking Algorithm

  • Part I: Symmetry based method
  • Part II: CCTL
  • Part II: Input language
  • Part IV: Model checking algorithm

– Overview – Employing GQS – Evaluate COUNT term – Model checking procedures – Implementation and Experiments

  • Conclusion
slide-41
SLIDE 41

Overview

  • Assume GQS has been fully constructed
  • Model Checking the CCTL formula

employing GQS

– Indirectly unwind GQS – Quantifier elimination – Work inductively over the structure of the CCTL

formula

slide-42
SLIDE 42

Why the Algorithm is Efficient

  • Quantifier elimination
  • nly check the formula with representitives of

each equivalence classes

  • Lazy evaluation: f1 ^ f2
  • Formula decomposition
  • Sub-formula tracking
slide-43
SLIDE 43

Indirectly Unwind GQS

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

  • 1

id2

  • 1*Flip1
  • 1

flip3

  • 1*id2
  • 1*Flip1
  • 1

flip4

  • 1*flip3
  • 1*id2
  • 1*Flip1
  • 1

id5

  • 1*flip4
  • 1*flip3
  • 1*id2
  • 1*Flip1
  • 1

permuted evaluation permuted edge condition

slide-44
SLIDE 44

Naïve Method to Evaluate COUNT Term

To evaluate COUNT(i, {1,2,3,4,5,6}, h(i,j))

  • n S, f (j =3)

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

slide-45
SLIDE 45

Evaluate COUNT Term Efficiently

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

slide-46
SLIDE 46

S1 satisfy EG(C1 ) S1 satisfy EG(C2 )

State Symmetry

  • State symmetry of a state
  • Property of state symmetry:

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 ))

slide-47
SLIDE 47

Utilizing State Symmetry

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)

slide-48
SLIDE 48

Equivalence Relation Over M

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

slide-49
SLIDE 49

Model Checking With Fairness

  • S satisfies exist_fair_path means there exists a

fair path from S

  • Transform formula with fairness path quantifier:

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

slide-50
SLIDE 50

Major Data Structures

  • label: <formula,evaluation,edge_vector>

– 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

  • mark: <formula, evaluation,edge_vector>

– 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

slide-51
SLIDE 51

Check Procedure

  • Invoked on the initial state S0
  • Controlling procedure: invoke other

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

slide-52
SLIDE 52

Other Procedures

  • EUCheck: E(f1Uf2)
  • EGCheck: EG(f)
  • EfairGCheck: EfairG(f)
  • efpCheck: exist_fair_path
  • Associate a mark with state S when these

procedures are invoked with the parameters on the state for the first time

slide-53
SLIDE 53

Implementation: Minimize Memory Consumption

  • May consume a lot of memory
  • Permuations: up to n! (n: # of processes):
  • nly store inverse permuations
  • labels and marks: up to N * Cl

<h, f, k> <h, p> (f0,k0) f0: evaluation in input, k0:processes ids in edge condition

  • f GQS
slide-54
SLIDE 54

Implementation: Search of Lables and Marks

<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

slide-55
SLIDE 55

Experiments

  • Cache Coherence Protocol

mutual exclusive property: no two clients can hold the cache line exclusively at the same time

  • Resource Controller Protocol

mutual exclusive property: no two clients can hold the resource at the same time

slide-56
SLIDE 56

Experimental Results

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

slide-57
SLIDE 57

Question ?

slide-58
SLIDE 58

Conclusion

  • The model checking algorithm is useful in

checking complex properties

  • Experiments show speed-up
  • Need to combine with other methods
slide-59
SLIDE 59

Selected Reference

  • [1] Emerson, E. A., Sistla, A. P., Symmetry and Model Checking
  • [2] Emerson, E. A., Sistla, A. P., Utilizing Symmetry when Model

Checking under Fairness Assumptions: An Automata-theoretic Approach.

  • [3] Gyuris, V., Sistla, A. P., On-the-Fly Model Checking under

Fairness that Exploits Symmetry

  • [4] Sistla A. P., Gyuris V., Emerson E. A., SMC: A Symmetry

based Model Checker for Verification of Safety and Liveness Properties

  • [5] Sistla A. P., Godefroid P., Symmetry and Reduced Symmetry

in Model Checking

slide-60
SLIDE 60

Thank you!