Metric temporal logic

From testwiki
Revision as of 10:13, 24 February 2025 by 2a02:3100:3956:3a00:28b0:2707:143c:1af8 (talk) (Release and Back to)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Metric temporal logic (MTL) is a special case of temporal logic. It is an extension of temporal logic in which temporal operators are replaced by time-constrained versions like until, next, since and previous operators. It is a linear-time logic that assumes both the interleaving and fictitious-clock abstractions. It is defined over a point-based weakly-monotonic integer-time semantics.

MTL has been described as a prominent specification formalism for real-time systems.[1] Full MTL over infinite timed words is undecidable.[2]

Syntax

The full metric temporal logic is defined similarly to linear temporal logic, where a set of non-negative real number is added to temporal modal operators U and S. Formally, MTL is built up from:

When the subscript is omitted, it is implicitly equal to [0,).

Note that the next operator N is not considered to be a part of MTL syntax. It will instead be defined from other operators.

Past and Future

The past fragment of metric temporal logic, denoted as past-MTL is defined as the restriction of the full metric temporal logic without the until operator. Similarly, the future fragment of metric temporal logic, denoted as future-MTL is defined as the restriction of the full metric temporal logic without the since operator.

Depending on the authors, MTL is either defined as the future fragment of MTL, in which case full-MTL is called MTL+Past.[1][3] Or MTL is defined as full-MTL.

In order to avoid ambiguity, this article uses the names full-MTL, past-MTL and future-MTL. When the statements holds for the three logic, MTL will simply be used.

Model

Let T+ intuitively represent a set of points in time. Let γ:TA a function which associates a letter to each moment tT. A model of a MTL formula is such a function γ. Usually, γ is either a timed word or a signal. In those cases, T is either a discrete subset or an interval containing 0.

Semantics

Let T and γ as above and let tT some fixed time. We are now going to explain what it means that a MTL formula ϕ holds at time t, which is denoted γ,tϕ.

Let I+ and ϕ,ψMTL. We first consider the formula ϕ𝒰Iψ. We say that γ,tϕ𝒰Iψ if and only if there exists some time tI+t such that:

  • γ,tψ and
  • for each tT with t<t<t, γ,tϕ.

We now consider the formula ϕ𝒮Iψ (pronounced "ϕ since in I ψ.") We say that γ,tϕ𝒮Iψ if and only if there exists some time tIt such that:

  • γ,tψ and
  • for each tT with t<t<t, γ,tϕ.

The definitions of γ,tϕ for the values of ϕ not considered above is similar as the definition in the LTL case.

Operators defined from basic MTL operators

Some formulas are so often used that a new operator is introduced for them. These operators are usually not considered to belong to the definition of MTL, but are syntactic sugar which denote more complex MTL formula. We first consider operators which also exists in LTL. In this section, we fix ϕ,ψ MTL formulas and I+.

Operators similar to the ones of LTL

Release and Back to

We denote by ϕIψ (pronounced "ϕ release in I, ψ") the formula ¬(¬ϕ𝒰I¬ψ). This formula holds at time t if either:

  • there is some time tt+I such that ϕ holds, and ψ hold in the interval (t,t)(t+I).
  • at each time tt+I, ψ holds.

The name "release" come from the LTL case, where this formula simply means that ψ should always hold, unless ϕ releases it.

The past counterpart of release is denote by ϕIψ (pronounced "ϕ back to in I, ψ") and is equal to the formula ¬(¬ϕ𝒮I¬ψ).

Finally and Eventually

We denote by Iϕ or Iϕ (pronounced "Finally in I, ϕ", or "Eventually in I, ϕ") the formula 𝒰Iϕ. Intuitively, this formula holds at time t if there is some time tt+I such that ϕ holds.

We denote by Iϕ or 𝒢Iϕ (pronounced "Globally in I, ϕ",) the formula ¬I¬ϕ. Intuitively, this formula holds at time t if for all time tt+I, ϕ holds.

We denote by Iϕ and Iϕ the formula similar to Iϕ and Iϕ, where 𝒰 is replaced by 𝒮. Both formula has intuitively the same meaning, but when we consider the past instead of the future.

