Abstract 1 Introduction 2 Preliminaries 3 Metric LTL with First-Time Semantics 4 An Automata-Theoretic Decision Procedure 5 Conclusion References

Metric Linear-Time Temporal Logic with Strict First-Time Semantics

Eric Alsmann ORCID Theoretical Computer Science / Formal Methods, University of Kassel, Germany Martin Lange ORCID Theoretical Computer Science / Formal Methods, University of Kassel, Germany
Abstract

We introduce strict first-time semantics for the Until operator from linear-time temporal logic which makes assertions not just about some future moment but about the first time in the future that its argument should hold. We investigate Metric Linear-Time Temporal Logic under this interpretation in terms of expressive power, relative succinctness and computational complexity. While the expressiveness does not exceed that of pure LTL, there are properties definable in this logic which can only be expressed in LTL with exponentially larger formulas. Yet, we show that the complexity of the satisfiability problem remains PSPACE-complete which is in contrast to the EXPSPACE-completeness of Metric LTL. The motivation for this logic originates in a study of the expressive power of State Space Models, a recently proposed alternative to the popular transformer architectures in machine learning.

Keywords and phrases:
linear-time temporal logic, metric temporal logic, computational complexity, Streett automata
Copyright and License:
[Uncaptioned image] © Eric Alsmann and Martin Lange; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Modal and temporal logics
; Theory of computation Automata over infinite objects
Editors:
Thierry Vidal and Przemysław Andrzej Wałęga

1 Introduction

The linear-time temporal logic LTL is a well-known formalism for specifying properties of runs of reactive systems [14]. Its model-theoretic and computational properties are well researched and understood, for instance its satisfiability problem being PSpace-complete [17] and its expressiveness coinciding with that of First-Order Logic [6], resp. star-free regular expressions over ω-words or over finite words [7].

The relative weakness in expressive power has led to the study of several extensions of LTL, some of which genuinely extend its expressiveness, typically to that of full (ω-)regularity, for instance the Linear-Time μ-Calculus [3, 19], the industry standard PSL [5], Quantified LTL [16], etc. Others extend LTL only pragmatically by providing further constructs without extending the expressive power altogether, but providing means to express certain properties more easily.

One such variant is the Metric Linear-Time Temporal Logic MTL [1]. The term “metric temporal logic” does not uniquely identify one particular formalism, not even within the linear-time framework. It describes temporal logics in which the temporal operators are extended so that they do not simply make assertions about the future (or past) moments in a linear sequence of events, but additionally constrain their distance to the current moment. For example p𝚄[3,5]q does not only demand that q holds at some point in the future with p being continuously true up to that point, but this future point also has to occur within three to five time units from now on. The exact semantics then depends on the underlying models etc. Metric temporal logic has been developed for reasoning about real-time systems [9], but it can also be used for systems evolving in discrete steps. Here we use MTL only as a logic over discrete time, resp. (untimed) ω-words. Consequently, the intervals adorning the metric operators are always interpreted over the natural numbers.

It is not hard to see that MTL does not exceed LTL in expressiveness: temporal operators with metric constraints can easily be unravelled. The property above can be expressed as “p holds now and in the next two steps; afterwards we have q or p followed by q or p followed by another p, followed by q” using only the next-time operator (in this case). A general translation from MTL to LTL is an easy exercise, and it incurs a blow-up that is polynomial in the value of the involved interval bounds. Hence, when such bounds are encoded unarily, MTL satisfiability is also PSpace-complete. The more reasonable assumption of binary encodings then yields an exponential translation into LTL and therefore an ExpSpace upper bound on its satisfiability problem. This is tight, satisfiability for MTL with binarily encoded interval bounds is in fact ExpSpace-complete [10].

The lower bound uses a standard reduction from the word problem for exponentially space bounded Turing Machines (TM). The key to the proof is then MTL’s ability to express “something holds after 2n steps” which, using binary encodings, can be done with a formula of size polynomial in n. This is used to express, for instance, that a symbol b is seen at that distance, i.e. at the same cell on the tape in the next configuration, formalising a potential writing operation of the TM. Clearly, the tape may contain more occurrences of that symbol, so the one seen at distance 2n is usually not the first one to be seen in the future.

This paper is motivated by the study of the expressive power of a recent machine learning model, so-called State-Space Models (SSM) [13]. They have been proposed as an alternative to the well-known transformer architectures underlying prominent Large Language Model tools, promising more efficient evaluation of long input strings. Here we do not go further into the details of SSMs; they merely serve as a motivation for studying a particular variant of MTL which is geared towards the expressive capabilities of SSMs. To motivate this variant, we recall the well-known unfolding principles for temporal operators.

Example 1.

Suppose that, in the context of some decision procedure, we were to establish the truth of the LTL formula 𝙶(p𝚄q) at position i of some ω-sequence of events. By unfolding the 𝙶-operator, this typically amounts to establishing truth of both (i) p𝚄q and (ii) 𝚇𝙶(p𝚄q) at moment i. To solve (i) we can either prove q or defer it to a later point by unfolding the Until-formula and proving p as well as (iii) 𝚇(p𝚄q) at moment i. Now, (ii) and (iii) both start with a Next-operator, so they imply proving 𝙶(p𝚄q) and (iii’) p𝚄q at moment i+1. The former can be handled as done at moment i; in particular it means proving p𝚄q at moment i+1 which is already the task identified as (iii’). In a sense, there are two reasons for the need to prove p𝚄q at moment i+1, and they just collapse to a single task.

