Temporal logic explained

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 eat something"). It is sometimes also used to refer to tense logic, a modal logic-based system of temporal logic introduced by Arthur Prior in the late 1950s, with important contributions by Hans Kamp. It has been further developed by computer scientists, notably Amir Pnueli, and logicians.

Temporal logic has found an important application in formal verification, where it is used to state requirements of hardware or software systems. For instance, one may wish to say that whenever a request is made, access to a resource is eventually granted, but it is never granted to two requestors simultaneously. Such a statement can conveniently be expressed in a temporal logic.

Motivation

Consider the statement "I am hungry". Though its meaning is constant in time, the statement's truth value can vary in time. Sometimes it is true, and sometimes false, but never simultaneously true and false. In a temporal logic, a statement can have a truth value that varies in time—in contrast with an atemporal logic, which applies only to statements whose truth values are constant in time. This treatment of truth-value over time differentiates temporal logic from computational verb logic.

Temporal logic always has the ability to reason about a timeline. So-called "linear-time" logics are restricted to this type of reasoning. Branching-time logics, however, can reason about multiple timelines. This permits in particular treatment of environments that may act unpredictably.To continue the example, in a branching-time logic we may state that "there is a possibility that I will stay hungry forever", and that "there is a possibility that eventually I am no longer hungry". If we do not know whether or not I will ever be fed, these statements can both be true.

History

Although Aristotle's logic is almost entirely concerned with the theory of the categorical syllogism, there are passages in his work that are now seen as anticipations of temporal logic, and may imply an early, partially developed form of first-order temporal modal bivalent logic. Aristotle was particularly concerned with the problem of future contingents, where he could not accept that the principle of bivalence applies to statements about future events, i.e. that we can presently decide if a statement about a future event is true or false, such as "there will be a sea battle tomorrow".[1]

There was little development for millennia, Charles Sanders Peirce noted in the 19th century:[2]

Surprisingly for Peirce, the first system of temporal logic was constructed, as far as we know, in the first half of 20th century. Although Arthur Prior is widely known as a founder of temporal logic, the first formalization of such logic was provided in 1947 by Polish logician, Jerzy Łoś.[3] In his work Podstawy Analizy Metodologicznej Kanonów Milla (The Foundations of a Methodological Analysis of Mill’s Methods) he presented a formalization of Mill's canons. In Łoś' approach, emphasis was placed on the time factor. Thus, to reach his goal, he had to create a logic that could provide means for formalization of temporal functions. The logic could be seen as a byproduct of Łoś' main aim,[4] albeit it was the first positional logic that, as a framework, was used later for Łoś' inventions in epistemic logic. The logic itself has syntax very different than Prior's tense logic, which uses modal operators. The language of Łoś' logic rather uses a realization operator, specific to positional logic, which binds the expression with the specific context in which its truth-value is considered. In Łoś' work this considered context was only temporal, thus expressions were bound with specific moments or intervals of time.

In the following years, research of temporal logic by Arthur Prior began. He was concerned with the philosophical implications of free will and predestination. According to his wife, he first considered formalizing temporal logic in 1953. Results of his research were first presented at the conference in Wellington in 1954. The system Prior presented, was similar syntactically to Łoś' logic, although not until 1955 did he explicitly refer to Łoś' work, in the last section of Appendix 1 in Prior’s Formal Logic.

Prior gave lectures on the topic at the University of Oxford in 1955–6, and in 1957 published a book, Time and Modality, in which he introduced a propositional modal logic with two temporal connectives (modal operators), F and P, corresponding to "sometime in the future" and "sometime in the past". In this early work, Prior considered time to be linear. In 1958 however, he received a letter from Saul Kripke, who pointed out that this assumption is perhaps unwarranted. In a development that foreshadowed a similar one in computer science, Prior took this under advisement, and developed two theories of branching time, which he called "Ockhamist" and "Peircean". Between 1958 and 1965 Prior also corresponded with Charles Leonard Hamblin, and a number of early developments in the field can be traced to this correspondence, for example Hamblin implications. Prior published his most mature work on the topic, the book Past, Present, and Future in 1967. He died two years later.[5]

