Computational Tree Logic
   HOME

TheInfoList



OR:

Computation tree logic (CTL) is a branching-time
logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of logical truths. It is a formal science investigating how conclusions follow from premises ...
, meaning that its model of
time Time is the continued sequence of existence and events that occurs in an apparently irreversible succession from the past, through the present, into the future. It is a component quantity of various measurements used to sequence events, to ...
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 an actual path that is realized. It is used in
formal verification In the context of hardware and software systems, formal verification is the act of proving or disproving the correctness of intended algorithms underlying a system with respect to a certain formal specification or property, using formal metho ...
of software or hardware artifacts, typically by software applications known as
model checker In computer science, model checking or property checking is a method for checking whether a finite-state model of a system meets a given specification (also known as correctness). This is typically associated with hardware or software system ...
s, which determine if a given artifact possesses safety or liveness properties. For example, CTL can specify that when some initial condition is satisfied (e.g., all program variables are positive or no cars on a highway straddle two lanes), then all possible executions of a program avoid some undesirable condition (e.g., dividing a number by zero or two cars colliding on a highway). In this example, the safety property could be verified by a model checker that explores all possible transitions out of program states satisfying the initial condition and ensures that all such executions satisfy the property. Computation tree logic belongs to a class of
temporal logic In logic, temporal logic is any system of rules and symbolism for representing, and reasoning about, propositions qualified in terms of time (for example, "I am ''always'' hungry", "I will ''eventually'' be hungry", or "I will be hungry ''until'' I ...
s that includes linear temporal logic (LTL). Although there are properties expressible only in CTL and properties expressible only in LTL, all properties expressible in either logic can also be expressed in
CTL* CTL* is a superset of computational tree logic (CTL) and linear temporal logic (LTL). It freely combines path quantifiers and temporal operators. Like CTL, CTL* is a branching-time logic. The formal semantics of CTL* formulae are defined with resp ...
. CTL was first proposed by
Edmund M. Clarke Edmund Melson Clarke, Jr. (July 27, 1945 – December 22, 2020) was an American computer scientist and academic noted for developing model checking, a method for formally verifying hardware and software designs. He was the FORE Systems Professor ...
and E. Allen Emerson in 1981, who used it to synthesize so-called ''synchronisation skeletons'', ''i.e'' abstractions of concurrent programs.


Syntax of CTL

The
language Language is a structured system of communication. The structure of a language is its grammar and the free components are its vocabulary. Languages are the primary means by which humans communicate, and may be conveyed through a variety of met ...
of
well-formed formula In mathematical logic, propositional logic and predicate logic, a well-formed formula, abbreviated WFF or wff, often simply formula, is a finite sequence of symbols from a given alphabet that is part of a formal language. A formal language can be ...
s for CTL is generated by the following
grammar In linguistics, the grammar of a natural language is its set of structure, structural constraints on speakers' or writers' composition of clause (linguistics), clauses, phrases, and words. The term can also refer to the study of such constraint ...
: :\begin \phi &::= \bot \mid \top \mid p \mid (\neg\phi) \mid (\phi\land\phi) \mid (\phi\lor\phi) \mid (\phi\Rightarrow\phi) \mid (\phi\Leftrightarrow\phi) \\ &\mid\quad \mbox\phi \mid \mbox\phi \mid \mbox\phi \mid \mbox\phi \mid \mbox\phi \mid \mbox\phi \mid \mbox phi \mbox \phi\mid \mbox phi \mbox \phi\end where p ranges over a set of
atomic formula In mathematical logic, an atomic formula (also known as an atom or a prime formula) is a formula with no deeper propositional structure, that is, a formula that contains no logical connectives or equivalently a formula that has no strict subformu ...
s. It is not necessary to use all connectives – for example, \ comprises a complete set of connectives, and the others can be defined using them. *\mbox means 'along All paths' ''(inevitably)'' *\mbox means 'along at least (there Exists) one path' ''(possibly)'' For example, the following is a well-formed CTL formula: :\mbox(\mbox p \Rightarrow \mbox r) The following is not a well-formed CTL formula: :\mbox\big(r \mbox q\big) The problem with this string is that U can occur only when paired with an A or an E. CTL uses
atomic propositions In logic and analytic philosophy, an atomic sentence is a type of declarative sentence which is either true or false (may also be referred to as a proposition, statement or truthbearer) and which cannot be broken down into other simpler sentences. ...
as its building blocks to make statements about the states of a system. These propositions are then combined into formulas using
logical operator In logic, a logical connective (also called a logical operator, sentential connective, or sentential operator) is a logical constant. They can be used to connect logical formulas. For instance in the syntax of propositional logic, the binary co ...
s and temporal operators.


Operators


Logical operators

The
logical operators In logic, a logical connective (also called a logical operator, sentential connective, or sentential operator) is a logical constant. They can be used to connect logical formulas. For instance in the syntax of propositional logic, the binary c ...
are the usual ones: ¬, ∨, ∧, ⇒ and ⇔. Along with these operators CTL formulas can also make use of the boolean constants
true True most commonly refers to truth, the state of being in congruence with fact or reality. True may also refer to: Places * True, West Virginia, an unincorporated community in the United States * True, Wisconsin, a town in the United States * ...
and false.


Temporal operators

The temporal operators are the following: * Quantifiers over paths **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. * Path-specific quantifiers **X ''φ'' – Next: ''φ'' has to hold at the next state (this operator is sometimes noted N instead of X). **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 ''at least'' 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* CTL* is a superset of computational tree logic (CTL) and linear temporal logic (LTL). It freely combines path quantifiers and temporal operators. Like CTL, CTL* is a branching-time logic. The formal semantics of CTL* formulae are defined with resp ...
, 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 below.
CTL* CTL* is a superset of computational tree logic (CTL) and linear temporal logic (LTL). It freely combines path quantifiers and temporal operators. Like CTL, CTL* is a branching-time logic. The formal semantics of CTL* formulae are defined with resp ...
is strictly more expressive than CTL.


Minimal set of operators

In CTL there are minimal sets of operators. All CTL formulas can be transformed to use only those operators. This is useful in
model checking In computer science, model checking or property checking is a method for checking whether a finite-state model of a system meets a given specification (also known as correctness). This is typically associated with hardware or software systems ...
. One minimal set of operators is: . Some of the transformations used for temporal operators are: *EF''φ''

E rueU(''φ'') ( because F''φ''

rueU(''φ'')) *AX''φ''

¬EX(¬''φ'') *AG''φ''

¬EF(¬''φ'')

¬ E rueU(¬''φ'')*AF''φ''

A rueU''φ''

¬EG(¬''φ'') *A 'φ''U''ψ''

¬( E ¬''ψ'')U¬(''φ''∨''ψ'')∨ EG(¬''ψ'') )