Now suppose that the original formula was one of MTL, namely 𝙶(p𝚄[3,5]q). Here the reasoning can be done in the same way, but when unfolding the metric Until we obtain an index shift: p𝚄[3,5]q is established at moment i when 𝚇(p𝚄[2,4]q) is established there. Hence, when carrying out this kind of reasoning we obtain two tasks regarding moment i+1 that do not collapse into one, namely to prove p𝚄[2,4]q as well as p𝚄[3,5]q there.

This can also be seen as an indication for MTL’s higher complexity: truth of a formula at moment i does not just depend on the truth of its subformulas at moments i and i+1, but also on variants of the subformulas obtained through index shifts.

The mechanisms in SSMs naturally suggest a comparison of their expressiveness with formulas of metric linear-time temporal logic (on finite words), since SSMs can easily track the distance between occurrences of events in a word, they seem to be unable to cope with the blow-up in formulas that need to be tracked through unfolding.

In this paper we initiate the study of a variant of MTL– called Metric Temporal Logic with Strict First-Time Semantics here, MTL1– which is defined because of a certain similarity to the mechanics in SSMs. It features the Metric Until operator φ𝚄[x,y]1ψ which does not just demand that some future moment at distance between x and y satisfies ψ, but this also has to be the first time (from the current moment on) that ψ is satisfied. Note that this remedies the problem with a potential blow-up indicated by the example above: while (p𝚄[2,4]q)(p𝚄[3,5]q) cannot be simplified into a formula using only a single metric Until operator, (p𝚄[2,4]1q)(p𝚄[3,5]1q) is indeed equivalent to p𝚄[3,4]1q, suggesting that the strict first-time semantics makes formulas easier to handle computationally. It is also not hard to see that the proof of ExpSpace-hardness for MTL breaks down under the strict first-time semantics, as suggested above. So apart from the obvious question about MTL1’s expressiveness in relationship to the other variants of LTL, its complexity somewhere between PSpace and ExpSpace is to be pinpointed as well. An ExpSpace upper bound is obtained easily because of a simple linear translation into MTL, based on principles like φ𝚄[x,y]1ψ(φ¬ψ)𝚄[x,y]ψ.

This paper is organised as follows. In Section 2 we formally recall known concepts needed for this study, in particular LTL and its extension MTL. We also recall the definition of Streett automata [18] which will serve as a main tool in a decision procedure for MTL1 which is formally introduced in Section 3. There, we also investigate its expressiveness and succinctness relative to LTL. In Section 4 we construct a singly exponential translation from MTL1 into Streett automata thus pinpointing the former’s complexity as being PSpace-complete only. In Section 5 we conclude with remarks on further work in this area.

2 Preliminaries

We recall the necessary definitions from temporal logics and automata theory.

Linear-time temporal logic.

Let 𝒫={p,q,} be a non-empty, countable set of atomic propositions. Formulas of the linear-time temporal logic LTL are given by the following grammar.

φ::=qφφ¬φ𝚇φφ𝚄φ

where q𝒫. Further Boolean operators like 𝗍𝗍,𝖿𝖿,,, are introduced as abbreviations in the usual way, and so are the temporal operators 𝙵φ:=𝗍𝗍𝚄φ, 𝙶φ:=¬𝙵¬φ, φ𝚁ψ:=¬(¬φ𝚄¬ψ).

The set 𝑆𝑢𝑏(φ) of subformulas of φ is defined in the usual way. The size of a formula φ is measured in terms of the number of its subformulas: |φ|:=|𝑆𝑢𝑏(φ)|. For our purposes here, it makes no difference whether formulas with abbreviated operators are written out in the original syntax or the abbreviated operators are seen as first-class citizens. The size in the former case is only larger by a constant factor compared to the latter case.

Formulas of LTL are interpreted over traces of labelled transition systems which are just ω-words over the alphabet 2𝒫. Note that any formula can contain only finitely many propositional symbols. Hence, the alphabet underlying any given formula can always be assumed to be finite. Let w=a0a1(2𝒫)ω and i. Satisfaction of an LTL formula φ in w at position i is explained inductively as follows.

w,iq iff qai
w,iφψ iff w,iφ and w,iψ
w,i¬φ iff w,i⊧̸φ
w,i𝚇φ iff w,i+1φ
w,iφ𝚄ψ iff there is ji s.t. w,jψ and w,hφ for all h with ih<j

A word w satisfies a formula φ, written wφ, if φ is satisfied in its initial position, i.e. w,0φ. The language of a formula φ is the set of all words satisfying it: L(φ):={wwφ}. Two formulas are equivalent, written φψ, when their languages coincide, i.e. L(φ)=L(ψ). Note that this is the case if and only if they are satisfied by exactly the same positions in the same words, i.e. w,iφ iff w,iψ. The “if”-direction is trivial because two formulas that are satisfied by the same words at arbitrary positions are clearly satisfied by the same words at initial positions. The “only if”-direction holds because LTL has future-only operators, so we have a0a1,iφ iff aiai+1,0χ for any φ. Thus, any position in a word is the initial position of another word, namely the suffix starting at this position.

A formula is valid, written φ, if L(φ)=(2𝒫)ω, i.e. it is satisfied by any word. The satisfiability problem – given a formula φ, decide whether L(φ) – is well-known to be decidable. We write SAT() for the satisfiability problem for logic . We assume familiarity with standard complexity classes, in particular the space complexity classes NLogSpace, PSpace and ExpSpace. For further details we refer to standard textbooks in complexity theory, e.g. [2].

Proposition 2 ([17]).

SAT(LTL) is PSpace-complete.

Metric linear-time temporal logic.