Along with tense logic, Prior constructed a few systems of positional logic, which inherited their main ideas from Łoś.[6] Work in positional temporal logics was continued by Nicholas Rescher in the 60s and 70s. In such works as Note on Chronological Logic (1966), On the Logic of Chronological Propositions (1968), Topological Logic (1968), and Temporal Logic (1971) he researched connections between Łoś' and Prior's systems. Moreover, he proved that Prior's tense operators could be defined using a realization operator in specific positional logics. Rescher, in his work, also created more general systems of positional logics. Although the first ones were constructed for purely temporal uses, he proposed the term topological logics for logics that were meant to contain a realization operator but had no specific temporal axioms—like the clock axiom.

The binary temporal operators Since and Until were introduced by Hans Kamp in his 1968 Ph.D. thesis,[7] which also contains an important result relating temporal logic to first-order logic—a result now known as Kamp's theorem.[8] [9] [10]

Two early contenders in formal verifications were linear temporal logic, a linear-time logic by Amir Pnueli, and computation tree logic (CTL), a branching-time logic by Mordechai Ben-Ari, Zohar Manna and Amir Pnueli. An almost equivalent formalism to CTL was suggested around the same time by E. M. Clarke and E. A. Emerson. The fact that the second logic can be decided more efficiently than the first does not reflect on branching- and linear-time logics in general, as has sometimes been argued. Rather, Emerson and Lei show that any linear-time logic can be extended to a branching-time logic that can be decided with the same complexity.

Łoś's positional logic

Łoś’s logic was published as his 1947 master’s thesis Podstawy Analizy Metodologicznej Kanonów Milla (The Foundations of a Methodological Analysis of Mill’s Methods).[11] His philosophical and formal concepts could be seen as continuations of those of the Lviv–Warsaw School of Logic, as his supervisor was Jerzy Słupecki, disciple of Jan Łukasiewicz. The paper was not translated into English until 1977, although Henryk Hiż presented in 1951 a brief, but informative, review in the Journal of Symbolic Logic. This review contained core concepts of Łoś’s work and was enough to popularize his results among the logical community. The main aim of this work was to present Mill's canons in the framework of formal logic. To achieve this goal the author researched the importance of temporal functions in the structure of Mill's concept. Having that, he provided his axiomatic system of logic that would fit as a framework for Mill's canons along with their temporal aspects.

Syntax

The language of the logic first published in Podstawy Analizy Metodologicznej Kanonów Milla (The Foundations of a Methodological Analysis of Mill’s Methods) consisted of:

The set of terms (denoted by S) is constructed as follows:

\tau\inS

and

\epsilon

is a time interval variable, then

\delta(\tau,\epsilon)\inS

The set of formulas (denoted by For) is constructed as follows:[11]

\tau\inS

and

\phi

is a propositional variable, then

U\tau(\phi)\inFor

\phi\inFor

, then

\neg\phi\inFor

\phi,\psi\inFor

and

\circ\in\{\wedge,\vee,,\equiv\}

, then

\phi\circ\psi\inFor

\phi\inFor

and

Q\in\{\forall,\exists\}

and υ is a propositional, moment or interval variable, then

Q\upsilon\phi\inFor

Original Axiomatic System

U
t1

\negp1\equiv\neg

U
t1

p1

U
t1

(p1p2)

(U
t1

p1

U
t1

p2)

U
t1

((p1p2)((p2p3)(p1p3)))

U
t1

(p1(\negp1p2))

U
t1

((\negp1p1)p1)

\forall
t1
U
t1

p1p1

\forall
t1
\forall
n1
\exists
t2
\forall
p1
(U
\delta(t1,n1)

p1\equiv

U
t2

p1)

\forall
t1
\forall
n1
\exists
t2
\forall
p1
(U
\delta(t2,n1)

p1\equiv

U
t1

p1)

\forall
t1
\exists
p1
\forall
t2
(U
t2

p1\equiv

\forall
p2
(U
t1

p2\equiv

U
t2

p2))

Prior's tense logic (TL)

The sentential tense logic introduced in Time and Modality has four (non-truth-functional) modal operators (in addition to all usual truth-functional operators in first-order propositional logic).[12]

These can be combined if we let π be an infinite path:[13]

\pi\vDashFG\phi

: "At a certain point,

\phi

is true at all future states of the path"

\pi\vDashGF\phi

: "

\phi

is true at infinitely many states on the path"

From P and F one can define G and H, and vice versa:

\begin{align} F&\equivlnotGlnot\\ P&\equivlnotHlnot \end{align}