Semantics of CTL


Definition

CTL formulae are interpreted over
transition system In theoretical computer science, a transition system is a concept used in the study of computation. It is used to describe the potential behavior of discrete systems. It consists of states and transitions between states, which may be labeled wi ...
. A transition system is a triple \mathcal=(S,,L), where S is a set of states, \subseteq S \times S is a transition relation, assumed to be serial, i.e. every state has at least one successor, and L is a labelling function, assigning propositional letters to states. Let \mathcal=(S,\rightarrow,L) be such a transition model :with s \in S, \phi \in F where F is the set of wffs over the
language Language is a structured system of communication. The structure of a language is its grammar and the free components are its vocabulary. Languages are the primary means by which humans communicate, and may be conveyed through a variety of met ...
of \mathcal. Then the relation of semantic
entailment Logical consequence (also entailment) is a fundamental concept in logic, which describes the relationship between statements that hold true when one statement logically ''follows from'' one or more statements. A valid logical argument is one ...
(\mathcal, s \models \phi) is defined recursively on \phi: # \Big( (\mathcal, s) \models \top \Big) \land \Big( (\mathcal, s) \not\models \bot \Big) # \Big( (\mathcal, s) \models p \Big) \Leftrightarrow \Big( p \in L(s) \Big) # \Big( (\mathcal, s) \models \neg\phi \Big) \Leftrightarrow \Big( (\mathcal, s) \not\models \phi \Big) # \Big( (\mathcal, s) \models \phi_1 \land \phi_2 \Big) \Leftrightarrow \Big( \big((\mathcal, s) \models \phi_1 \big) \land \big((\mathcal, s) \models \phi_2 \big) \Big) # \Big( (\mathcal, s) \models \phi_1 \lor \phi_2 \Big) \Leftrightarrow \Big( \big((\mathcal, s) \models \phi_1 \big) \lor \big((\mathcal, s) \models \phi_2 \big) \Big) # \Big( (\mathcal, s) \models \phi_1 \Rightarrow \phi_2 \Big) \Leftrightarrow \Big( \big((\mathcal, s) \not\models \phi_1 \big) \lor \big((\mathcal, s) \models \phi_2 \big) \Big) # \bigg( (\mathcal, s) \models \phi_1 \Leftrightarrow \phi_2 \bigg) \Leftrightarrow \bigg( \Big( \big((\mathcal, s) \models \phi_1 \big) \land \big((\mathcal, s) \models \phi_2 \big) \Big) \lor \Big( \neg \big((\mathcal, s) \models \phi_1 \big) \land \neg \big((\mathcal, s) \models \phi_2 \big) \Big) \bigg) # \Big( (\mathcal, s) \models AX\phi \Big) \Leftrightarrow \Big( \forall \langle s \rightarrow s_1 \rangle \big( (\mathcal, s_1) \models \phi \big) \Big) # \Big( (\mathcal, s) \models EX\phi \Big) \Leftrightarrow \Big( \exists \langle s \rightarrow s_1 \rangle \big( (\mathcal, s_1) \models \phi \big) \Big) # \Big( (\mathcal, s) \models AG\phi \Big) \Leftrightarrow \Big( \forall \langle s_1 \rightarrow s_2 \rightarrow \ldots \rangle (s=s_1) \forall i \big( (\mathcal, s_i) \models \phi \big) \Big) # \Big( (\mathcal, s) \models EG\phi \Big) \Leftrightarrow \Big( \exists \langle s_1 \rightarrow s_2 \rightarrow \ldots \rangle (s=s_1) \forall i \big( (\mathcal, s_i) \models \phi \big) \Big) # \Big( (\mathcal, s) \models AF\phi \Big) \Leftrightarrow \Big( \forall \langle s_1 \rightarrow s_2 \rightarrow \ldots \rangle (s=s_1) \exists i \big( (\mathcal, s_i) \models \phi \big) \Big) # \Big( (\mathcal, s) \models EF\phi \Big) \Leftrightarrow \Big( \exists \langle s_1 \rightarrow s_2 \rightarrow \ldots \rangle (s=s_1) \exists i \big( (\mathcal, s_i) \models \phi \big) \Big) # \bigg( (\mathcal, s) \models A phi_1 U \phi_2\bigg) \Leftrightarrow \bigg( \forall \langle s_1 \rightarrow s_2 \rightarrow \ldots \rangle (s=s_1) \exists i \Big( \big( (\mathcal, s_i) \models \phi_2 \big) \land \big( \forall (j < i) (\mathcal, s_j) \models \phi_1 \big) \Big) \bigg) # \bigg( (\mathcal, s) \models E phi_1 U \phi_2\bigg) \Leftrightarrow \bigg( \exists \langle s_1 \rightarrow s_2 \rightarrow \ldots \rangle (s=s_1) \exists i \Big( \big( (\mathcal, s_i) \models \phi_2 \big) \land \big( \forall (j < i) (\mathcal, s_j) \models \phi_1 \big) \Big) \bigg)