The term “metric” temporal logic usually refers to extensions of ordinary temporal logics (like LTL) with modifications of the temporal operators that impose restrictions on the moments that witness their satisfaction in case of an Until or a Finally, resp. relax the future moments under consideration of a Generally, resp. Release formula. The logic MTL is obtained by extending the syntax of LTL with a metric version of Until, written φ𝚄Iψ for a non-empty interval I over the natural numbers.

We use standard notation for closed, half-open and open intervals like [x,y],(x,y],[x,y) and (x,y) for x,y{} with xy. Because of the discrete nature of and the lack of a direct predecessor of in this structure, we can restrict our attention to intervals of the form [x,y] for x,y, and of the form [x,) for x. Note that (x,y]=[x+1,y] etc.

Intervals of the form [0,y] or [x,) for some x,y are called simple and written more compactly as y, resp. x.

The semantics of formulas of MTL is extended accordingly for words w=a0a1(2𝒫)ω and i by

w,iφ𝚄Iψiff there is ji s.t. jiI and w,jψ and
w,hφ for all h with ih<j

Hence, φ𝚄Iψ note only requires a position i in w to satisfy φ𝚄ψ in the usual sense that some future moment satisfies ψ and all future moments before that satisfy φ. It additionally requires that future moment to be found at a distance which falls into the interval I.

This clearly extends the non-metric version of LTL because φ𝚄ψφ𝚄0ψ. The metric extension is then applied to the other derived temporal operators 𝙵,𝙶 and 𝚁 accordingly.

Because of the use of natural numbers as interval bounds in temporal operators, number of subformulas is not a realistic measure of the representation size of a formula anymore. Note that 𝙵[x,y]p, stating that p occurs in a word at some distance between x and y would have constant size regardless of the values of x and y. We assume that such interval bounds are given in binary encoding and therefore measure the size of a formula more appropriately as follows. Let m(φ):=

max{kψ1,ψ2𝑆𝑢𝑏(φ),h s.t. ψ1𝚄Iψ2𝑆𝑢𝑏(φ) for I=[h,k] or I=[k,)}

denote the largest integer constant that is used as an interval bound in a subformula of φ. Then |φ|:=|𝑆𝑢𝑏(φ)|logm(φ).

Proposition 3 ([10]).

SAT(MTL) is ExpSpace-complete.

Finite automata on ω-words.

Let 𝒫 be a finite set of atomic propositions. A nondeterministic Streett automaton (NSA) is an 𝒜=(Q,𝒫,qI,δ,) where Q is a finite set of states, qIQ is the designated initial state, δQ×𝔹(𝒫)×Q is a finite set of transition triples (p,β,q) with 𝔹(𝒫) denoting the set of Boolean formulas over 𝒫 (with the usual Boolean operators , , ¬, …). Finally, ={(F1,G1),,(Fm,Gm)} with Fi,GiQ for all i=1,,m is the acceptance condition.

Note that here such finite automata have a symbolically represented transition table instead of the general δQ×Σ×Q for a finite alphabet Σ. The reason for this choice is their use in a decision procedure for a temporal logic whose formulas are naturally interpreted over ω-words whose letters are finite sets of propositions, i.e. Σ=2𝒫. Instead of enumerating all such possible sets and explaining the automaton’s one-step behaviour for each step, the symbolic representation here is more convenient for such special cases. There are straightforward translations for the transition relations between symbolic and explicit representations, and for a fixed set of propositions, they are polynomial. Hence, we can safely use Streett automata in this form and still appeal to known results about them, even though they were perhaps formulated for the form with an explicit alphabet.

A run of the NSA 𝒜=(Q,𝒫,qI,δ,) with ={(F1,G1),,(Fm,Gm)} on a word w=a0a1(2𝒫)ω is a ρ=q0,q1,Qω such that q0=qI and for all i there is some (p,β,q)δ such that qi=p, aiβ and q=qi+1. Here, satisfaction of a Boolean formula β over 𝒫 by a set a𝒫, aβ, is explained in the usual way: β evaluates to true when all qa are set to true and all qa are set to false.

We write 𝐼𝑛𝑓(ρ) to denote the set of all states that occur infinitely often in ρ. By finiteness of Q, we always have 𝐼𝑛𝑓(ρ).

The run ρ is accepting if it satisfies the Streett condition in the sense that for all i=1,,m: if 𝐼𝑛𝑓(ρ)Fi then 𝐼𝑛𝑓(ρ)Gi. As usual, L(𝒜) is the language of the NSA 𝒜, and it consists of all words on which 𝒜 has an accepting run.

So both NSA and formulas of linear-time temporal logics defines languages of ω-words which is why these different formalisms can be compared to one another in terms of expressiveness, and satisfiability of a formula corresponds to non-emptiness of the language of an automaton. Algorithms for non-emptiness problems for ω-automata are routinely used to obtain decision procedures for linear-time temporal logics [21, 20, 4]. It has been shown that non-emptiness for Streett automata can be decided in polynomial time [8, 12] and this requires an explicit construction. A polynomial (equivalence-preserving) translation into Büchi automata is not possible, let alone one computable in logarithmic space. This would immediately transfer the upper bound of NLogSpace to Streett automata. Nevertheless, it does hold, too; it simply needs to be shown directly.

Theorem 4.

The non-emptiness problem for NSA is decidable in NLogSpace.

Proof.

The key observation is the following. The language of an NSA 𝒜=(Q,𝒫,qI,δ,) with n:=|Q| and ={(F1,G1),,(Fk,Gk)} is non-empty iff there is an ultimately periodic word w=uvωL(𝒜). This follows from finiteness of n and k by the pigeon hole principle. An accepting run on an arbitrary word must eventually traverse a state q for the second time such that in between, for every i=1,,k, either no state from Fi or some state from Gi has been seen.