Syntax and semantics

A minimal syntax for TL is specified with the following BNF grammar:

\phi::=a|\bot|lnot\phi|\phi\lor\phi|G\phi|H\phi

where a is some atomic formula.[14]

Kripke models are used to evaluate the truth of sentences in TL. A pair (<) of a set and a binary relation < on (called "precedence") is called a frame. A model is given by triple (<,) of a frame and a function called a valuation that assigns to each pair of an atomic formula and a time value some truth value. The notion " is true in a model =(<,) at time " is abbreviated [{{var|u}}]. With this notation,[15]

! Statement ! ... is true just when
⊨[{{var|u}}]=true
⊨¬[{{var|u}}]not ⊨[{{var|u}}]
⊨(∧)[{{var|u}}]⊨[{{var|u}}] and ⊨[{{var|u}}]
⊨(∨)[{{var|u}}]⊨[{{var|u}}] or ⊨[{{var|u}}]
⊨(→)[{{var|u}}]⊨[{{var|u}}] if ⊨[{{var|u}}]
⊨G[{{var|u}}]⊨[{{var|v}}] for all with <
⊨H[{{var|u}}]⊨[{{var|v}}] for all with <

Given a class of frames, a sentence of TL is

Many sentences are only valid for a limited class of frames. It is common to restrict the class of frames to those with a relation < that is transitive, antisymmetric, reflexive, trichotomic, irreflexive, total, dense, or some combination of these.

A minimal axiomatic logic

Burgess outlines a logic that makes no assumptions on the relation <, but allows for meaningful deductions, based on the following axiom schema:[16]

  1. where is a tautology of first-order logic
  2. G(→)→(G→G)
  3. H(→)→(H→H)
  4. →GP
  5. →HF

with the following rules of deduction:

  1. given → and, deduce (modus ponens)
  2. given a tautology, infer G
  3. given a tautology, infer H

One can derive the following rules:

  1. Becker's rule: given →, deduce T→T where T is a tense, any sequence made of G, H, F, and P.
  2. Mirroring: given a theorem, deduce its mirror statement §, which is obtained by replacing G by H (and so F by P) and vice versa.
  3. Duality: given a theorem, deduce its dual statement *, which is obtained by interchanging ∧ with ∨, G with F, and H with P.

Translation to predicate logic

Burgess gives a Meredith translation from statements in TL into statements in first-order logic with one free variable 0 (representing the present moment). This translation is defined recursively as follows:[17]

\begin{align} &M(a)&&=

*x
a
0

\\ &M(lnot\phi)&&=lnotM(\phi)\\ &M(\phi\land\psi)&&=M(\phi)\landM(\psi)\\ &M(G\phi)&&=\forallx1(x0<x1 → M(A+))\ &M(H\phi)&&=\forallx1(x1<x0 → M(A+)) \end{align}

where

A+

is the sentence with all variable indices incremented by 1 and

a*

is a one-place predicate defined by

x\mapstoV(a,x)

.

Temporal operators

Temporal logic has two kinds of operators: logical operators and modal operators.[18] Logical operators are usual truth-functional operators (

\neg,\lor,\land,

). The modal operators used in linear temporal logic and computation tree logic are defined as follows.
TextualSymbolicDefinitionExplanationDiagram
Binary operators
U

\phi~l{U}~\psi

(Bl{U}C)(\phi)=(\existsi:C(\phii)\land(\forallj<i:B(\phij)))

Until: holds at the current or a future position, and has to hold until that position. At that position does not have to hold any more.ImageSize = width:240 height:94PlotArea = left:30 bottom:30 top:0 right:20DateFormat = x.yPeriod = from:0 till:6TimeAxis = orientation:horizontalAlignBars = justifyScaleMajor = gridcolor:black increment:1 start:0ScaleMinor = gridcolor:black increment:1 start:0

PlotData= bar:p color:red width:10 align:left fontsize:S from:1 till:3

bar:q color:red width:10 align:left fontsize:S from:3 till:5

bar:pUq color:red width:10 align:left fontsize:S from:1 till:5

R

\phi~l{R}~\psi

(Bl{R}C)(\phi)=(\foralli:C(\phii)\lor(\existsj<i:B(\phij)))