Next and previous

This case is slightly different from the previous ones, because the intuitive meaning of the "Next" and "Previously" formulas differs depending on the kind of function γ considered.

We denote by Iϕ or 𝒩Iϕ (pronounced "Next in I, ϕ") the formula 𝒰Iϕ. Similarly, we denote by Iϕ[4] (pronounced "Previously in I, ϕ) the formula 𝒮Iϕ. The following discussion about the Next operator also holds for the Previously operator, by reversing the past and the future.

When this formula is evaluated over a timed word γ:TA, this formula means that both:

  • at the next time in the domain of definition T, the formula ϕ will holds.
  • furthermore, the distance between this next time and the current time belong to the interval I.
  • In particular, this next time holds, thus the current time is not the end of the word.

When this formula is evaluated over a signal γ, the notion of next time does not makes sense. Instead, "next" means "immediately after". More precisely γ,tϕ means:

  • I contains an interval of the form (0,ϵ) and
  • for each t(t,t+ϵ), γ,tϕ.

Other operators

We now consider operators which are not similar to any standard LTL operators.

Fall and Rise

We denote by ϕ (pronounced "rise ϕ"), a formula which holds when ϕ becomes true. More precisely, either ϕ did not hold in the immediate past, and holds at this time, or it does not hold and it holds in the immediate future. Formally ϕ is defined as (ϕ(¬ϕ𝒮))(¬ϕ(ϕ𝒰)).[5]

Over timed words, this formula always hold. Indeed ϕ𝒰 and ¬ϕ𝒮 always hold. Thus the formula is equivalent to ϕ¬ϕ, hence is true.

By symmetry, we denote by ϕ (pronounced "Fall ϕ), a formula which holds when ϕ becomes false. Thus, it is defined as (¬ϕ(ϕ𝒮))(ϕ(¬ϕ𝒰)).

History and Prophecy

We now introduce the prophecy operator, denoted by . We denote by Iϕ[6] the formula ¬ϕ𝒰Iϕ. This formula asserts that there exists a first moment in the future such that ϕ holds, and the time to wait for this first moment belongs to I.

We now consider this formula over timed words and over signals. We consider timed words first. Assume that I=a,b where and represents either open or closed bounds. Let γ a timed word and t in its domain of definition. Over timed words, the formula γ,tIϕ holds if and only if γ,t]0,b[I¬ϕIϕ also holds. That is, this formula simply assert that, in the future, until the interval t+I is met, ϕ should not hold. Furthermore, ϕ should hold sometime in the interval t+I. Indeed, given any time tt+I such that γ,tϕ hold, there exists only a finite number of time tt+I with t<t and γ,tϕ. Thus, there exists necessarily a smaller such t.

Let us now consider signal. The equivalence mentioned above does not hold anymore over signal. This is due to the fact that, using the variables introduced above, there may exists an infinite number of correct values for t, due to the fact that the domain of definition of a signal is continuous. Thus, the formula Iϕ also ensures that the first interval in which ϕ holds is closed on the left.

By temporal symmetry, we define the history operator, denoted by . We define Iϕ as ¬ϕ𝒮Iϕ. This formula asserts that there exists a last moment in the past such that ϕ held. And the time since this first moment belongs to I.

Non-strict operator

The semantic of operators until and since introduced do not consider the current time. That is, in order for ϕ1𝒰ϕ2 to holds at some time t, neither ϕ1 nor ϕ2 has to hold at time t. This is not always wanted, for example in the sentence "there is no bug until the system is turned-off", it may actually be wanted that there are no bug at current time. Thus, we introduce another until operator, called non-strict until, denoted by 𝒰, which consider the current time.

We denote by ϕ1𝒰Iϕ2 and ϕ1𝒮Iϕ2 either:

  • the formulas ϕ2(ϕ1(ϕ1𝒰Iϕ2)) and ϕ2(ϕ1(ϕ1𝒮Iϕ2)) if 0I, and
  • the formulas ϕ1(ϕ1𝒰Iϕ2) and ϕ1(ϕ1𝒮Iϕ2) otherwise.

For any of the operators 𝒪 introduced above, we denote 𝒪 the formula in which non-strict untils and sinces are used. For example p is an abbreviation for 𝒰p.

Strict operator can not be defined using non-strict operator. That is, there is no formula equivalent to Ip which uses only non-strict operator. This formula is defined as 𝒰Ip. This formula can never hold at a time t if it is required that holds at time t.

Example

We now give examples of MTL formulas. Some more example can be found on article of fragments of MITL, such as metric interval temporal logic.

  • (p{1}q) states that each letter p is followed exactly one time unit later by a letter q.
  • (p¬{1}p) states that no two successive occurrences of p can occur at exactly one time unit from each other.

Comparison with LTL

A standard (untimed) infinite word w=a0,a1,, is a function from to A. We can consider such a word using the set of time T=, and the function γ(i)=ai. In this case, for ϕ an arbitrary LTL formula, w,iϕ if and only if γ,iϕ, where ϕ is considered as a MTL formula with non-strict operator and [0,) subscript. In this sense, MTL is an extension of LTL.Template:Clarify

For this reason, a formula using only non-strict operator with [0,) subscript is called an LTL formula. This is because the Template:Explain

Algorithmic complexity

The satisfiability of ECL over signals is EXPSPACE-complete.[6]

Fragments of MTL

We now consider some fragments of MTL.

MITL

Template:Main An important subset of MTL is the Metric Interval Temporal Logic (MITL). This is defined similarly to MTL, with the restriction that the sets I, used in 𝒰 and 𝒮, are intervals which are not singletons, and whose bounds are natural numbers or infinity.

Some other subsets of MITL are defined in the article MITL.

Future Fragments

Future-MTL was already introduced above. Both over timed-words and over signals, it is less expressive than Full-MTLTemplate:R.

Event-Clock Temporal Logic

The fragment Event-Clock Temporal Logic[6] of MTL, denoted EventClockTL or ECL, allows only the following operators:

  • the boolean operators, and, or, not
  • the untimed until and since operators.
  • The timed prophecy and history operators.

Over signals, ECL is as expressive as MITL and as MITL0. The equivalence between the two last logics is explained in the article MITL0. We sketch the equivalence of those logics with ECL.

If I is not a singleton and ϕ is a MITL formula, Iϕ is defined as a MITL formula. If I={i} is a singleton, then Iϕ is equivalent to ]0,i[¬ϕ]0,i]ϕ which is a MITL-formula. Reciprocally, for ψ an ECL-formula, and I an interval whose lower bound is 0, Iψ is equivalent to the ECL-formula ¬I¬ψ.