This gives rise to a nondeterministic algorithm for deciding non-emptiness. It guesses, step-by-step, the states of a run and also nondeterministically remembers some state q occurring in this simulation. It then maintains 2k bits to remember, for each i=1,,k, whether some state in Fi and some state in Gi has been seen. It accepts, when q occurs again, and the bits indicate that the Streett condition has been met in between.

In order to terminate and reject on computation paths with unsuccessful guesses, it counts the number of steps done in this simulation. It is not hard to see that the first occurrence of q can be required to occur after at most n steps. The second occurrence can be expected to occur after no more than a further 2nk steps, for otherwise the run contains parts that could be skipped. Hence, the space needed for the counter is at most logarithmic in |𝒜|.

3 Metric LTL with First-Time Semantics

Syntax and Semantics.

We introduce Metric Linear-Time Temporal Logic with Strict First-Time Semantics (MTL1) which, instead of metric Until formulas of the form φ𝚄Iψ, features a special modification φ𝚄I1ψ that is interpreted under strict first-time semantics. Intuitively, it does not just demand that some occurrence of ψ in the future happens at a distance that falls into the interval I. Instead, it requires this to be the first time in the future that this happens.

Definition 5.

Let 𝒫={p,q,} be a non-empty, countable set of atomic propositions as usual. Formulas of the linear-time temporal logic MTL1 are built according to the following grammar.

φ::=qφφ¬φ𝚇φφ𝚄I1φ

where q𝒫 and I is an interval over as discussed above.

We also introduce its fragment sMTL1Simple MTL1– which only features simple intervals k or k in its formulas. Other Boolean and temporal operators, in particular the strict first-time variants 𝙵I1, 𝙶I1 and 𝚁I1 are introduced as abbreviations in the usual way. The set 𝑆𝑢𝑏(φ) of subformulas of an MTL1 formula φ is defined as usual by induction over the syntax tree of the formula.

The intuition behind the restriction to first-time occurrences is made formal as follows.

Definition 6.

Let 𝒫 be given as above and w=a0a1(2𝒫)ω. Satisfaction of an MTL1 formula φ at a position i of the word w is explained inductively over the structure of φ as for LTL, apart from the following case.

w,iφ𝚄I1ψiff there is ji s.t. jiI, and w,jψ and
w,hφ¬ψ for all h s.t. ih<j

Expressiveness.

LTL trivially embeds into sMTL1 which trivially embeds into MTL1. The reason for this is the fact whenever an Until-formula gets satisfied somewhere then there is also a first time that this happens. A more interesting question concerns the other direction, and therefore also the connection to MTL. Since LTL can trivially be embedded into MTL, we immediately obtain a translation from MTL1 into MTL, from one from MTL1 into LTL.

We remark that the translations introduced in the following are not polynomial for formula length, measure in terms of length of string representations, but only for formula size, measured in terms of number of subformulas, as they often require the duplication of subformulas.

The first observation about expressiveness is the expressive equivalence between MTL1 and sMTL1. This is perhaps a little bit surprising as this principle does not apply to MTL.

Theorem 7.

For every φMTL1 there is a φ^sMTL1 of size 𝒪(|φ|) such that φ^φ.

Proof.

We can define φ^ inductively. The only non-trivial case is that of an Until formula. Then we have

φ𝚄[x,y]1ψ^:=(φ^𝚄x1ψ^)(φ^𝚄y1ψ^)

for x,y. Clearly, this increases the number of subformulas at most by factor 3. Correctness of this translation is straightforward by inspection of the semantics.

Because of Thm. 7 we can restrict our attention to sMTL1 formulas down below as this simplifies the technical details of various constructions slightly.

One reason for considering numerical values in formulas to be represented in binary (as opposed to unary), apart from this being natural, is the fact that the expressive power of sMTL1– and that of MTL in fact – does not exceed that of LTL. However, translations back into LTL are polynomial in the value of interval bounds only, i.e. they are in fact exponential in the size of a formula.

Theorem 8.

For every sMTL1 formula φ there is an LTL formula φ^ such that φ^φ and |φ^|=2𝒪(|φ|).

Proof.

We define a translation ^:sMTL1LTL as follows.
q^ :=q φψ^ :=φ^ψ^ ¬φ^ :=¬φ^ 𝚇φ^ :=𝚇φ^ φ𝚄k1ψ^ :=ψ^(φ^𝚇(ψ^𝚇(ψ^(φ^𝚇ψ^k occurrences of 𝚇)))) φ𝚄k1ψ^ :=φ^¬ψ^𝚇(φ^¬ψ^𝚇(𝚇(φ^¬ψ^𝚇(φ𝚄ψ))k occurrences of 𝚇))
The translation of an operator 𝚄k1 clearly produces a formula whose size is linear in the value k, i.e. exponential in the representation size of k. Replacing the abbreviated biased disjunctions by plain Boolean formulas only incurs a further polynomial blow-up because formula size is measured in terms of number of subformulas.

Correctness of the translation is proved by a straightforward induction on the structure of φ, showing that for all w(2𝒫)ω and all i, we have w,iφ^ iff w,iφ.

Succinctness.

The exponential blow-up predicted by Thm. 8 may seem like a downside at first sight. However, it should be read as the possibility that certain properties, which are definable in LTL, can be defined in sMTL1 with much shorter formulas. The same phenomenon is of course known from LTL. It is easy to show that every family of LTL formulas equivalent to the MTL formulas φn:=𝙵2nq require size 𝒪(2n). The proof can be re-used entirely to show that sMTL1 is also exponentially more succinct than LTL. Note that |𝙵2n1q|=𝒪(n).