Characterisation of CTL

Rules 10–15 above refer to computation paths in models and are what ultimately characterise the "Computation Tree"; they are assertions about the nature of the infinitely deep computation tree rooted at the given state s.


Semantic equivalences

The formulae \phi and \psi are said to be semantically equivalent if any state in any model that satisfies one also satisfies the other. This is denoted \phi \equiv \psi It can be seen that A and E are duals, being universal and existential computation path quantifiers respectively: \neg A\Phi \equiv E \neg \Phi . Furthermore, so are G and F. Hence an instance of
De Morgan's laws In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathem ...
can be formulated in CTL: :\neg AF\phi \equiv EG\neg\phi :\neg EF\phi \equiv AG\neg\phi :\neg AX\phi \equiv EX\neg\phi It can be shown using such identities that a subset of the CTL temporal connectives is adequate if it contains EU, at least one of \ and at least one of \ and the boolean connectives. The important equivalences below are called the expansion laws; they allow to unfold the verification of a CTL connective towards its successors in time. :AG\phi \equiv \phi \land AX AG \phi :EG\phi \equiv \phi \land EX EG \phi :AF\phi \equiv \phi \lor AX AF \phi :EF\phi \equiv \phi \lor EX EF \phi :A phi U \psi\equiv \psi \lor (\phi \land AX A phi U \psi :E phi U \psi\equiv \psi \lor (\phi \land EX E phi U \psi


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 :"Depending on what happens in the future (E), it's possible that for the rest of time (G), I'll be guaranteed at least one (AF) chocolate-liking day still ahead of me. However, if something ever goes wrong, then all bets are off and there's no guarantee about whether I'll ever like chocolate." The two following examples show the difference between CTL and CTL*, as they allow for the until operator to not be qualified with any path operator (A or E): *AG(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." *EF((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)."


Relations with other logics

Computation tree logic (CTL) is a subset of CTL* as well as of the modal μ calculus. CTL is also a fragment of Alur, Henzinger and Kupferman's
alternating-time temporal logic In computer science, alternating-time temporal logic, or ATL, is a branching-time temporal logic that extends computation tree logic (CTL) to multiple players. ATL naturally describes computations of multi-agent systems and multiplayer video gam ...
(ATL). Computation 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, which is a proper subset of both CTL and LTL. *FG.P exists in LTL but not in CTL. *AG(P⇒((EX.Q)∧(EX¬Q))) and AG.EF.P exist in CTL but not in LTL.


Extensions

CTL has been extended with second-order quantification \exists p and \forall p to quantified computational tree logic (QCTL). There are two semantics: * the tree semantics. We label nodes of the computation tree. QCTL* = QCTL = MSO over trees. Model checking and satisfiability are tower complete. * the structure semantics. We label states. QCTL* = QCTL = MSO over
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discre ...
s. Model checking is
PSPACE-complete In computational complexity theory, a decision problem is PSPACE-complete if it can be solved using an amount of memory that is polynomial in the input length (polynomial space) and if every other problem that can be solved in polynomial space can b ...
but satisfiability is undecidable. A reduction from the model-checking problem of QCTL with the structure semantics, to TQBF (true quantified Boolean formulae) has been proposed, in order to take advantage of the QBF solvers.


See also

* Probabilistic CTL * Fair computational tree logic * Linear temporal logic


References

* * * * * {{cite book , author=Emerson, E. A. , year=1990 , chapter =Temporal and modal logic , editor=Jan van Leeuwen , editor-link=Jan van Leeuwen , title=Handbook of Theoretical Computer Science, vol. B , pages=955–1072 , publisher=MIT Press , isbn=978-0-262-22039-2


External links


Teaching slides of CTL
Logic in computer science Temporal logic Automata (computation)