Release: releases if is true up until and including the first position in which is true (or forever if such a position does not exist).ImageSize = width:240 height:100PlotArea = left:30 bottom:30 top:0 right:20DateFormat = x.yPeriod = from:0 till:8TimeAxis = orientation:horizontalAlignBars = justifyScaleMajor = gridcolor:black increment:1 start:0ScaleMinor = gridcolor:black increment:1 start:0

PlotData= bar:p color:red width:10 align:left fontsize:S from:2 till:4 from:6 till:8

bar:q color:red width:10 align:left fontsize:S from:1 till:3 from:5 till:6 from:7 till:8

bar:pRq color:red width:10 align:left fontsize:S from:1 till:3 from:7 till:8

Unary operators
N

circ\phi

l{N}B(\phii)=B(\phii+1)

Next: has to hold at the next state. (X is used synonymously.)ImageSize = width:240 height:60PlotArea = left:30 bottom:30 top:0 right:20DateFormat = x.yPeriod = from:0 till:6TimeAxis = orientation:horizontalAlignBars = justifyScaleMajor = gridcolor:black increment:1 start:0ScaleMinor = gridcolor:black increment:1 start:0

PlotData= bar:p color:red width:10 align:left fontsize:S from:2 till:3 from:5 till:6

bar:Np color:red width:10 align:left fontsize:S from:1 till:2 from:4 till:5

F

\Diamond\phi

l{F}B(\phi)=(truel{U}B)(\phi)

Future: eventually has to hold (somewhere on the subsequent path).ImageSize = width:240 height:60PlotArea = left:30 bottom:30 top:0 right:20DateFormat = x.yPeriod = from:0 till:6TimeAxis = orientation:horizontalAlignBars = justifyScaleMajor = gridcolor:black increment:1 start:0ScaleMinor = gridcolor:black increment:1 start:0

PlotData= bar:p color:red width:10 align:left fontsize:S from:2 till:3 from:4 till:5

bar:Fp color:red width:10 align:left fontsize:S from:0 till:5

G

\Box\phi

l{G}B(\phi)=\negl{F}\negB(\phi)

Globally: has to hold on the entire subsequent path.ImageSize = width:240 height:60PlotArea = left:30 bottom:30 top:0 right:20DateFormat = x.yPeriod = from:0 till:6TimeAxis = orientation:horizontalAlignBars = justifyScaleMajor = gridcolor:black increment:1 start:0ScaleMinor = gridcolor:black increment:1 start:0

PlotData= bar:p color:red width:10 align:left fontsize:S from:1 till:3 from:4 till:6

bar:Gp color:red width:10 align:left fontsize:S from:4 till:6

A

\forall\phi

(l{A}B)(\psi)=(\forall\phi:\phi0=\psi\toB(\phi))

All: has to hold on all paths starting from the current state.
E

\exists\phi

(l{E}B)(\psi)=(\exists\phi:\phi0=\psi\landB(\phi))

Exists: there exists at least one path starting from the current state where holds.

Alternate symbols:

fWg

is equivalent to

fUg\lorGf

Unary operators are well-formed formulas whenever is well-formed. Binary operators are well-formed formulas whenever and are well-formed.

In some logics, some operators cannot be expressed. For example, N operator cannot be expressed in temporal logic of actions.

Temporal logics

Temporal logics include:

A variation, closely related to temporal or chronological or tense logics, are modal logics based upon "topology", "place", or "spatial position".[24] [25]

See also

References

Further reading

External links

"Temporal Logic"—by Anthony Galton.