Theorem 9.

There is a family of LTL-definable languages (Ln)n1 over a singleton 𝒫 such that each Ln is expressible in sMTL1 by a formula of size 𝒪(n) but every family (φn)n1 of LTL formulas with L(φn)=Ln is such that |φn|=Ω(2n).

Proof.

Consider the sMTL1 formulas φn:=𝙵2n1q for n1. Clearly, |φn|=𝒪(n). By a standard induction on the structure of LTL formulas we can show that formulas of size <2n cannot distinguish between the two words wn=2n1{q}ω and wn=2n{q}ω. Since wnφn but wn⊧̸φn for all n1, we get that any presumed LTL-formula equivalent to φn needs to have size 2n at least.

4 An Automata-Theoretic Decision Procedure

We give an automata-theoretic decision procedure for MTL1. Decidability of its satisfiability problem is not a surprise in the light of Thm. 8, stating that sMTL1– and therefore also MTL1 according to Thm. 7 – can be translated into LTL at an exponential blow-up. This is unavoidable according to Thm. 9. Then it is perhaps rather surprising that the complexity of MTL1 is asymptotically no worse than that of LTL. We give an upper bound of PSpace, based on a translation into Streett automata. According to Thm. 8, it suffices to do so for sMTL1.

Temporal formulas and their unfoldings.

For convenience, we work with sMTL1 formulas in negation normal form (NNF), i.e. those that are built from literals q,¬q using the Boolean operators , and the temporal operators 𝚇,𝚄1 and 𝚁1 where φ𝚁k1ψ:=¬(¬φ𝚄k1¬ψ). The following is a standard observation about the ability to push negations inwards in formulas to obtain NNF.

Lemma 10.

For every sMTL1 formula φ there is an sMTL1 formula φ¯ in NNF of size 𝒪(|φ|) such that φ¯φ.

The construction of a Streett automaton recognising L(φ) for some sMTL1 formula φ in NNF then follows the same principles as the standard construction of a Büchi automaton for an LTL formula. Temporal operators are typically handled by unfolding, not just in automata-theoretic decision procedures. The term denotes the two equivalences

φ𝚄ψψ(φ𝚇(φ𝚄ψ))andφ𝚁ψψ(φ𝚇(φ𝚁ψ)).

These can be extended to the temporal operators in sMTL1 as follows. The proof is just by close inspection of the semantics of MTL1.

Lemma 11.

Let φ,ψsMTL1, k0. We have

φ𝚄01ψ ψ φ𝚁01ψ ψ
φ𝚄01ψ ψ(φ𝚇(φ𝚄01ψ)) φ𝚁01ψ ψ(φ𝚇(φ𝚁01ψ))
φ𝚄k+11ψ ψ(φ𝚇(φ𝚄k1ψ)) φ𝚁k+11ψ ψ(φ𝚇(φ𝚁k1ψ))
φ𝚄k+11ψ ¬ψφ𝚇(φ𝚄k1ψ) φ𝚁k+11ψ ¬ψφ𝚇(φ𝚁k1ψ)

A formula χ of the form on one of the left-hand sides in these equations is called a temporal formula and we use 𝑢𝑛𝑓(χ) to denote the corresponding right-hand side. Temporal formulas of the form φ𝚄k1ψ, i.e. Until-formulas whose metric parameter is a half-open interval to the right, are called critical.

Later on we will need a second observation about temporal formulas. The proof is straightforward from an inspection of the semantics of MTL1. The lemma already holds for MTL in fact.

Lemma 12.

Let φ,ψ be sMTL1 formulas and k, such that k. Then we have

(φ𝚄k1ψ)(φ𝚄1ψ) (φ𝚁1ψ)(φ𝚁k1ψ)
(φ𝚁k1ψ)(φ𝚁1ψ) (φ𝚄1ψ)(φ𝚄k1ψ)

The Fischer-Ladner closure of a formula χ is a collection of all subformulas and perhaps others derived from them that may play a role in determining the truth of χ at some point in a word.

Definition 13.

Let χsMTL1 be in NNF. Its Fischer-Ladner closure is the least set 𝐹𝐿(χ) that contains χ and is closed under the following operations.

  • If φψ𝐹𝐿(χ) or φψ𝐹𝐿(χ) then {φ,ψ}𝐹𝐿(φ).

  • If 𝚇φ𝐹𝐿(χ) then φ𝐹𝐿(χ).

  • If φ𝐹𝐿(χ) for a temporal φ, then 𝑢𝑛𝑓(φ)𝐹𝐿(χ).

The key concept in an automata construction for sMTL1 formulas is that of a Hintikka set – a set of formulas that is closed under propositional logic consequence. We need to refine the standard definition slightly in order to obtain the intended complexity bound in the end.

Definition 14.

Let χsMTL1 be in NNF. A Φ𝐹𝐿(χ) is called a Hintikka set for χ if it satisfies the following conditions.

  • If φψΦ then {φ,ψ}Φ.

  • If φψΦ then {φ,ψ}Φ.

  • If φΦ for a temporal φ then 𝑢𝑛𝑓(φ)Φ.

Φ is called (propositionally) consistent if there is no q𝒫 such that {q,¬q}Φ. It is called lean if for all φ,ψ there is at most one temporal formula φ𝚄k1ψΦ for any k0, and likewise for temporal formulas of the three other forms with operators 𝚄k1, 𝚁k1 and 𝚁k1. We write (χ), resp. 𝗅𝗇(χ) for the set of all lean, propositionally consistent Hintikka sets for χ, resp. those that are additionally lean.

