Finite stte utomt Lecture 2 Model-Checking Finite-Stte Systems (untimed systems) Finite grhs with lels on edges/nodes set of nodes (sttes) set of edges (trnsitions) set of lels (lhet) Finite Automt, CTL, LTL nd Model Checking 1 2 Comlete Systems nd Krike Structure CTL Models = Krike Structures From now on, we shll consider only Comlete systems, tht is, utomt with lels on nodes. There is no essentil difference etween models with lels on nodes or trnsitions This is the so clled Krike Structure, tht is, utomt with roositions leled on sttes Exmle, CTL: Comuttion Tree Logics defined on Comuttion Trees of Krike structures 5 6
Comuttion Tree Logic, CTL Clrke & Emerson 1980 Pth Syntx The set of th strting in s s s 1 s 2 s... 7 8 Forml Semntics ( ) CTL, Derived Oertors ossile inevitle EF AF E<> in UPPAAL! A<> in UPPAAL 9 10 CTL, Derived Oertors There re too mny oertors! But otentilly lwys lwys We need to rememer only the following: AG EG X (next time) E F (Future, some time) A G (Glol) U (Until) The most useful re EF, AG, EG nd AF: A[] in UPPAAL E[] in UPPAAL 11 12
Theorem Exmle A All oertors re derivle from EX EX f f EG f f E[ E[ f f U g ] nd oolen connectives [ f U g] E[ gu( f g) ] EG g, 1 1 Exmle EX Exmle EX,, 15 16 Exmle AX Exmle AX,, Note: stte 1 doesn t stisfy AX 17 18
Exmle EG Exmle EG,, 19 20 Exmle AG Exmle AG,, 21 22 Exmle A[ U ] Exmle A[ U ],, 2 2
Proerties of MUTEX exmle? AG (C1 C2) AG[ T1 AF(C1)] EG[ C1] AG[ C A[ C U ( C A[ C U C ]) ] T1 I2 I1 I2 I1 T2 1 1 1 1 T1 I2 2 HOW to DECIDE IN GENERAL I1 I2 I1 T2 CTL Model Checking Algorithms T1 T2 I1 C2 C1 I2 T1 T2 T1 C2 C1 T2 25 26 Leling Methods [Clrke et l 81] Check ll su-formuls of F For ech su-formul f of F, lel ll nodes where f is true Check the comosed formuls 27 28 Algorithm ides for checking E(f U g) Mrk ll nodes where f is true nd ll nodes where g is true Strt from ll nodes where g is true nd Perform ckwrds rechility nlysis Ech ste ckwrds, store ll nodes in Q where f is true Reet the ove ste, until it converges Q contins ll nodes stisfying E(f U g) Q + f Q Q=g 29 0
Algorithm ides for checking A(f U g) Similr to the cse for A(f U g) But ech ste ckwrds, store ll nodes in Q where (f or g) is true, nd the stored nodes do not led to node where (f or g) is flse Reet the ove ste, until it converges Q contins ll nodes stisfying A(f U g) ({ s s'.( s, s') R s' Q} St( φ)) Q+ f Q Not (f) Q=g 1 2 Fixoint Chrcteriztions Fixed oints of monotonic functions EF EXEF or let A e the set of sttes stisfying EF then A EX A in fct A is the smllest one of sets stisfying the eutions (the lest fixoint) Let τ e function S S Sy τ is monotonic when x y imlies Fixed oint of τ is y such tht τ ( y ) = y If τ monotonic, then it hs lest fixed oint µy. τ(y) gretest fixed oint νy. τ(y) τ ( x) τ ( y) Itertively comuting fixed oints Suose S is finite The lest fixed oint µy. τ(y) is the limit of flse τ (flse) τ ( τ (flse)) Λ The gretest fixed oint νy. τ(y) is the limit of Exmle: EF EF is chrcterized y EF = µ y. ( EX y) Thus, it is the limit of the incresing series... true τ (true) τ ( τ (true)) Λ EX( EX ) EX Note, since S is finite, convergence is finite 5 6
Exmle: EG EG is chrcterized y EG = ν y. ( EX y) Thus, it is the limit of the decresing series... Exmle, continued, EF EF = µ y. ( EX y)... EX( EX ) EX A0 = Ø A1 = {2,} A2 = {1,2,} A = {1,2,} 7 8 Remining oertors Comlexity AF AG E( U ) A( U ) = = = = µ y.( AX y) νy.( AX y) µ y.( ( EX y)) µ y.( ( AX y)) However SS sys my sys e e EXPONENTIAL in in numer of of rllel comonents! -- -- FIXPOINT COMPUTATIONS my e e crried out out using ROBDD s (Reduced Ordered Binry Decision Digrms) Brynt, 86 86 9 0 Brnching time semntics Something more out Finite Stte Automt nd Temorl Logics Comuttion tree of n utomton is the unfolding of the utomton (Continution of Lecture 2) 1 2
Exmle (Brnching Time) Liner Time Semntics Seuences of trnsitions (or sttes) set of ossile excecutions of system Suite est for closed systems Exmle (Liner Time) Euivlences nd Preorders A euivlent to B if the tree of A is identicl to the tree of B (Too strong!) A is simulted y B if every trnsition of A is simulted y trnsition of B (simultion [Milner78]) A nd B re isimulr if there is symmetricl simultion etween A s nd B s sttes (isimultion [Milner80]) A nd B re testing euivlent if they cn ss the sme set of tests (my nd must testing [Nicol nd Hennessy 8]) A nd B trce-euivlent if they rovide the sme set of seuences of trnsitions (trce euivlence [Hore76]) 5 6 Models: Infinite Seuences (ω-lnguge cceted y utomt) LTL: Liner Time Logics defined on infinite trces of Krike structures with cceting conditions Automt with cceting conditions Buchi, Muller utomt Infininte cceted seuences of trnsitions s semntics of utomt 7 8
LTL: Syntx LTL: semntics P not F F1 nd F2 O F (next time) F1 U F2 (Until) ssume n utomton M seuence of M: t=s(0) s(1) s(2)... s(i)...... The set of seuences of M is Com(M) s(i) st if is lel of s(i) s(i) st not F if not (s(i) st F) s(i) st F1 nd F2 if s(i) st F1 nd s(i) st F2 s(i) st O F if s(i+1) st F s(i) st F1 U F2 if s(k) st F2 for some k=>i nd s(j) st F1 for ll j such tht i<=j<k 9 50 LTL: semntics (contn.) Derived Oertors ssume n utomton M seuence of M: t=s(0) s(1) s(2)... s(i)...... The set of seuences of M is Com(M) t st F iff s(0) st F M st F iff t st F for ll seuences t of Com(M) <>F denotes (true U F) [ ]F denotes not (<> not F) F1 W F2 denotes (F1 U F2) or [ ]F1 (wek Until-oertor) 51 52 Model Checking LTL [Woler et l 1986] Comring CTL nd LTL Given n utomt M nd formul F, to check M st F Construct the formul utomton: A( F) Construct the roduct utomton M A( F) (on-the-fly) If M A( F) is emty then M st F otherwise NO Time-Comlexity = M *2 O( F ) The sme ide cn e used for CTL model checking using Tree-utomt <> P (LTL) similr AF (CTL) [] (LTL) similr AG (CTL) However, LTL cnnot exress ossiilities roerties: EF P CTL cnnot exress <>[] CTL* = LTL + CTL 5 5
Comring CTL nd LTL (contn.) Why? No sutree where is true everywhere P P P Stisfies <>[] ut it does not stisfy AF AG 55 56 END (Finite Stte Untimed Systems) 57