The satisfiability of ECL over signals is PSPACE-complete.[6]

Positive normal form

A MTL-formula in positive normal form is defined almost as any MTL formula, with the two following change:

  • the operators Release and Back are introduced in the logical language and are not considered anymore to be notations for some other formulas.
  • negations can only be applied to letters.

Any MTL formula is equivalent to formula in normal form. This can be shown by an easy induction on formulas. For example, the formula ¬(ϕ𝒰Sψ) is equivalent to the formula (¬ϕ)S(¬ψ). Similarly, conjunctions and disjunctions can be considered using De Morgan's laws.

Strictly speaking, the set of formulas in positive normal form is not a fragment of MTL.

See also

References

Template:Reflist

  1. 1.0 1.1 J. Ouaknine and J. Worrell, "On the decidability of metric temporal logic," 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05), 2005, pp. 188-197.
  2. Ouaknine J., Worrell J. (2006) On Metric Temporal Logic and Faulty Turing Machines. In: Aceto L., Ingólfsdóttir A. (eds) Foundations of Software Science and Computation Structures. FoSSaCS 2006. Lecture Notes in Computer Science, vol 3921. Springer, Berlin, Heidelberg
  3. Template:Cite conference
  4. Template:Cite book
  5. Template:Cite thesis
  6. 6.0 6.1 6.2 6.3 Template:Cite book