While the Fischer-Ladner closure of an sMTL1 formula χ is generally exponential in |χ| and there are, thus, doubly exponentially many Hintikka sets, there are only singly exponentially many lean Hintikka sets.

Lemma 15.

Let χsMTL1 be in NNF. Then |𝗅𝗇(χ)|=2𝒪(|χ|2).

Proof.

Note that there are at most 𝒪(|χ|) many formula schemes, i.e. members of 𝐹𝐿(χ) modulo concrete metric parameters. A lean set can then be seen as a mapping for each such formula scheme to a value in {,0,,m(χ)}, indicating (non-)inclusion in the set and giving a concrete parameter value for a temporal formula. Since m(χ)2𝒪(|χ|) due to binary encoding, there are at most (2𝒪(|χ|))𝒪(|χ|)=2𝒪(|χ|2) many lean (Hintikka) sets.

Streett automata for sMTL1 formulas.

We are now in a position to define a Streett automaton of singly exponential size that recognises exactly the models of an sMTL1 formula in NNF.

Fix an sMTL1 formula χ in NNF over some finite 𝒫. We will need three constructions on (lean) Hintikka sets for χ. The first one collects all literals in a lean Hintikka set.

𝑁𝑜𝑤(Φ):=qΦq¬qΦ¬q

It can be seen as the extraction of a propositional formula determining the letter at a position in a word where all formulas in Φ are supposed to be true. On the other hand,

𝑁𝑥𝑡𝑠(Φ):={𝑙𝑛(Ψ)Ψ(χ) and 𝚇ψΦ:ψΨ}

collects all “leanifications” of Hintikka sets that are potential successors to Φ in the sense that they contain all formula ψ which Φ needs to be true at the next position. The leanification 𝑙𝑛(Ψ) of Ψ is obtained by successively replacing temporal formulas as follows until no further steps are applicable.

  • If {φ𝚄k1ψ,φ𝚄1ψ}Ψ or {φ𝚁k1ψ,φ𝚁1ψ}Ψ for some φ,ψ and k< then replace all occurrences of the latter that do not occur under the scope of a 𝚇-operator by the former.

  • If {φ𝚄k1ψ,φ𝚄1ψ}Ψ or {φ𝚁k1ψ,φ𝚁1ψ}Ψ for some φ,ψ and k< then replace all occurrences of the former that do not occur under the scope of a 𝚇-operator by the latter.

It should be clear that 𝑁𝑥𝑡𝑠(Φ) is indeed a set of lean Hintikka sets for χ.

The important observation about the leanification process is the preservation of the semantics in a strong sense.

Lemma 16.

Let χsMTL1 be in NNF and Φ(χ). For every φΦ there is φ𝑙𝑛(Φ) such that φ differs from φ only in the values of metric parameters and φφ.

Proof.

This is proved in a straight-forward induction on the structure of φ. The only non-trivial cases are those of temporal formulas. These are covered by Lemma 12. Since leanification also replaces subformulas, we also need the fact that χ (and all its subformulas) are given in NNF. Hence, if φφ then also ψψ[φ/φ] for any ψ, i.e. all formulas are monotonic.

The acceptance condition of the NSA 𝒜χ is determined by the set of all critical temporal formulas that can occur in lean Hintikka sets for χ. However, unfolding decreases interval bounds by one, so the number of critical temporal formulas in 𝐹𝐿(χ) is exponential: if χ contains the subformula φ𝚄k1ψ for some k, then 𝐹𝐿(χ) contains φ𝚄h1ψ for all hk, i.e. exponentially many in |χ| because of binary encodings of interval bounds.

The exact interval bounds are irrelevant for the acceptance condition. It is only used to ensure that no critical temporal formula φ𝚄k1ψ gets unfolded forever without ever satisfying its right argument ψ. We introduce the notion of a critical formula scheme φ𝚄1ψ and write (φ𝚄1ψ)Φ if there is some k such that (φ𝚄k1ψ)Φ.

Note that there is no need to treat the other three kinds of temporal formulas in the same way. A temporal Release-formula is a greatest fixpoint, and unfolding it infinitely often is a legitimate way of determining its truth. A non-critical, temporal Until-formula of the form φ𝚄k1ψ cannot get unfolded infinitely often because each unfolding step decreases the metric parameter in it until it eventually becomes 0, and the formula is replaced by ψ anyway. Note that this is not the case for critical Until-formulas. Unfolding them still decreases the metric parameter. However, the leanification process can increase it again, whereas leanification for non-critical Until-formulas can only decrease it further.

Let {γ1,,γn} be the set of all schemes of critical temporal Until-formulas in 𝐹𝐿(χ), i.e. γi=αi𝚄1βi for some αi,βi. We define the NSA 𝒜χ as (𝗅𝗇(χ),𝒫,I,δ,) where

  • I:={Φ𝗅𝗇(χ)χΦ},

  • δ:={(Φ,𝑁𝑜𝑤(Φ),Ψ)Ψ𝑁𝑥𝑡𝑠(Φ)},

  • :={(F1,G1),,(Fn,Gn)} with Fi:={ΦγiΦ} and Gi:={ΦβiΦ}. Note that βi may contain other temporal formulas, so βi is to be understood as a scheme potentially, and βiΦ means that some formula deviating from βi in metric parameters only is contained in Φ.

The next two lemmas are devoted to the soundness and completeness of the construction.

Lemma 17.

Let χsMTL1 over 𝒫 be in NNF and 𝒜χ as above. Then L(𝒜χ)L(χ).

Proof.

