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 structurei Ä is Ê; aË; tripleh = Å , 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 i A path in M is an infinite sequence;::: of states,;× × =  such thatÊ ¼ for¾  µ 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 , 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:

AÈ ¯ If¾ Ô , then Ô is a state formula.

¯ If f and g are state formulas, thenf : g and_ f are state formulas.

¯ If f is a path formula, thenµ Ef ´ 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, thenf : g _ , f , X f , andf ´ Uµ g are path formulas.

6 State Formulas (Cont.)

If f is a state formula, the notationf = j × Å; means that f holds at state × in the Kripke structure

Å .

½ ¾ Assume f and f are state formulas and g is a path formula. The relationf = j × Å; is defined inductively as follows:

µ × ´ Ä ¾ Ô ¸ Ô 1.= j × .

½ ½ f = 6j × ¸ f : 2.= j × .

½ ¾ ½ ¾ f = j × ¸ f _ f 3.= j × f or= j × .

4.= j × ¸ µ Eg ´ there exists a path  starting with

× suchg that= j  .

7 Path Formulas (Cont.)

If f is a path formulaf = j  , Å; means that f holds along path  in Kripke structure Å .

½ ¾ Assume g and g are path formulas and f is a state formula. Thef relation= j  Å; is defined inductively as follows:

× ¸ f 1.= j  is the first state of  f and= j × .

½ ½ g = 6j  ¸ g : 2.= j  .

½ ¾ ½ ¾ g = j  ¸ g _ g 3.= j  g or= j  .

½ ½ g = j  4.= j ¸  X g .

½

½ ¾ g ´ 5.= j  ¸ Uµ g there exists¼  a k such that

¾ ½ g = j  k and< j for ¼ g = j ,  .

k j

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:

ÖÙe ØÖ ´  f ¯

:  ¯ µ Af ´ µ f E: ´ ¯

Uµ f

: G f Ff :

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 µ EXf : ´ ¯

: AG= f µ EFf : ´ ¯

: AF= f µ EGf : ´ ¯

EF= f Ùe EØÖ [ U] f

Af : [  U] g ^: ] g Eg : [ ^: Uf : EGg :

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 × Å; = j × Å; AG g g AF g

g

. g . g ......

¼ ¼ = j × = j Å; × Å; EF g EG g

13 Typical CTL Formulas

µ eadÝ Ê ^: Øed ¯ EF ØaÖ Ë ´ : 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.

µ ed ¯ ÒabÐ AG ´ iceE AF eÚ D : 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