Satisfiability Checking for Mission-Time LTL

Mission-time LTL ( MLTL ) is a bounded variant of MTL over naturals designed to generically specify requirements for mission-based system operation common to aircraft, spacecraft, vehicles, and robots. Despite the utility of MLTL as a specification logic, major gaps remain in analyzing MLTL , e.g., for specification debugging or model checking, centering on the absence of any complete MLTL satisfiability checker. In this paper, we explore both the theoretical and algorithmic problems of MLTL satisfiability checking. We prove that the MLTL satisfiability checking problem is NEXPTIME-complete and that satisfiability checking MLTL 0 , the variant of MLTL where all intervals start at 0, is PSPACE-complete. To explore the best algorithmic solution for MLTL satisifiability checking, we reduce this problem to LTL satisfiability checking, LTL f satisfiability checking, and model checking respectively, thus conducting transitions for MLTL -to- LTL , MLTL -to- LTL f , and MLTL -to- SMV . Moreover, we propose a new SMT -based solution for MLTL satisfiability checking and create a transition for MLTL - to-SMT . Our extensive experimental evaluation shows that while the MLTL -to- SMV transition with NuXmv model checker performs best on the benchmarks whose inter-1


Introduction
Mission-time LTL (MLTL) [1] has the syntax of Linear Temporal Logic with the option of integer bounds on the temporal operators.It was created as a generalization of the variations [2,3,4] on finitely-bounded linear temporal logic, ideal for specification of missions carried out by aircraft, spacecraft, rovers, and other vehicular or robotic systems.MLTL provides the readability of LTL [5], while assuming, when a different duration is not specified, that all requirements must be upheld during the (a priori known) length of a given mission, such as during the half-hour battery life of an Unmanned Aerial System (UAS).Using integer bounds instead of real-number or real-time bounds leads to more generic specifications that are adaptable to model checking at different levels of abstraction, or runtime monitoring on different platforms (e.g., in software vs in hardware).Integer bounds should be read as generic time units, referring to the basic temporal resolution of the system, which can generically be resolved to units such as clock ticks or seconds depending on the mission.Integer bounds also allow generic specification with respect to different granularities of time, e.g., to allow easy updates to model-checking models, and re-usable specifications for the same requirements on different embedded systems that may have different resource limits for storing runtime monitors.MLTL has been used in many industrial case studies [1,6,7,8,9,10,11], and was the official logic of the 2018 Runtime Verification Benchmark Competition [12].Many specifications from other case studies, in logics such as MTL [2] and STL [3], can be represented in MLTL.We intuitively relate MLTL to LTL and MTL-over-naturals as follows: (1) MLTL formulas are LTL formulas with bounded intervals over temporal operators, and interpreted over finite traces.(2) MLTL formulas are MTL-over-naturals formulas without any unbounded intervals, and interpreted over finite traces.
Despite the practical utility of MLTL, no model checker currently accepts this logic as a specification language.The model checker nuXmv encodes a related logic for use in symbolic model checking, where the □ and ♢ operators of an LTLSPEC can have integer bounds [13], though bounds cannot be placed on the U or V (the Release operator of nuXmv) operators.
We also critically need an MLTL satisfiability checker to enable specification debugging.Specification is a major bottleneck to the formal verification of missionbased, especially autonomous, systems [14], with a key part of the problem being the availability of good tools for specification debugging.Satisfiability checking is an integral tool for specification debugging: [15,16] argued that for every requirement φ we need to check φ and ¬φ for satisfiability; we also need to check the conjunction of all requirements to ensure that they can all be true of the same system at the same time.
Specification debugging is essential to model checking [16,17,18] because a positive answer may not mean there is no bug and a negative answer may not mean there is a bug if the specification is valid/unsatisfiable, respectively.Specification debugging is critical for synthesis and runtime verification (RV) since in these cases there is no model; synthesis and RV are both entirely dependent on the specification.For synthesis, satisfiability checking is the best-available specification-debugging technique, since other techniques, such as vacuity checking (cf.[19,20]) reference a model in addition to the specification.While there are artifacts one can use in RV, specification debugging is still limited outside of satisfiability checking yet central to correct analysis.A false positive due to RV of an incorrect specification can have disastrous consequences, such as triggering an abort of an (otherwise successful) mission to Mars.Arguably, the biggest challenge to creating an RV algorithm or tool is the dearth of benchmarks for checking correctness or comparatively analyzing these [21], where a benchmark consists of some runtime trace, a temporal logic formula reasoning about that trace, and some verdict designating whether the trace at a given time satisfies the requirement formula.A MLTL satisfiability solver is useful for RV benchmark generation [22].
Despite the critical need for an MLTL satisfiability solver, no such tool currently exists.To the best of our knowledge, there is only one available solver (zot [23]) for checking the satisfiability of MTL-over-naturals formulas, interpreted over infinite traces.Since MLTL formulas are interpreted over finite traces and there is no trivial reduction from one to another, zot cannot be directly applied to MLTL satisfiability checking.
Our approach is inspired by satisfiability-checking algorithms from other logics.
For LTL satisfiability solving, we observe that there are multiple efficient translations from LTL satisfiability to model checking, using nuXmv [17]; we therefore consider here translations to nuXmv model checking, both indirectly (as a translation to LTL), and directly using the new KLIVE [24] back-end and the BMC back-end, taking advantage of the bounded nature of MLTL.The bounded nature of MLTL enables us to also consider a direct encoding at the word-level, suitable as input to an SMT solver.
Our contribution is both theoretic and experimental.We first consider the complexity of such translations.We prove that the MLTL satisfiability checking problem is NEXPTIME-complete and that satisfiability checking MLTL 0 , the variant of MLTL where all intervals start at 0, is PSPACE-complete.Secondly, we introduce translation algorithms for MLTL-to-LTL f (LTL over finite traces [4]), MLTL-to-LTL, MLTL-to-SMV, and MLTL-to-SMT, thus creating four options for MLTL satisfiability checking.
Our results show that the MLTL-to-SMT transition with the Z3 SMT solver offers the most scalable performance, though the MLTL-to-SMV translation with an SMV model checker can offer the best performance when the intervals in the MLTL formulas are restricted to small ranges less than 100.
In addition to including all missing proofs, this paper extends the conference version [25] by introducing more details of the MLTL-to-SMT transition, e.g., examplize the encoding and propose different SMT encodings for MLTL satisfiability checking, and showing more experimental results to strenthen our previous conclusion as well as to evaluate the performance of different SMT encodings.