Let w=a0a1(2𝒫)ω be such that there is an accepting run ρ=Φ0,Φ1, of 𝒜χ on w. By the construction of 𝒜χ we have (i) χΦ0 and, for all i0, (ii) ai𝑁𝑜𝑤(Φi) and (iii) there is Ψi+1(χ) such that ψΨi+1 for all 𝚇ψΦi and Φi+1=𝑙𝑛(Ψi+1)𝑁𝑥𝑡𝑠(Φi).

We show by induction on the structure of formulas φ that for all i and all φΦi we have w,iφ. For literals q or ¬q this follows immediately from (ii). For conjunctions and disjunctions this follows by the hypothesis for both conjuncts, resp. one disjunct and the fact that each Φi is a lean Hintikka set that behaves like a Hintikka set in this case, i.e. it contains both conjuncts of a conjunction etc. This is the case because leanification replaces either none or all occurrences that are not under the scope of a 𝚇-operator. Hence, a replacement takes place in a conjunction iff it takes place in both conjuncts etc.

Suppose φ is of the form 𝚇ψ. Because of (iii), there is a Ψi+1(χ) with ψΨi+1 with Φi+1=𝑙𝑛(Ψi+1). According to Lemma 16, there is ψΦi+1 that is structurally not greater than ψ. Hence, we can apply the induction hypothesis to it and obtain w,i+1ψ. According to Lemma 16, we then also have w,i+1ψ and therefore w,iφ.

Suppose φ is of the form ψ1𝚄k1ψ2. By inspection of the unfolding rule (Lemma 11) and successive applications of the principles (ii) and (iii) with the same kind of reasoning using Lemma 16, we get some kk and a sequence Ψi+1,,Ψi+k of Hintikka sets such that Φi+j=𝑙𝑛(Ψi+j), ψΨi+k for some ψ with ψ2ψ2 and ψh′′Φi+h for some ψ0′′,,ψk1′′ such that ψh′′ψ1. Applying the induction hypothesis to ψ2 at position i+k and for ψ0′′,,ψk1′′ at positions i,,i+k1 shows that these are satisfied at the respective positions in w. Lemma 16 then yields w,i+kψ2 and w,i+hψ1 for all h=0,,k1. Thus, w,iφ.

Suppose φ is of the form ψ1𝚄k1ψ2. Note that it is a critical temporal formula in this case. We can apply the same reasoning as in the previous case using Lemmas 11 and 16. However, here the leanification process may replace metric parameters by larger ones. Hence, this alone does not guarantee the existence of a kk such that ψ2Φi+k. This is where 𝒜χ’s acceptance condition comes into place. Since ρ is accepting, it must either contain finitely many lean Hintikka sets containing φ or infinitely many containing ψ2. The latter case immediately implies the existence of such a kk. The former case does so, too, by inspection of Lemma 11 and the construction of Hintikka sets. It is only possible to have (the scheme) φ finitely often only when some Φi+k contains ψ1𝚄k1ψ2 and therefore also ψ2. The rest of this case is handled as the previous one.

The remaining two cases of temporal Release-formulas are also handled in a way that is analogous to those of the Until-formulas.

At last, (i) says that χΦ0. By the reasoning above we then have w,0χ, i.e. wL(χ) which completes the claim.

Lemma 18.

Let χsMTL1 over 𝒫 be in NNF and 𝒜χ as above. Then L(χ)L(𝒜χ).

Proof.

Suppose w=a0a1L(χ). We need to construct an accepting run Φ0,Φ1, of 𝒜χ on w. To this end, we construct a sequence Φ0,Φ1, via Φi:={φ𝐹𝐿(χ)w,iφ}. It is not hard to see that each Φi is indeed a propositionally consistent Hintikka set. Moreover, if 𝚇φΦi then φΦi+1. This therefore determines a sequence of lean Hintikka sets by leanification: Φi:=𝑙𝑛(Φi) for all i0, forming a run ρ=Φ0,Φ1,.

It remains to be seen that it is indeed an accepting run. Take some critical Until-formula scheme γ=α𝚄1β and suppose that ρ contains an infinite subsequence Φi1,Φi2, with γj:=(α𝚄kj1β)Φij for all j1. By construction, we have w,ijγj. By the semantics of MTL1 there are k1,k2, with kjkj such that w,ij+kjβ and, again, by construction βΦij+kj. Since i1<i2<, the set {ij+kjj1} is infinite. Hence, the sequence Φ0,Φ1, has an infinite subsequence in which every Hintikka set contains β. Then the run ρ has an infinite subsequence in which every lean Hintikka set either contains β itself or an instantiation of the scheme β. In any case, the run ρ satisfies the Streett pair associated with γ. Since this is the case for any critical γ, ρ is indeed accepting and so we have wL(𝒜χ).

Putting all of the above together we obtain that MTL1 is not just decidable but that its satisfiability problem is no worse than that of ordinary LTL (and therefore exponentially easier than that of MTL), even though there is an exponential succinctness gap between MTL1 and LTL.

Theorem 19.

SAT(MTL1) is PSpace-complete.

Proof.

The lower bound is straightforwardly inherited from LTL. For the upper bound, note that every MTL1 formula χ can be translated into an equivalent sMTL1 formula in NNF at a linear blow-up only (Thm. 7 and Lemma 10). This can in turn be translated into an equivalent NSA (Lemmas 17 and 18) of exponential size in |χ| (Lemma 15). Language equivalence entails particularly that its language is non-empty iff χ is satisfiable. Non-emptiness for NSA can be decided in NLogSpace (Thm. 4) which is NPSpace measured in the size of χ. Savitch’s Theorem [15] then gives a PSpace upper bound.

5 Conclusion

