Comutation Tree Logic Finite State Model Checking of Branching Time Logic Kim Guldstrand Larsen BRICS@Aalborg 1 Tool Suort Finite State Systems System Descrition A Reuirement F CTL TOOL Course Objectives: Model systems and secify reuirements Validate models using TOOLS Understand main underlying theoretical and ractical roblems No! Debugging Information Yes, Prototyes Executable Code Test seuences Tools: UPPAAL, SPIN, VisualSTATE, Statemate, Verilog, Formalcheck,... 2 1
Mutual Exclusion Token Mutual Exclusion Semafor 2
Mutual Exclusion Forward Reachability Token 5 Mutual Exclusion Forward Reachability Token 6
Mutual Exclusion Forward Reachability C1 I2 Token 7 Mutual Exclusion Forward Reachability T C1 I2 C1 T2 Token 8
Mutual Exclusion Forward Reachability T T T C1 I2 I1 C2 T T C1 T2 T1 C2 T Token 9 Mutual Exclusion Krike Structures I1 C2 C1 I2 T1 C2 C1 T2 1 5
Mutual Exclusion Forward Reachability F F F C1 I2 T F I1 C2 T C1 T2 T T1 C2 T Semafor 11 CTL Models = Krike Structures 12 6
Comutation Tree Logic, CTL Clarke & Emerson 198 Syntax 1 Path The set of ath starting in s s s 1 s 2 s... 1 7
Formal Semantics ( ) 15 CTL, Derived Oerators ossible inevitable EF AF 16 8
CTL, Derived Oerators otentially always always AG EG 17 Theorem A All oerators are derivable from EX EX f f EG EG f f E[ E[ f f U g ] and boolean connectives [ f U g] E[ gu( f g) ] EG g 18 9
Examle 1 2, 19 Examle EX 1 2, 2 1
Examle EX 1 2, 21 Examle AX 1 2, 22 11
Examle AX 1 2, 2 Examle EG 1 2, 2 12
Examle EG 1 2, 25 Examle AG 1 2, 26 1
Examle AG 1 2, 27 Examle A[ U ] 1 2, 28 1
Examle A[ U ] 1 2, 29 Proerties of MUTEX examle? AG (C C ) AG[ T AF(C )] EG [ C1] [ A[ C U ( C A[ C U C ]) ] AG C 1 1 1 2 1 1 1 1 2 HOW to DECIDE IN GENERAL I1 C2 C1 I2 T1 C2 C1 T2 15
CTL Model Checking Algorithms IDA foredrag 2..99 1 Fixoint Characterizations EF EXEF or let A be the set of states satisfying EF then A EX A in fact A is the smallest such set (the least fixoint) 2 16
Examle EF 1 2, A EX A Fixed oints of monotonic functions Let τ be a function S S Say τ is monotonic when x y imlies Fixed oint of τ is y such that τ ( y ) = y If τ monotonic, then it has least fixed oint µy. τ(y) greatest fixed oint νy. τ(y) τ ( x) τ ( y) 17
Iteratively comuting fixed oints Suose S is finite The least fixed oint µy. τ(y) is the limit of false τ (false) τ ( τ (false)) L The greatest fixed oint νy. τ(y) is the limit of true τ (true) τ ( τ (true)) L Note, since S is finite, convergence is finite 5 Examle: EF EF is characterized by EF = µ y. ( EX y) Thus, it is the limit of the increasing series... EX( EX ) EX 6 18
Examle: EG EG is characterized by EG = ν y. ( EX y) Thus, it is the limit of the decreasing series...... EX( EX ) EX 7 Examle, continued 1 2 EF EF = µ y. ( EX y), A A A 1 2 = Ø A = {2,} = {1,2,} = {1,2,} 8 19
Remaining oerators AF AG E( U ) A( U ) = = = = µ y.( AX y) νy.( AX y) µ y.( ( EX µ y.( ( AX y)) y)) 9 Proerties of MUTEX examle? AG[ T AF(C AF(C 1 1 )] 1 )] I1 C2 C1 I2 T1 C2 C1 T2 2
1 2 21
({ s s'.( s, s') R s' Q} Sat( φ)) More Efficient Check EG SCC SCC SCC 22
Examle EG, 5 Examle EG, Reduced Model 6 2
Examle EG Non trivial Strongly Connected Comonent 7 Proerties of MUTEX examle? EG [ C 1 ] I1 C2 C1 I2 T1 C2 C1 T2 8 2
Proerties of MUTEX examle? EG [ C 1 ] I1 C2 T1 C2 Reduced Model which are the non-trivial SCC s? 9 Comlexity However SS sys may sys be beexponential in in number of ofarallel comonents! -- -- FIXPOINT COMPUTATIONS may be be carried out out using ROBDD s (Reduced Ordered Binary Decision Diagrams) Bryant, 86 86 5 25
END IDA foredrag 2..99 51 26