arXiv:2609.01032cs.LOSep 2026

Manuscript Offprint

arXiv:2609.01032

On Synthesis of Metric Interval Temporal Logics

Hsi-Ming Ho, Shankaranarayanan Krishna, Khushraj Madnani

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Hsi-Ming Ho

University of Sussex, Brighton, UK

hsi-ming.ho@sussex.ac.uk

Shankara Narayanan Krishna

IIT Bombay, Mumbai, India

krishnas@cse.iitb.ac.in

Khushraj Madnani

IIT Guwahati, Guwahati, India

khushraj@iitg.ac.in

Abstract—Automated mining of formal specifications is vital for verifying real-time systems. However, existing passive learning approaches remain restricted to deterministic specifications or limited fragments of Timed Regular Expressions (TRE). To our knowledge, this paper presents the first framework to tackle precise passive learning for an expressive timed logic—Metric Interval Temporal Logic (MITL)—without relying on predefined templates or restricted logic fragments. Our approach formally reduces the timed learning problem into a scalable untimed one. By identifying quantitative timing differences between positive and negative traces, we synthesise precise timed constraints and inject them as new Boolean atomic propositions. This embeds timing into the alphabet, delegating the complex formula evaluation to highly optimised, off-the-shelf untimed LTL tools. Crucially, our framework is complete, guaranteeing a separating specification can always be found. We evaluate our implementation across several benchmarks, demonstrating the effectiveness of our approach.

Index Terms—Metric Interval Temporal Logic, Specification Mining, Passive Learning, Feature Synthesis, Real-Time Systems.

I. INTRODUCTION

Formal specifications underpin the verification, runtime monitoring, and testing of real-time and cyber-physical systems (CPS). However, manually crafting these rigorous mathematical formulae is notoriously complex and prone to error. While recent advances in Large Language Models (LLMs) have begun to alleviate this bottleneck by translating natural language requirements into formal specifications (see, e.g., [43]), this approach still relies on the existence of clear, comprehensive textual comments or documentation. In many practical scenarios, engineers instead possess vast amounts of implicit behavioural data, such as execution traces, logs, and counterexamples. Specification mining (or ‘learning’) addresses the inverse problem: synthesising a mathematical model that directly captures the behaviours hidden within samples of labelled traces, namely the positive and negative trace sets, Ω+\Omega^{+} and Ω−\Omega^{-}, respectively.

For (untimed) Linear Temporal Logic (LTL), the mining problem is well studied. Methods such as [28], [6], [31] are implemented in tools that handle thousands of traces. However, in many practical applications—such as autonomous driving, medical monitoring, and industrial automation—system correctness depends not only on the logical order of events but also on the strict time bounds of their occurrences. To rigorously reason about these timing constraints, one must turn to timed logics such as Metric Interval Temporal Logic (MITL) [3], a quantitative extension of LTL with integer-bounded timing constraints. However, the learning problem for MITL is conceivably harder: constructing a consistent MITL formula requires choosing both a structure (nested operators, atomic propositions) and interval parameters.

A naïve attempt to reuse mature LTL learning tools is the simple ‘untiming’ reduction: for a timed word ω=(d1,σ1)⋯(dℓ,σℓ)\omega = (d_1, \sigma_1) \cdots (d_\ell, \sigma_\ell) over ΣAP=2AP\Sigma_{\mathrm{AP}} = 2^{\mathrm{AP}} (i.e. σi\sigma_i is a subset of atomic propositions AP for all i,1≤i≤ℓi, 1 \leq i \leq \ell, and did_i's denote the time delay before witnessing σi\sigma_i's), let μ(ω)=σ1⋯σℓ\mu(\omega) = \sigma_1 \cdots \sigma_\ell be the sequence obtained from ω\omega by removing the ‘delay’ component. We then feed {μ(ω):ω∈Ω+}\{\mu(\omega) : \omega \in \Omega^+\} and {μ(ω):ω∈Ω−}\{\mu(\omega) : \omega \in \Omega^-\} to an off-the-shelf LTL learner. This approach would not work, however, whenever a positive and a negative trace share an identical untimed projection, as obviously no LTL formula can distinguish between them. In this case, the two traces are said to be propositionally indistinguishable with respect to AP.

Example 1. Consider an EDF (Earliest Deadline First) scheduler with two tasks T1T_1, T2T_2 where TiT_i involves releasing a job (witnessed as pip_i) and its completion (witnessed as qiq_i). The trace ω+=(0,{p1})(3.5,{q1})(4,{p2})(8.2,{q2})\omega^+ = (0, \{p_1\})(3.5, \{q_1\})(4, \{p_2\})(8.2, \{q_2\}) records a successful release ( pip_i) and completion ( qiq_i) sequence, while the trace ω−=(0,{p1})(12.5,{q1})(4,{p2})(8.2,{q2})\omega^- = (0, \{p_1\})(12.5, \{q_1\})(4, \{p_2\})(8.2, \{q_2\}) records the same sequence of events but with T1T_1 completing after a delay of 12.5 time units, well past its deadline. The untimed projection of ω+\omega^+, ω−\omega^- are identical: μ(ω+)=μ(ω−)={p1}{q1}{p2}{q2}\mu(\omega^+) = \mu(\omega^-) = \{p_1\} \{q_1\} \{p_2\} \{q_2\}, and obviously no LTL formula over AP={p1,q1,p2,q2}AP = \{p_1, q_1, p_2, q_2\} distinguishes them.