We have investigated the expressiveness and computational complexity of MTL1, a variant of Metric Linear-Time Temporal logic MTL in wich the metric parameters do not constrain the occurrence of some event but their first occurrence (in an Until formula). The resulting logic is still exponentially more succinct than LTL. Unlike full MTL whose satisfiability problem is ExpSpace-complete, we obtained a PSpace upper bound for MTL1 by the construction of equivalent Streett automata of exponential size.

The main motivation for the study of this logic is given by links to State-Space Models in machine learning. Further work will elaborate on the connections between these formalisms. On the side of temporal logics, there is obvious further work in terms generalisations of the strict first-time semantics to a strict n-th time semantics, constraining further moments in which an Until-formula gets satisfied. We suspect that for every fixed n, the resulting logic MTLn remains PSpace-complete.

There are also obvious connections to Counting LTL [11], a variant of LTL with a counting operator. The first-time semantics is clearly expressible using counting operators by stating that the number of positions beforehand is zero. The relative succinctness between the two formalisms remains to be investigated, as is the case for MTL and MTL1.

References

  • [1] R. Alur and T. Henzinger. Real-time logics: Complexity and expressiveness. Information and Computation, 104(1):35–77, 1993. doi:10.1006/INCO.1993.1025.
  • [2] S. Arora and B. Barak. Computational Complexity: A Modern Approach. Cambridge Univ. Press, 2006.
  • [3] B. Banieqbal and H. Barringer. Temporal logic with fixed points. In Proc. Coll. on Temporal Logic in Specification, volume 398 of LNCS, pages 62–73. Springer, 1989. doi:10.1007/3-540-51803-7_22.
  • [4] S. Demri, V. Goranko, and M. Lange. Temporal Logics in Computer Science. Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 2016.
  • [5] C. Eisner and D. Fisman. A Practical Introduction to PSL. Series on Integrated Circuits and Systems. Springer, 2006. doi:10.1007/978-0-387-36123-9.
  • [6] D. Gabbay, A. Pnueli, S. Shelah, and J. Stavi. On the temporal analysis of fairness. In Proc. 7th Symp. on Principles of Programming Languages, POPL’80, pages 163–173. ACM, 1980. doi:10.1145/567446.567462.
  • [7] G. De Giacomo and M. Y. Vardi. Linear temporal logic and linear dynamic logic on finite traces. In Proc. 23rd Int. Joint Conf. on A.I., IJCAI’13, pages 854–860. IJCAI/AAAI, 2013. URL: http://www.aaai.org/ocs/index.php/IJCAI/IJCAI13/paper/view/6997.
  • [8] M. Rauch Henzinger and J. A. Telle. Faster algorithms for the nonemptiness of streett automata and for communication protocol pruning. In Proc. 5th Scand. Workshop on Algorithm Theory, SWAT’96, volume 1097 of LNCS, pages 16–27. Springer, 1996. doi:10.1007/3-540-61422-2_117.
  • [9] Ron Koymans. Specifying real-time properties with metric temporal logic. Real Time Syst., 2(4):255–299, 1990. doi:10.1007/BF01995674.
  • [10] F. Laroussinie, N. Markey, and Ph. Schnoebelen. Efficient timed model checking for discrete-time systems. Theoretical Computer Science, 353(1):249–271, 2006. doi:10.1016/j.tcs.2005.11.020.
  • [11] F. Laroussinie, A. Meyer, and E. Petonnet. Counting LTL. In Proc. 17th Int. Symp. on Temporal Representation and Reasoning, TIME’10, pages 51–58. IEEE, 2010. doi:10.1109/TIME.2010.20.
  • [12] T. Latvala and K. Heljanko. Coping with strong fairness. Fundam. Informaticae, 43(1-4):175–193, 2000. doi:10.3233/FI-2000-43123409.
  • [13] W. Merrill, J. Petty, and A. Sabharwal. The illusion of state in state-space models. In Proc. 41st Int. Conf. on Machine Learning, ICML’24, volume 235, pages 35492–35506. JMLR.org, 2024.
  • [14] A. Pnueli. The temporal logic of programs. In Proc. 18th Symp. on Foundations of Computer Science, FOCS’77, pages 46–57. IEEE, 1977. doi:10.1109/SFCS.1977.32.
  • [15] W. J. Savitch. Relationships between nondeterministic and deterministic tape complexities. Journal of Computer and System Sciences, 4:177–192, 1970. doi:10.1016/S0022-0000(70)80006-X.
  • [16] A. P. Sistla. Theoretical Issues in the Design of Distributed and Concurrent Systems. PhD thesis, Harvard Univ., Cambridge, MA, 1983.
  • [17] A. P. Sistla and E. M. Clarke. The complexity of propositional linear temporal logics. Journal of the ACM, 32(3):733–749, 1985. doi:10.1145/3828.3837.
  • [18] R. S. Streett. Propositional dynamic logic of looping and converse is elementarily decidable. Information and Control, 54(1/2):121–141, 1982. doi:10.1016/S0019-9958(82)91258-X.
  • [19] M. Y. Vardi. A temporal fixpoint calculus. In Proc. Conf. on Principles of Programming Languages, POPL’88, pages 250–259. ACM, 1988. doi:10.1145/73560.73582.
  • [20] M. Y. Vardi. An Automata-Theoretic Approach to Linear Temporal Logic, volume 1043 of LNCS, pages 238–266. Springer, New York, NY, USA, 1996. doi:10.1007/3-540-60915-6_6.
  • [21] M. Y. Vardi and P. Wolper. Reasoning about infinite computations. Information and Computation, 115(1):1–37, 1994. doi:10.1006/INCO.1994.1092.