A (closed) interval over naturals
MLTL is defined using bounded intervals.Unlike Metric Temporal Logic (MTL) [26], where I is a bounded interval, p ∈ AP is an atom, and φ and ψ are subformulas.
Let a, b ∈ I, a ≤ b; we define that π models (satisfies) an MLTL formula φ, denoted as π |= φ, as follows: Compared to the traditional MTL-over-naturals2 [27], the Until formula in MLTL is interpreted in a slightly different way.In MTL-over-naturals, the satisfaction of φ U I ψ requires φ to hold from position 0 to the position where ψ holds (in I), while in MLTL φ is only required to hold within the interval I, before the time ψ holds.From the perspective of writing specifications, cf.[1,8], this adjustment is more user-friendly.
It is not hard to see that MLTL is as expressive as the standard MTL-over-naturals: We say an MLTL formula is in BNF if the formula contains only ¬, ∧ and U I operators.It is trivial to see that every MLTL formula can be converted to its (semantically) equivalent BNF with a linear cost.Consider φ = (¬a) ∨ ((¬b)R I (¬c)) as an example.
Its BNF form is ¬(a ∧ (b U I c)).Without explicit clarification, this paper assumes that every MLTL formula is in BNF.
The closure of an MLTL formula φ, denoted as cl(φ), is a set of formulas such that: , where op can be ∧ or U I .Let |cl(φ)| be the size of cl(φ).Since the definition of cl(φ) ignores the intervals in φ, |cl(φ)| is linear in the number of operators in φ.We also define the closure(*) of an MLTL formula φ, denoted cl * (φ), as the set of formulas such that: 1) be the size of cl * (φ) and K be the maximal natural number in the intervals of φ.It is We also consider a fragment of MLTL, namely MLTL 0 , which is more frequently used in practice, cf.[6,1].Informally speaking, MLTL 0 formulas are MLTL formulas in which all intervals start from 0. For example, Given an MLTL formula φ, the satisfiability problem asks whether there is a finite trace π such that π |= φ holds.To solve this problem, we can reduce it to the satisfiability problem of the related logics LTL and LTL f (LTL over finite traces [4]), and leverage the off-the-shelf satisfiability checking solvers for these well-explored logics.
We abbreviate MLTL, LTL, and LTL f satisfiability checking as MLTL-SAT, LTL-SAT, and LTL f -SAT respectively.
Linear Temporal Logic over finite traces.We assume readers are familiar with LTL (over infinite traces) [5].Linear Temporal Logic over finite traces, short for LTL f [4], is a variant of LTL that has the same syntax, except that for LTL f , the dual operator of X is N (weak Next), which differs X in the last state of the finite trace.In the last state of a finite trace, X ψ can never be satisfied, while N ψ is satisfiable.Given an LTL f formula φ, there is an LTL formula ψ such that φ is satisfiable iff ψ is satisfiable.In detail, ψ = ♢T ail∧t(φ) where T ail is a new atom identifying the end of the satisfying trace and t(φ) is constructed as follows: • t(p) = p where p is an atom; • t(¬ψ) = ¬t(ψ); In the above reduction, φ is in BNF.Since the reduction is linear in the size of the original LTL f formula and LTL-SAT is PSPACE-complete [28], LTL f -SAT is also a PSPACE-complete problem [4].

