Content deleted Content added
No edit summary |
Adding short description: "Theory in computer science" |
||
(23 intermediate revisions by 16 users not shown) | |||
Line 1:
{{Short description|Theory in computer science}}
{{More footnotes|date=October 2015}}
'''Computation tree logic''' ('''CTL''') is a branching-time [[Mathematical logic|logic]], meaning that its model of [[time]] is a [[tree (graph theory)|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]] of software or hardware artifacts, typically by software applications known as [[model checker]]s, which determine if a given artifact possesses [[Safety
== History ==
CTL was first proposed by [[Edmund M. Clarke]] and [[E. Allen Emerson]] in 1981, who used it to synthesize so-called ''synchronisation skeletons'', ''i.e'' abstractions of [[concurrent program]]s.
Since the introduction of CTL, there has been debate about the relative merits of CTL and LTL. Because CTL is more computationally efficient to model check, it has become more common in industrial use, and many of the most successful model-checking tools use CTL as a specification language.<ref>{{cite book |last1=Vardi |first1=Moshe Y. |date=2001 |chapter=Branching vs. Linear Time: Final Showdown |journal=Tools and Algorithms for the Construction and Analysis of Systems |series=Lecture Notes in Computer Science |volume=2031 | publisher=Springer, Berlin |pages=1{{ndash}}22 |doi=10.1007/3-540-45319-9_1 |isbn=978-3-540-41865-8 |chapter-url=https://link.springer.com/content/pdf/10.1007/3-540-45319-9_1.pdf}}</ref>
== Syntax of CTL ==
The [[Regular Language|language]] of [[well
:<math>\begin{align}
Line 14 ⟶ 18:
\end{align}</math>
where <math>p</math> ranges over a set of [[atomic formula]]s. It is not necessary to use all connectives
<math>\{\neg, \land, \mbox{AX}, \mbox{AU}, \mbox{EU}\}</math> comprises a complete set of connectives, and the others can be defined using them.
*<math>\mbox{A}</math> means 'along All paths' ''(
*<math>\mbox{E}</math> means 'along at least (there Exists) one path' ''(possibly)''
For example, the following is a well-formed CTL formula:
:<math>\mbox{EF }(\mbox{EG } p \Rightarrow \mbox{AF } r
The following is not a well-formed CTL formula:
:<math>\mbox{EF }\big(r \mbox{ U } q\big)
The problem with this string is that <math>\mathrm U</math> can occur only when paired with an <math>\mathrm A</math> or an <math>\mathrm E</math>. <!-- TODO: explain it is evaluated over multiple paths /// here is a copy-paste from the LTL page: build up from proposition variables p1,p2,..., LTL formulas are generally evaluated over paths and a position on that path. A LTL formula as such is satisfied if and only if it is satisfied for position 0 on that path. -->
==Operators==
Line 34 ⟶ 40:
===Logical operators===
The [[Logical connective|logical operators]] are the usual ones: ¬, ∨, ∧, ⇒ and ⇔. Along with these operators CTL formulas can also make use of the boolean constants [[Truth|true]] and [[False (logic)|false]].
===Temporal operators===
The temporal operators are the following:
* Quantifiers over paths
**'''A'''
**'''E'''
* Path-specific quantifiers
**'''X''' ''φ'' – Ne'''x'''t: ''φ'' has to hold at the next state (this operator is sometimes noted '''N''' instead of '''X''').
Line 48 ⟶ 54:
**''φ'' '''W''' ''ψ'' – '''W'''eak 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,
===Minimal set of operators===
In CTL there
Some of the transformations used for temporal operators are:
Line 67 ⟶ 73:
===Definition===
CTL formulae are interpreted over [[
Then the relation of semantic [[entailment]] <math>(\mathcal{M}, s \models \phi)</math> is defined recursively on <math>\phi</math>:
Line 95 ⟶ 100:
This is denoted <math>\phi \equiv \psi</math>
It can be seen that <math>\mathrm A</math> and <math>\mathrm E</math> are duals, being universal and existential computation path quantifiers respectively:
<math>\neg \mathrm A\
Furthermore, so are <math>\mathrm G</math> and <math>\mathrm F</math>.
Hence an instance of [[De Morgan's
:<math>\neg AF\phi \equiv EG\neg\phi</math>
:<math>\neg EF\phi \equiv AG\neg\phi</math>
Line 107 ⟶ 112:
It can be shown using such identities that a subset of the CTL temporal connectives is adequate if it contains <math>EU</math>, at least one of <math>\{AX,EX\}</math> and at least one of <math>\{EG,AF,AU\}</math> and the boolean connectives.
The important equivalences below are called the '''expansion laws'''; they allow
:<math>AG\phi \equiv \phi \land AX AG \phi</math>
:<math>EG\phi \equiv \phi \land EX EG \phi</math>
Line 125 ⟶ 130:
:"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
:"
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'''):
Line 136 ⟶ 141:
==Relations with other logics==
<!-- CTL is a subset of CTL* -->
Computation tree logic (CTL) is a subset of CTL* as well as of the [[modal mu calculus|modal μ calculus]]. CTL is also a fragment of Alur, Henzinger and Kupferman's [[
<!-- CTL is complementary to LTL -->
Computation tree logic (CTL) and [[
*'''FG'''.P exists in LTL but not in CTL.
*'''AG'''(
== Extensions ==
CTL has been extended with [[second-order logic|second-order]]
* the tree semantics. We label nodes of the computation tree. QCTL* = QCTL = [[monadic second-order logic|MSO]] over trees. Model checking and satisfiability are tower
* the structure semantics. We label states. QCTL* = QCTL = MSO over
A reduction from the model
==See also==
*[[Probabilistic CTL]]
*[[Fair
*[[Linear temporal logic]]
==References==
{{Reflist}}
* {{cite
* {{cite book |author1=Michael Huth |author2=Mark Ryan | title=Logic in Computer Science
* {{cite journal |author1=Emerson, E. A. |author2=Halpern, J. Y. |author2link = Joseph Halpern| title=Decision procedures and expressiveness in the temporal logic of branching time | journal=[[Journal of Computer and System Sciences]]| year=1985| volume=30 | issue=1 | pages=1–24 | doi=10.1016/0022-0000(85)90001-7| citeseerx=10.1.1.221.6187}}
* {{cite journal |author1=Clarke, E. M. |author2=Emerson, E. A. |author3=Sistla, A. P. |name-list-style=amp | title=Automatic verification of finite-state concurrent systems using temporal logic specifications | journal=[[ACM Transactions on Programming Languages and Systems]]| year=1986| volume=8 | issue=2 | pages=244–263 | doi=10.1145/5397.5399|s2cid=52853200 | doi-access=free }}
* {{cite book | author=Emerson, E. A. | year=1990 | chapter =Temporal and modal logic | editor=
==External links==
|