Quantitative distinguishability. When two propositionally indistinguishable traces are nonetheless behaviourally distinct (i.e. one in Ω+\Omega^{+} and one in Ω−\Omega^{-}), their divergence is purely quantitative: some pair of event occurrences in the two traces differs in delay. We formalise this as a pivot—a tuple ((i,j),c)((i,j),c) such that one trace's inter-event delay between positions i and j is below the integer boundary c and the other's is above c. Pivots are easily computable certificates of quantitative distinguishability. The crux of our framework is that a formula such as F[0,c]p\mathbf{F}_{[0,c]}p or F[0,c]p\mathbf{F}_{[0,c]}p evaluated at the corresponding position can distinguish the two traces involved. When treated as a fresh proposition and added to the set of atomic propositions, this formula serves as a new feature and effectively restores propositional distinguishability.

The work of Khushraj Madnani was supported by the ANRF ARG-MATRICS Grant (File No. ANRF/ARGM/2025/003152/MTR) under the project titled “Approaching the Decidability Purlieu of Timed Languages (ADePT).”

From timed mining to untimed mining. The feature-engineering pass is guaranteed to make progress on every iteration. Once enough synthesised features have been injected into the set of atomic propositions, every positive-negative trace pair (ω+,ω−)(\omega^{+}, \omega^{-}) are propositionally distinguishable with respect to the updated (expanded) set of atomic propositions AP. At that point, the set of positive and negative traces can both be recasted onto the updated AP with delays discarded, and an untimed LTL learner applied with no further modification. The expressive power lost when discarding delays is recovered by the features the learner now sees in the set of atomic propositions. In other words, this reduction turns a hard timed mining problem into an easier untimed one.

Contributions. We make the following contributions.

  1. Formalisation of propositional indistinguishability (Section IV). We define propositional indistinguishability with respect to arbitrary subsets of atomic propositions, prove a structural characterisation of when a pair is quantitatively distinguishable but propositionally indistinguishable (Lemma 3), and reduce such cases to a finite collection of integer pivots.

  2. Subset-projection collision detection (Section IV-A). We give an algorithm that enumerates subsets of atomic propositions in order of decreasing size and identifies every propositionally indistinguishable trace pair together with all the pivots which explain how the two traces may be distinguished. The algorithm runs in O(2∣AP∣⋅N2⋅ℓ2)\mathcal{O}(2^{|\mathsf{AP}|} \cdot N^2 \cdot \ell^2) in the worst case (where NN is the number of traces in the larger of Ω+\Omega^+, Ω−\Omega^- and ℓ\ell is the length of the longest trace) but is highly effective in practice because most real-world specifications use small numbers of atomic propositions.

  3. Layered feature-synthesis framework (Sections IV-B and IV-C). We detail the successive phases of our translation pipeline: template injection, layered feature synthesis (formulated as a set-cover problem), and proposition minimisation. During feature synthesis, the engine primarily relies on standard MITL modalities ( FIF_I, FI←\overleftarrow{F_I}) to extract separating timing constraints. Where these prove insufficiently expressive, such as for complex counting patterns, we use Pnueli modalities ( PnJPn_J, PnJ←\overleftarrow{Pn_J}) as a fallback strategy. Furthermore, domain-specific template injection can be applied prior to synthesis, acting as a structural pre-filter to accelerate the resolution of known specification patterns.

  4. Soundness and completeness (Sec. V). We prove that the synthesised features suffice to make every (ω+,ω−)∈Ω+×Ω−(\omega^+, \omega^-) \in \Omega^+ \times \Omega^- propositionally distinguishable (Theorem 9), and that the framework is complete in the sense that we can generate an MITPPL formula that distinguishes (Ω+,Ω−)(\Omega^+, \Omega^-) if they can be distinguished by a timed automaton (Theorem 10).

  5. Implementation and evaluation (Sec. VI). We implement the framework in Python and evaluate it across three specific benchmark scenarios: (1) learning the behaviours of a simple timed automaton, (2) learning typical parameterised specification patterns used in the online monitoring of cyber-physical systems, and (3) learning to determine the precise timing constants within a train-gate controller. We demonstrate the feasibility and computational efficiency of our translation pipeline, contextualising our results against the performance of direct MTL mining and TRE synthesis reported in [32], [42], and explicitly evaluate the structural trade-off between solver scalability and out-of-sample generalisation.

Outline. Section II presents a motivating example. Section III collects preliminaries on timed words, MITL and MITPPL, untimed LTL learning, etc. Section IV formalises propositional indistinguishability and present the four phases of the process. Section V establishes the framework's correctness, progress, and complexity. Section VI reports the experimental evaluation. Sections VII and VIII discuss related work and conclude.

References (39)