Lecture 0: Computation Tree Logics
Total Page:16
File Type:pdf, Size:1020Kb
Lecture 0: Computation Tree Logics ¯ Model of Computation ¯ Computation Tree Logics £ ¯ The Logic CTL ¯ Path Formulas and State Formulas ¯ CTL and LTL ¯ Expressive Power of Logics 1 Model of Computation a b State Transition Graph or Kripke Model b c c a b b c c a b c c Infinite Computation Tree (Unwind State Graph to obtain Infinite Tree) 2 Model of Computation (Cont.) Formally, a Kripke structure is a triple Å = hË; Ê; Äi, where ¯ Ë is the set of states, ¯ Ê Ë ¢ Ë is the transition relation, and ¯ Ä : Ë ! È ´AÈ µ gives the set of atomic propositions true in each state. ¼ ¼ We assume that Ê is total (i.e., for all states × ¾ Ë there exists a state × ¾ Ë such that ´×; × µ ¾ Ê ). = × ;× ;::: i ¼ ´× ;× µ ¾ Ê A path in M is an infinite sequence of states, ¼ ½ such that for , i i·½ . i × We write to denote the suffix of starting at i . Unless otherwise stated, all of our results apply only to finite Kripke structures. 3 Computation Tree Logics Temporal logics may differ according to how they handle branching in the underlying computation tree. In a linear temporal logic, operators are provided for describing events along a single computation path. In a branching-time logic the temporal operators quantify over the paths that are possible from a given state. 4 The Logic CTL £ The computation tree logic CTL£ combines both branching-time and linear-time operators. In this logic a path quantifier can prefix an assertion composed of arbitrary combinations of the usual linear-time operators. 1. Path quantifier: ¯ A—“for every path” ¯ E—“there exists a path” 2. Linear-time operators: ¯ X Ô—Ô holds next time. ¯ FÔ—Ô holds sometime in the future ¯ GÔ—Ô holds globally in the future ¯ ÔUÕ —Ô holds until Õ holds 5 Path Formulas and State Formulas The syntax of state formulas is given by the following rules: ¯ If Ô ¾ AÈ , then Ô is a state formula. ¯ If f and g are state formulas, then :f and f _ g are state formulas. ¯ If f is a path formula, then E´f µ is a state formula. Two additional rules are needed to specify the syntax of path formulas: ¯ If f is a state formula, then f is also a path formula. ¯ If f and g are path formulas, then :f , f _ g , X f , and ´f U g µ are path formulas. 6 State Formulas (Cont.) If f is a state formula, the notation Å; × j= f means that f holds at state × in the Kripke structure Å . f f g Å; × j= f Assume ½ and ¾ are state formulas and is a path formula. The relation is defined inductively as follows: 1. × j= Ô ¸ Ô ¾ Ä´×µ. × j= :f ¸ × 6j= f 2. ½ ½ . × j= f _ f ¸ × j= f × j= f 3. ½ ¾ ½ or ¾ . 4. × j= E´g µ ¸ there exists a path starting with × such that j= g . 7 Path Formulas (Cont.) If f is a path formula, Å; j= f means that f holds along path in Kripke structure Å . g g f Å; j= f Assume ½ and ¾ are path formulas and is a state formula. The relation is defined inductively as follows: 1. j= f ¸ × is the first state of and × j= f . j= :g ¸ 6j= g 2. ½ ½ . j= g _ g ¸ j= g j= g 3. ½ ¾ ½ or ¾ . ½ j= g ¸ j= g 4. X ½ ½ . j= ´g g µ ¸ k ¼ 5. ½ U ¾ there exists a such that k j j= g ¼ j < k j= g ¾ and for , ½ . 8 Standard Abbreviations The customary abbreviations will be used for the connectives of propositional logic. In addition, we will use the following abbreviations in writing temporal operators: ¯ A´f µ : E´:f µ ¯ f ´ØÖ Ùe U f µ ¯ G f : F :f 9 CTL and LTL CTL is a restricted subset of CTL£ that permits only branching-time operators—each of the linear-time operators G, F, X, and U must be immediately preceded by a path quantifier. Example: AG ´EF Ôµ LTL consists of formulas that have the form A f where f is a path formula in which the only state subformulas permitted are atomic propositions. Example: A´FG Ôµ 10 Expressive Power It can be shown that the three logics discussed in this section have different expressive powers. For example, there is no CTL formula that is equivalent to the LTL formula A ´FG Ôµ. Likewise, there is no LTL formula that is equivalent to the CTL formula AG ´EF Ôµ. £ The disjunction A´FG Ôµ _ AG ´EF Ôµ is a CTL formula that is not expressible in either CTL or LTL. 11 Basic CTL Operators There are eight basic CTL operators: ¯ AX and EX, ¯ AG and EG, ¯ AF and EF, ¯ AU and EU Each of these can be expressed in terms of EX, EG, and EU: ¯ AX f = : EX´:f µ ¯ AG f = : EF´:f µ ¯ AF f = : EG´:f µ ¯ EF f = E[ØÖ Ùe U f ] ¯ A[f U g ] : E [:g U :f ^:g] ^:EG :g 12 Basic CTL Operators The four most widely used CTL operators are illustrated below. Each computation tree has the state × ¼ as its root. g g g g g g g g g g . Å; × j= g Å; × j= g ¼ AG ¼ AF g g g g . Å; × j= g Å; × j= g ¼ EF ¼ EG 13 Typical CTL Formulas ¯ EF´Ë ØaÖ Øed ^:Ê eadÝ µ: it is possible to get to a state where Started holds but Ready does not hold. ¯ AG ´ÊeÕ µ AFAck µ:ifaRequest occurs, then it will be eventually Acknowledged. ¯ AG ´AF D eÚ iceE ÒabÐ edµ: DeviceEnabled holds infinitely often on every computation path. ¯ AG ´EF Ê e×ØaÖ Øµ: from any state it is possible to get to the Restart state. 14.