Complexity of MLTL-SAT
It is known that the complexity of MITL (Metric Interval Temporal Logic) satisfiability is EXPSPACE-complete, and the satisfiability complexity of the fragment of MITL named MITL 0,∞ is PSPACE-complete [29].MLTL (resp.MLTL 0 ) can be viewed as a variant of MITL (resp.MITL 0,∞ ) that is interpreted over the naturals.We show that MLTL satisfiability checking is NEXPTIME-complete, via a reduction from MLTL to LTL f .Lemma 1.Let φ be an MLTL formula, and K be the maximal natural appearing in the intervals of φ (K is set to 1 if there are no intervals in φ).There is an LTL f formula θ that recognizes the same language as φ.Moreover, the size of θ is in O(K • |cl(φ)|).
Proof.For an MLTL formula φ, we define the LTL f formula f (φ) recursively as follows: • If φ = true, false, or an atom p, f (φ) = φ; if a = 0 and b = 0; X represents the neXt operator in LTL f .Based on the above translation, the size of ).Now we prove by induction over the type of φ that π |= φ iff π |= f (φ) for a finite trace π, i.e. φ and f (φ) accept the same language.Obviously, π |= φ iff π |= f (φ) holds when φ is true, false or an atom p. Inductively, • if φ = ¬ψ, f (φ) = ¬f (ψ).According to the assumption hypothesis, π |= ψ iff According to the assumption hypothesis, for a finite trace π ′ .Then according to the semantics of the X operator and the MLTL formulas, we have that φ is semantically equivalent to According to the semantics of the X operator and the MLTL formulas, we have that From the assumption hypothesis, we have that Based on the assumption hypothesis, for some finite trace π.Also, according to the MLTL semantics, φ is semantically equivalent to ψ.As a result, we have that Let θ = f (φ) and we can conclude that θ and φ accepts the same language, and the We use the construction shown in Lemma 1 to explore several useful properties of MLTL.For instance, the LTL f formula translated from an MLTL formula contains only the X temporal operator or its dual N , which represents weak Next [30,31], and the number of these operators is strictly smaller than K •|cl(φ)|.Every X or N subformula in the LTL f formula corresponds to some temporal formula in cl * (φ).Notably, because the natural-number intervals in φ are written in base 10 (decimal) notation, the blow-up in the translation of Lemma 1 is exponential.
The next lower bound is reminiscent of the NEXPTIME-lower bound shown in [32] for a fragment of Metric Interval Temporal Logic (MITL), but is different in the details of the proof as the two logics are quite different.
Theorem 1.The complexity of MLTL satisfiability checking is NEXPTIME-complete.
Proof.By Lemma 1, there is an LTL f formula θ that accepts the same traces as MLTL formula φ, and the size of The only temporal connectives used in θ are X and N , since the translation to LTL f reduces all MLTL temporal connectives in φ to nested X 's or N 's (produced by simplifying ¬X ).Thus, if θ is satisfiable, then it is satisfiable by a trace whose length is bounded by the length of θ.Thus, we can just guess a trace π of exponential length of θ and check that it satisfies φ.As a result, the upper bound for MLTL-SAT is NEXPTIME.
Before proving the NEXPTIME lower bound, recall the PSPACE-lower bound proof in [28] for LTL satisfiability.The proof reduces the acceptance problem for a linear-space bounded Turing machine M to LTL satisfiability.Given a Turing machine M and an integer k, we construct a formula φ M such that φ M is satisfiable iff M accepts the empty tape using k tape cells.The argument is that we can encode such a space-bounded computation of M by a trace π of length c k for some constant c, and then use φ M to force π to encode an accepting computation of M .The formula φ M has to match corresponding points in successive configurations of M , which can be expressed using a O(k)-nested X 's, since such points are O(k) points apart.
To prove a NEXPTIME-lower bound for MLTL, we reduce the acceptance problem for exponentially bounded non-deterministic Turing machines to MLTL satisfiability.
Given a non-deterministic Turing machine M and an integer k, we construct an MLTL formula φ M of length O(k) such that φ M is satisfiable iff M accepts the empty tape in time 2 k .Note that such a computation of a 2 k -time bounded Turing machines consists of 2 k many configurations of length 2 k each, so the whole computation is of exponential length -4 k , and can be encoded by a trace π of length 4 k , where every point of π encodes one cell in the computation of M .Unlike the reduction in [28], in the encoding here corresponding points in successive configurations are exponentially far (2 k ) from each other, because each configuration has 2 k cells, so the relationship between such successive points cannot be expressed in LTL.Because, however, the constants in the intervals of MLTL are written in base-10 (decimal) notation, we can write formulas of size O(k), e.g., formulas of the form p U [0,2 k ] q, that relate points that are 2 k apart.
The key is to express the fact that one Turing machine configuration is a proper successor of another configuration using a formula of size O(k).In the PSPACElower-bound proof of [28], LTL formulas of size O(k) relate successive configurations of k-space-bounded machines.Here MLTL formulas of size O(k) relate successive configurations of 2 k -time-bounded machines.Thus, we can write a formula φ M of length O(k) that forces trace π to encode a computation of M of length 2 k .Now we consider MLTL 0 formulas, and prove that the complexity of checking the satisfiability of MLTL 0 formulas is PSPACE-complete.We first introduce the following lemma to show an inherent feature of MLTL 0 formulas.
Lemma 2. The conjunction of identical MLTL 0 U-rooted formulas is equivalent to the conjunct with the smallest interval range: where b > a.
Proof.We first prove that for i ≥ 0, the equation (ξ and . By hypothesis assumption, implies that the following equivalence is true: ) is true, we can prove by induction that Proof.According to [28], the satisfiability checking of X -free LTL formulas is still PSPACE-complete.This also applies to the satisfiability checking of X -free LTL f formulas.Given an X -free LTL f formula φ, we construct the corresponding MLTL formula m(φ) recursively as follows: • m(p) = p where p is an atom; • m(¬ξ) = ¬m(ξ); Notably implies that there is 0 ≤ i ≤ 2 |φ| such that π i |= m(ψ) and for every 0 ≤ j < i, is satisfiable implies there is a finite trace π such that π |= m(η).According to MLTL semantics, there is 0 ≤ i ≤ 2 |φ| such that π i |= m(ψ) and for every 0 ≤ j < i it holds that π j |= m(ξ).By hypothesis assumption, π i |= m(ψ) implies π i |= ψ and implies that there is 0 ≤ i such that π i |= ψ and for every 0 ≤ j < i it holds that Theorem 2. The complexity of checking the satisfiability of MLTL 0 is PSPACE-complete.
Proof.Since Lemma 3 shows a linear reduction from X -free LTL f -SAT to MLTL 0 -SAT and X -free LTL f -SAT is PSPACE-complete [4], it directly implies that the lower bound of MLTL 0 -SAT is PSPACE-hard.
For the upper bound, recall from the proof of Theorem 1 that an MLTL formula φ is translated to an LTL f formula θ of length K • |cl(φ)|, which, as we commented, involved an exponential blow-up in the notation for K. Following the automata-theoretic approach for satisfiability, one would translate θ to an NFA and check its non-emptiness [4].Normally, such a translation would involve another exponential blow-up.We show that this is not the case for MLTL 0 .Recalling from the automaton construction in [4] that every state of the automaton is a set of subformulas of θ, the size of a state is at In the general case, if ψ 1 , ψ 2 are two subformulas of θ corresponding to the MLTL formulas ξ U I1 ψ and ξ U I2 ψ, ψ 1 and ψ 2 can be in the same state of the automaton, which implies that the size of the state can be at most K • |cl(φ)|.When the formula φ is restricted to MLTL 0 , we show that the exponential blow-up can be avoided.Lemma 2 shows that either ψ 1 or ψ 2 in the state is enough, since assuming So the size of the state in the automaton for a MLTL 0 formula φ is at most |cl(φ)|.For each subformula in the state, there can be K possible values (e.g., for ♢ I ξ in the state, we can have Therefore the size of the automaton is in . Therefore, MLTL 0 satisfiability checking is a PSPACE-complete problem.

Implementation of MLTL-SAT
We first show how to reduce MLTL-SAT to the well-explored LTL f -SAT and LTL-SAT.Then we introduce two new satisfiability-checking strategies based on the inherent properties of MLTL formulas, which are able to leverage the state-of-art modelchecking and SMT-solving techniques.

MLTL-SAT via Logic Translation
For a formula φ from one logic, and ψ from another logic, we say φ and ψ are equi-satisfiable when φ is satisfiable under its semantics iff ψ is satisfiable under its semantics.Based on Lemma 1 and Theorem 1, we have the following corollary, Corollary 1 (MLTL-SAT to LTL f -SAT).MLTL-SAT can be reduced to LTL f -SAT with an exponential blow-up.
From Corollary 1, MLTL-SAT is reducible to LTL f -SAT, enabling use of the offthe-shelf LTL f satisfiability solvers, cf.aaltaf [30].It is also straightforward to consider MLTL-SAT via LTL-SAT; LTL-SAT has been studied for more than a decade, and many off-the-shelf LTL solvers are available, cf.[15,17,33].
Theorem 3 (MLTL to LTL).For an MLTL formula φ, there is an LTL formula θ such that φ and θ are equi-satisfiable, and the size of , where K is the maximal integer in φ.
Proof.Lemma 1 provides a translation from the MLTL formula φ to the equivalent As shown in Section 2, there is a linear translation from the LTL f formula φ ′ to its equi-satisfiable LTL formula θ [4].
Therefore, the blow-up from Corollary 2 (MLTL-SAT to LTL-SAT).MLTL-SAT can be reduced to LTL-SAT with an exponential blow-up.
Since MLTL-SAT is reducible to LTL-SAT, MLTL-SAT can also benefit from the power of LTL satisfiability solvers.Moreover, the reduction from MLTL-SAT to LTL-SAT enables leveraging modern model-checking techniques to solve the MLTL-SAT problem, due to the fact that LTL-SAT has been shown to be reducible to model checking with a linear blow-up [15,16].
Corollary 3 (MLTL-SAT to LTL-Model-checking). MLTL-SAT can be reduced to LTL model checking with an exponential blow-up.
In our implementation, we choose the model checker nuXmv [34] for LTL satisfiability checking, as it allows an LTL formula to be directly input as the temporal specification together with a universal model as described in [15,16].

Model Generation
Using the LTL formula as the temporal specification in nuXmv has been shown, however, to not be the most efficient way to use model checking for satisfiability checking [17].Consider the MLTL formula ♢ [0,10] a ∧ ♢ [1,11] a.The translated , where f (♢ [0,10] a) has to be constructed twice.To avoid such redundant construction, we follow [17] and encode directly the input MLTL formula as an SMV model (the input model of nuXmv) rather than treating the LTL formula, which is obtained from the input MLTL formula, as a specification.
An SMV [35] model consists of a Boolean transition system Sys = (V, I, T ), where V is a set of Boolean variables, I is a Boolean formula representing the initial states of Sys, and T is the Boolean transition formula.Moreover, a specification to be verified against the system is also contained in the SMV model (here we focus on the LTL specification).Given the input MLTL formula φ, we construct the corresponding SMV model M φ as follows.
• Introduce a Boolean variable for each atom in φ as well as for "T ail" (new variable identifying the end of a finite trace).
• Introduce a Boolean variable X ψ for each U formula ψ in cl * (φ), which represents the intermediate temporal formula X ψ.
• Introduce a temporary Boolean variable3 T ψ for each U formula in cl * (φ).
• A Boolean formula e(ψ) is used to represent the formula ψ in cl * (φ) in the SMV model, which is defined recursively as follows.
• Let the initial Boolean formula of the system Sys be e(φ).
• For each temporary variable T ψ, create a DEFINE statement according to the type and interval of ψ, as follows.
• Create the Boolean formula (X ψ ↔ (¬T ail ∧ next(e(ψ)))) for each X ψ in the VAR list (the set V in Sys) of the SMV model.
• Finally, designate the LTL formula □¬T ail as the temporal specification of the SMV model M φ (which implies that a counterexample trace satisfies ♢T ail).
In a nutshell, the SMV model for θ has the analogous structure in Table 1.
Encoding heuristics for MLTL 0 formulas.We also encode the rules shown in Lemma 2 to prune the state space for checking the satisfiability of MLTL 0 formulas.These rules are encoded using the INVAR constraint in the SMV model.Taking the U formula as an example, we encode There are different techniques that can be used for LTL model checking.Based on the latest evaluation of LTL satisfiability checking [33], the KLIVE [24] back-end implemented in the SMV model checker nuXmv [34] produces the best performance.
We thus choose KLIVE as our model-checking technique for MLTL-SAT.
Bounded MLTL-SAT Although MLTL-SAT is reducible to the satisfiability problem of other well-explored logics, with established off-the-shelf satisfiability solvers, a dedicated solution based on inherent properties of MLTL may be superior.One intuition is, since all intervals in MLTL formulas are bounded, the satisfiability of the formula can be reduced to Bounded Model Checking (BMC) [36].The proof is analogous if nnf(θ) = ψ 1 ∨ ψ 2 ; Theorem 5 states that the satisfiability of a given MLTL formula can be reduced to checking for the existence of a satisfying trace.To apply the BMC technique in nuXmv, we compute and set the maximal depth of BMC to be the value of K • |cl(φ)| for a given MLTL formula φ.The input SMV model for BMC is still M φ , as described in Section 4.2.However to ensure correct BMC checking in nuXmv, the constraint "FAIRNESS TRUE" has to be added into the SMV model. 4The LTLSPEC remains □¬T ail.According to Theorem 5, φ is satisfiable iff the model checker returns a counterexample by using the BMC technique within the maximal depth of K • |cl(φ)|.

MLTL-SAT via SMT Solving
Another approach to solve MLTL-SAT is via SMT solving, considering that using SMT solvers to handle intervals in MLTL formulas is straightforward.Since the input logic of SMT solvers is First-Order Logic, we must first translate the MLTL formula to its equi-satisfiable formula in First-Order Logic over the natural domain N .We assume that readers are familiar with First-Order Logic and only focus on the translation.Given an MLTL formula φ and the alphabet Σ, we construct the corresponding formula in First-Order Logic over N in the following way.2. The First-Order Logic formula fol(φ, k, len) for φ (k, len ∈ N ) is constructed recursively as below: • fol(true, k, len) = (len > k) and fol(false, k, len) = f alse; In the formula fol(φ, k, len), k represents the index of the (finite) trace from which φ is evaluated, and len indicates the length of the suffix of the trace starting from the index k.Since the formula is constructed recursively, we need to introduce k to record the index.Meanwhile, len is necessary because the MLTL semantics, which is interpreted over finite traces, constrains the lengths of the satisfying traces of the Until formulas.The following theorem guarantees that MLTL-SAT is reducible to the satisfiability of First-Order Logic.Theorem 6.For an MLTL formula φ, φ is satisfiable iff the corresponding First-Order Logic formula ∃len.fol(φ,0, len) is satisfiable.
Proof.Let the alphabet of φ be Σ, and π ∈ (2 Σ ) * be a finite trace.For each p ∈ Σ, we define the function f p : Int → Bool as follows: We now prove by induction over the type of φ and the construction of fol(φ, k, len) with respect to φ that π k |= φ holds iff {f p |p ∈ Σ} is a model of fol(φ, k, |π|): here |π| is the length of π.The cases when φ is true or false are trivial.
and π, j |= ξ holds iff {f p |p ∈ Σ} is a model of fol(ξ, j, |π| − j) (the length of π j is |π| − j).Moreover, |π| > a + k must be true according to the MLTL semantics.As a result, {f p |p ∈ Σ} is a model of fol(φ, k, |π|), which implies This proof holds for all values of k, including the special case where k = 0.
An inductive proof for the theorem can be conducted according to the construction of SMT(φ).Notably, there is no difference between the SMT encoding for MLTL formulas and that for MLTL 0 formulas, as the SMT-based encoding does not require unrolling the temporal operators in the formula.
An alternative SMT encoding.Since SMT is essentially a combination of different theories, the performance of SMT solving may hence vary on the theories used by the solver.Consider the encoding S(fol(φ, 0, len)) above, an alternative to the function for each variable in Σ is to use an array instead, in which the Array (or ArrayEx) theory can apply.Therefore, each f a in the previous encoding corresponds to an array A a in the alternative one, with (f a k) being replaced by "(select A a k)".It is interesting to explore how different SMT theories affect the satisfiability-checking performance, and we will answer this question in the next section.

Experimental Evaluations
Tools and Platform.We implemented the translator MLTLconverter in C++, including encodings for an MLTL formula as equi-satisfiable LTL and LTL f formulas, and corresponding SMV and SMT-LIB v2 models.We leverage the extant LTL solver aalta [33], LTL f solver aaltaf [30], SMV model checker nuXmv [34], and the SMT solver Z3 [38] to check the satisfiability of the input MLTL formula in their respective encodings from MLTLconverter.The solvers, including the runtime flags we used, are summarized in Table 3.We evaluated both BMC and KLIVE [24] model-checking back-ends in nuXmv, and the corresponding commands are shown in Figure 1.Notably in the figure, the maximal length "MAX" to run BMC is computed dynamically for each MLTL formula, based on Theorem 5.  Benchmarks.There are few MLTL (or even MTL-over-naturals) benchmarks available for evaluation.Previous works on MTL-over-naturals [29,2,26] mainly focus on the theoretic exploration of the logic.To enable rigorous experimental evaluation, we develop three types of benchmarks, motivated by the generation of LTL benchmarks [15]. 6.Random MLTL formulas (R): We generated 10,000 R formulas, varying the formula length L (20, 40, 60, 80, 100), the number of variables N (1, 2, 3, 4, 5), and the probability of the appearance of the U operator P (0.33, 0,5, 0.7, 0.95); for each (L, N, P ) we generated 100 formulas.For every U operator, we randomly chose an interval [i, j] where i ≥ 0 and j ≤ 100.
2. NASA-Boeing MLTL formulas (NB): We use challenging benchmarks [39] created from projects at NASA [40,41] and Boeing [42].We extract 63 real-life LTL requirements from the SMV models of the benchmarks, and then randomly generate an interval for each temporal operator.(We replace each X with □ [1,1] .) We create 3 groups of such formulas (63 in each) to test the scalability of different approaches, by restricting the maximal number of the intervals to be 1,000, 10,000, and 100,000 respectively.
3. Random MLTL 0 formulas (R0): We generated 500 R0 formulas in the same way as the R formulas, except that every generated interval was restricted to start from 0; we generated sets of five for each (L, N, P ).This small set of R benchmarks serve to compare the performance on MLTL 0 formulas whose SMV encodings were created with/without heuristics.

Unsatisfiable Random Conjunctive formulas (RC): Our preliminary evaluations
show that 98% of the formulas collected in the above three benchmarks are satisfiable, which makes it hard to evaluate different approaches on unsatisifability checking.Inspired from the fact shown in [30] that large conjunctive formulas tends to be unsatisfiable, we construct random conjunctive formulas for MLTL as follows.
• A random conjunctive MLTL formula with the length n has the form of 1≤i≤n C i where C i is a small MLTL patterns that are widely used in practice; • Despite little work has investigated the common-used MLTL formulas, there are 26 off-the-shelf LTL f patterns collected in Table 4.As a result, we construct the MLTL patterns in demand from the corresponding LTL f ones.
Informally for each LTL f pattern in Table 4, we replace the X operator with ♢ [1,1] and the ♢, □ and U operators with ♢ [l,h] , □ [l,h] and U [l,h] respectively by randomly choosing l and h such that l ≤ h.Notably, the W operator shown in Table 4 can be replaced by G and U, i.e. ξWψ ≡ Gξ ∨ ξUψ.
Correctness Checking.We compared the verdicts from all solvers for every test instance and found no inconsistencies, excluding segmentation faults.This exercise aided with verification of our implementations of the translators, including diagnosing the need for including FAIRNESS TRUE in BMC models.LTL/LTL f formulas.Also because K is kept small in the R formulas, the encoding cost between SMV and SMT-LIB v2 becomes comparable.

Experimental Results.
Figure 3 shows total satisfiability checking times for R benchmarks.Recall that the inputs of both BMC and KLIVE approaches are SMV models.The MLTL-SAT via KLIVE is the fastest solving strategy for MLTL formulas with interval ranges of less than 100.The portion of satisfiable/unsatisfiable formulas of this benchmark is approximate 4/1.Although BMC is known to be good at detecting counterexamples with short lengths, it does not perform as well as the KLIVE and SMT approaches on checking satisfiable formulas since only longer counterexamples (with length greater than 1000) exist for most of these formulas.While nuXmv successfully checked all such models, Figure 4 shows that increasing the interval range constraint results in segmentation faults; more than half of our benchmarks produced this outcome for formulas with allowed interval ranges of up to 600.Meanwhile, the solving solutions via LTL-SAT/LTL f -SAT are definitely not competitive for any interval range.
The SMT-based approach dominates the model-checking-approaches when considering scalable NB benchmarks, as shown in Figure 5. Here, e.g., "BMC-1000"        now made possible specification debugging MLTL formulas in design-time verification and benchmark generation for runtime verification.We plan to explore alternative encodings for improving the performance of MLTL satisfiability checking and work toward developing an optimized multi-encoding approach, following the style of the previous study for LTL [17]; the current SMT model generated from the MLTL formula uses a relatively simple theory (uninterpreted functions).We also plan to explore lazy encodings from MLTL formulas to SMT models.For example, instead of encoding the whole MLTL formula into a monolithic SMT model, we may be able to decrease overall satisfiability-solving time by encoding the MLTL formula in parts with dynamic ordering similar to [39].To make the output of SMT-based MLTL satisfiability checking more usable, we plan to investigate translations from the functions returned from Z3 for satisfiable instances into more easily parsable satisfying assignments.
it is not necessary to introduce open or half-open intervals over the natural domain, as every open or half-open bounded interval is reducible to an equivalent closed bounded interval, e.g., (1,2) = ∅, (1,3) = [2,2], (1,3] = [2,3], etc.Let AP be a set of atomic propositions, then the syntax of a formula in MLTL is φ

ψ 2 Theorem 4 .
in cl * (φ).Similar encodings also apply to the R formulas in cl * (φ).Theorem 4 below guarantees the correctness of the translation, and it can be proved by induction over the type of φ and the construction of the SMV model.The MLTL formula φ is satisfiable iff the corresponding SMV model M φ violates the LTL property □¬T ail.

1 .
For each p ∈ Σ, define a corresponding function f p : Int → Bool such that f p (k) is true (k ∈ N ) iff there is a satisfying (finite) trace π of φ and p is in π[k].

Figure 1 :
Figure 1: nuXmv commands for BMC (left) and KLIVE (right).All experiments were executed on Rice University's NOTS cluster, 5 running Red-Hat 5, with 226 dual socket compute blades housed within HPE s6500, HPE Apollo 2000, and Dell PowerEdge C6400 chassis.All the nodes are interconnected with 10 GigE network.Each satisfiability check over one MLTL formula and one solver was executed with exclusive access to one CPU and 8 GB RAM with a timeout of one hour, as measured by the Linux time command.We assigned a time penalty of one hour to benchmarks that segmentation fault or timeout.Experimental Goals.We evaluate performance along three metrics.(1) Each satisfiability check has two parts: the encoding time (consumed by MLTLconverter) and the solving time (consumed by solvers).We evaluate how each encoding affects the performance of both stages of MLTL-SAT.(2) We comparatively analyze the performance and scalability of end-to-end MLTL-SAT via LTL-SAT, LTL f -SAT, LTL model check-

Figure 2 4 :Figure 2 :
Figure 2: Cactus plot for different MLTL encodings on R formulas: LTL-SAT and LTL f -SAT lines overlap; SMV and SMT lines overlap.

Figure 3 :
Figure 3: Cactus plot for different MLTL solving approaches on R formulas: LTL-SAT and LTL f -SAT lines overlap.

Figure 4 :
Figure 4: Proportion of segmentation faults for sets of 200 R formulas with maximal interval ranges varying from 100 to 1000.

Figure 5 :
Figure 5: Cactus plot for BMC, KLIVE and SMT-solving approaches on the NB benchmarks; BMC and KLIVE overlap.

Figure 6 :
Figure 6: Cactus plot for the two different SMT-solving approaches on the NB benchmarks.

Figure 7 :
Figure 7: Scatter plot for both the BMC and KLIVE approaches to check MLTL 0 formulas with/without encoding heuristics.

Figure 8 :
Figure 8: Cactus plot for different approaches on the unsatisfiable random conjunction (RC) benchmarks.

Table 3 :
List of solvers and their runtime flags.