Computational tree logic

From Wikipedia, the free encyclopedia

Computational tree logic (CTL) is a branching-time logic, meaning that its model of time is a tree-like structure in which the future is not determined; there are different paths in the future, any one of which might be 'actual' path that is realised.

Contents

[edit] CTL grammar:

\phi::=F|T|p|(\neg\phi)|(\phi\and\phi)|(\phi\or\phi)| (\phi\rightarrow\phi)|AX\phi|EX\phi|AF\phi|EF\phi|AG\phi|EG\phi| A[\phi U \phi]|E[\phi U \phi]

where p ranges over a set of atomic formulas.

A means 'along All paths' (Inevitably)

E means 'along at least(there Exists) one path' (possibly)

For example:

The following is a well-formed CTL formula:

EF EG p \rightarrow AF r

The following is not a well-formed CTL formula:

EF(rUq)

The problem with this string is that U can occur only when paired with an A or an E.


It uses atomic propositions as its building blocks to make statements about the states of a system. CTL then combines these propositions into formulas using logical operators and temporal operators.

[edit] Operators

[edit] Logical operators

The logical operators are the usual ones: \neg,\or,\and,\rightarrow and \leftrightarrow. Along with these operators CTL formulas can also make use of the boolean constants true and false.

[edit] Temporal operators

The temporal operators are the following:

  • Path operators
    • A φ - All: φ has to hold on all paths starting from the current state.
    • E φ - Exists: there exists at least one path starting from the current state where φ holds.
  • State operators
    • N φ - Next: φ has to hold at the next state (this operator is sometimes noted X instead of N).
    • G φ - Globally: φ has to hold on the entire subsequent path.
    • F φ - Finally: φ eventually has to hold (somewhere on the subsequent path).
    • φ U ψ - Until: φ has to hold until at some position ψ holds. This implies that ψ will be verified in the future.
    • φ W ψ - Weak until: φ has to hold until ψ holds. The difference with U is that there is no guarantee that ψ will ever be verified. The W operator is sometimes called "unless".

In CTL*, the temporal operators can be freely mixed. In CTL, the operator must always be grouped in two: one path operator followed by a state operator. See the examples bellow.

[edit] Minimal set of operators

In CTL there is a minimal set of operators. All CTL formulas can be transformed to use only those operators. This is useful in model checking. One minimal set of operators is: {false, \or, \neg, EG, EU, EX}.

Here are some of the transformation used for temporal operator:

  • EFφ == E[trueU(φ)] ( because Fφ == [trueU(φ)] )
  • AXφ == \negEX(\negφ)
  • AGφ == \negEF(\negφ) == \neg E[trueU(\negφ)]
  • AFφ == A[trueUφ] == \negEG(\negφ)
  • A[φUψ] == \neg( E[(\negψ)U\neg(φ\orψ)] \or EG(\negψ) )

[edit] Examples

Let P mean "I like chocolate" and Q mean "It's warm outside".

AG.P

I will like chocolate from now on, no matter what happens.

EF.P

It's possible I may like chocolate some day, at least for one day.

AF.EG.P

It's always possible (AF) that I will suddenly start liking chocolate for the rest of time. (Note: not just the rest of my life, since my life is finite, while G is infinite).

EG.AF.P

This is a critical time in my life. Depending on what happens next (E), it's possible that for the rest of time (G), there will always be some time in the future (AF) when I will like chocolate. However, if the wrong thing happens next, then all bets are off and there's no guarantee about whether I'll ever like chocolate.

A(PUQ)

From now until it's warm outside, I will like chocolate every single day. Once it's warm outside, all bets are off as to whether I'll like chocolate anymore. Oh, and it's guaranteed to be warm outside eventually, even if only for a single day.

E((EX.P)U(AG.Q))

It's possible that: there will eventually come a time when it will be warm forever (AG.Q) and that before that time there will always be some way to get me to like chocolate the next day (EX.P).

[edit] Relations with other logics

Computational tree logic (CTL) is a subset of CTL* as well as of the modal μ calculus. More interestingly, CTL is a fragment of Alur, Henziger and Kupferman's Alternating-time Temporal Logic (ATL).

Computational tree logic (CTL) and Linear temporal logic (LTL) are both a subset of CTL*. CTL and LTL are not equivalent and they have a common subset.

  • GF.P exists in LTL but not in CTL.
  • AG(P\rightarrow((EX.Q)∧(EX¬Q))) exists in CTL but not in LTL.

[edit] See also

Fair Computational tree logic

[edit] References

  • Michael Huth and Mark Ryan (2004). "Logic in Computer Science(Second Edition)": 207. ISBN 0-521-54310-X. 
  • Emerson, E. A. and Halpern, J. Y. (1985). "Decision procedures and expressiveness in the temporal logic of branching time". Journal of Computer and System Sciences 30 (1): 1-24. 
  • Clarke, E. M., Emerson, E. A., and Sistla, A. P. (1986). "Automatic verification of finite-state concurrent systems using temporal logic specifications". ACM Transactions on Programming Languages and Systems 8 (2): 244-263. 
  • Emerson, E. A. (1990). "Temporal and modal logic", in J. van Leeuwen (ed.): Handbook of Theoretical Computer Science, vol. B. MIT Press, pp. 955-1072. ISBN 0-262-22039-3. 
In other languages