Notes and References

  1. Vardi 2008, p. 153
  2. Vardi 2008, p. 154
  3. Łoś. Jerzy (1920-1998). Podstawy analizy metodologicznej kanonów Milla. Łoś. Jerzy (1920-1998). Zasoby Biblioteki Głównej Umcs . 1947. nakł. Uniwersytetu Marii Curie-Skłodowskiej.
  4. Øhrstrøm. Peter. 2019. The Significance of the Contributions of A.N.Prior and Jerzy Łoś in the Early History of Modern Temporal Logic. Logic and Philosophy of Time: Further Themes from Prior, Volume 2. Logic and Philosophy of Time . 9788772102658 . English.
  5. Book: Peter Øhrstrøm. Per F. V. Hasle. Temporal logic: from ancient ideas to artificial intelligence. 1995. Springer. 978-0-7923-3586-3. pp. 176–178, 210
  6. Rescher. Nicholas. Garson. James. January 1969. Topological Logic. The Journal of Symbolic Logic. en. 33. 4. 537–548. 10.2307/2271360. 2271360 . 2110963 . 0022-4812.
  7. Web site: Temporal Logic (Stanford Encyclopedia of Philosophy) . Plato.stanford.edu . 2014-07-30.
  8. Book: Walter Carnielli. Claudio Pizzi. Modalities and Multimodalities. 2008. Springer. 978-1-4020-8589-5. 181.
  9. Vardi 2008, p. 154
  10. Book: Sergio Tessaris. Enrico Franconi. Thomas Eiter. Reasoning Web. Semantic Technologies for Information Systems: 5th International Summer School 2009, Brixen-Bressanone, Italy, August 30 – September 4, 2009, Tutorial Lectures. 2009. Springer. 978-3-642-03753-5. 112.
  11. Tkaczyk. Marcin. Jarmużek. Tomasz. 2019. Jerzy Łoś Positional Calculus and the Origin of Temporal Logic. Logic and Logical Philosophy. en. 28. 2. 259–276. 10.12775/LLP.2018.013. 2300-9802. free.
  12. Book: Prior, Arthur Norman. Time and modality: the John Locke lectures for 1955–6, delivered at the University of Oxford. The Clarendon Press. 2003. 9780198241584. Oxford. 905630146. Arthur Prior.
  13. Web site: An Introduction to Temporal Logics. Lawford. M.. 2004. Department of Computer Science McMaster University.
  14. Book: The Stanford Encyclopedia of Philosophy. Goranko. Valentin. Galton. Antony. 2015. Metaphysics Research Lab, Stanford University. Zalta. Edward N.. Winter 2015.
  15. Book: Müller, Thomas. The continuum companion to philosophical logic. A&C Black. 2011. Horsten. Leon. 329. Tense or temporal logic. http://kops.uni-konstanz.de/bitstream/handle/123456789/27232/Mueller_272322.pdf?sequence=2.
  16. Book: Burgess, John P.. Philosophical logic. Princeton University Press. 2009. 9781400830497. Princeton, New Jersey. 21. 777375659. John P. Burgess.
  17. Book: Burgess, John P.. Philosophical logic. Princeton University Press. 2009. 9781400830497. Princeton, New Jersey. 17. 777375659. John P. Burgess.
  18. Web site: Temporal Logic . February 7, 2020 . Stanford Encyclopedia of Philosophy . April 19, 2022.
  19. 10.1145/3126510. Timestamp Temporal Logic (TTL) for Testing the Timing of Cyber-Physical Systems. 2017. Mehrabian. Mohammadreza. Khayatian. Mohammad. Shrivastava. Aviral. Eidson. John C.. Derler. Patricia. Andrade. Hugo A.. Li-Baboud. Ya-Shian. Griffor. Edward. Weiss. Marc. Stanton. Kevin. ACM Transactions on Embedded Computing Systems. 16. 5s. 1–20. 3570088. free.
  20. Koymans, R. (1990). "Specifying real-time properties with metric temporal logic", Real-Time Systems 2(4): 255–299. .
  21. Maler, O.; Nickovic, D. (2004). "Monitoring temporal properties of continuous signals". .
  22. Li, Xiao, Cristian-Ioan Vasile, and Calin Belta. "Reinforcement learning with temporal logic rewards."
  23. Book: https://link.springer.com/chapter/10.1007/978-3-642-54792-8_15. 10.1007/978-3-642-54792-8_15. Temporal Logics for Hyperproperties. Principles of Security and Trust. Lecture Notes in Computer Science. 2014. Clarkson. Michael R.. Finkbeiner. Bernd. Koleini. Masoud. Micinski. Kristopher K.. Rabe. Markus N.. Sánchez. César. 8414. 265–284. 978-3-642-54791-1. 8938993.
  24. Book: 10.1007/978-94-017-3546-9_13. Topological Logic. Topics in Philosophical Logic. 229–249. 1968. Rescher. Nicholas. 978-90-481-8331-9.
  25. Book: 10.1007/978-94-009-9407-2_9. A Modal Logic of Place. The Philosophy of Nicholas Rescher. 65–73. 1979. von Wright. Georg Henrik. 978-94-009-9409-6.