Engineers often search long, timestamped logs from cars, medical devices or controllers for timing patterns whose deadlines are unknown. A typical question is "what is the largest delay $p$ for which a gear shift is followed by an over-speed event within $p$ seconds?" Tools for these questions use skipping, an idea borrowed from fast text search: once the search engine proves that no match can start in a stretch of the log, it jumps past that stretch without reading it. The current parametric tool picks its jump distances once, before reading the log, and assumes the most pessimistic value of every unknown parameter. The query, however, often makes most parameter values irrelevant after the first few matches. Once a match with $p = 5$ has been found, a maximization query only cares about matches with $p > 5$. A query asking "for which deadlines does this pattern never occur" can drop every value that some match has already ruled out.
We propose a matcher whose jump distances depend on the parameter values that are still undecided. Before reading the log, it computes skip tables that are piecewise functions of the parameters. While scanning, it looks up the jump that is safe for the current undecided region, so jumps grow as that region shrinks. This applies to both kinds of jump: those triggered by a mismatch at the start of the search window and those triggered by a mismatch at its end. The claim is that, for optimization and safety-synthesis queries, this reads far fewer log events than static parametric skipping, while returning exactly the same answer.
Background and Gap
A timed word is a sequence of event symbols, each carrying a real-valued timestamp. A pattern is written as a timed automaton, a finite-state machine with real-valued clocks whose transitions are guarded by clock constraints. A parametric timed automaton lets those constraints mention unknown parameters, as in $x \le p$. Parametric timed pattern matching asks for every combination of match start time, match end time and parameter values for which the pattern matches. Offline timed pattern matching under uncertainty defined this problem, showed it is decidable over finite logs, and solved it by encoding the log as an automaton and running the parametric model checker IMITATOR. That paper motivates our work: it reads every event and names skipping as future work. Online Parametric Timed Pattern Matching with Automata-Based Skipping and its journal version Parametric Timed Pattern Matching supply the method we build on. Their tool, ParamMONAA, uses prefix-based (Knuth-Morris-Pratt-style) and next-character (Quick Search-style) jumps. It precomputes those jumps conservatively over the whole parameter space and has an "Optimal" mode that keeps only the minimum or maximum parameter values.
On the non-parametric side, Efficient Online Timed Pattern Matching by Automata-Based Skipping and the tool MONAA combine prefix and suffix jumps in the style of the Franek-Jennings-Smyth string matcher. They do this over zones, which are convex sets of clock constraints that finitely abstract the infinite clock space. The combination is reported to be twice as fast as suffix-only skipping. The missing piece is any link between the parameter knowledge that ParamMONAA accumulates at run time and the jumps it takes. Its jumps are fixed for the worst-case valuation even when the query has already discarded that valuation.
Core Claim
Let $s_v(q,a)$ be the safe concrete jump that a MONAA-style table gives for valuation $v$, matcher state $q$ and the next symbol $a$. Let $D_k$ be the set of parameter valuations still undecided for the query after $k$ events. We define the query-aware jump as
$$ s(q,a,D_k) \;=\; \min_{v \in D_k} s_v(q,a). $$
This jump is sound, meaning it never skips an answer the query needs. The reason is that any match it skips can only involve valuations outside $D_k$, and the query has already decided those valuations. Static ParamMONAA corresponds to fixing $D_k$ as the initial domain $D_0$.
The technical bet is that $s_v$ is piecewise constant in $v$ over finitely many polyhedral cells. For a given jump length, the set of valuations under which a pattern run of that length is feasible is a projection of a polyhedron. Jump lengths are also bounded by the shortest pattern run, so only finitely many lengths matter. If the bet holds, the cells and their jump values can be precomputed once. At run time the jump is then the minimum over the cells that intersect $D_k$, which is a cheap polyhedral intersection test rather than a new synthesis.
We will prove the finiteness claim for patterns in which every parameter acts only as a lower bound or only as an upper bound (the L/U subclass). Parametric Timed Model Checking for Guaranteeing Timed Opacity uses this subclass's monotonicity for decidability. For general patterns we will treat finiteness as a conjecture and fall back to a sound over-approximation of the cell partition.
The approach has a clear limit. For the full problem, which returns all matches, $D_k$ never shrinks and the method reduces to static skipping. We treat that case as a control.
Research Program
The work has three parts.
The first is the construction. We will lift MONAA's two skip functions to the parametric setting, so that each table entry is a list of (polyhedral cell, jump) pairs. One function is triggered by the symbol just past the window. The other is triggered by a partial prefix match. Both are computed by parametric zone exploration of the pattern alone, independent of the log. A side product is the first fully two-ended jump scheme for parametric patterns, which addresses the gap left by ParamMONAA's head-only jumps.
The second is query-specific maintenance of $D_k$. For maximization or minimization, $D_k$ is the half-space beyond the best value found so far. For "never-match" safety synthesis, $D_k$ is the original domain minus the projections of all matches found so far, kept as a union of convex polyhedra and periodically over-approximated by its convex hull to keep lookups cheap. Using the hull is still sound because the hull contains $D_k$, so the minimum is taken over a larger set and can only give a shorter jump.
The third is analysis. We will prove soundness and exactness against the offline IMITATOR encoding. We will also characterize when the jumps provably grow; we expect this to happen when the extremal valuations that limit the static jump are eliminated early in the log.
Baselines
Do-nothing reference. The naive reference is the offline IMITATOR pipeline of Offline timed pattern matching under uncertainty, together with its PTPM_opt variant for extremal queries. It reads every event and fixes the correct output we compare against.
Strongest existing method. The strongest competitor is ParamMONAA in its Optimal mode, from Online Parametric Timed Pattern Matching with Automata-Based Skipping. It already skips, already tracks extremal values, and is the only parametric matcher with skipping. On GEAR with 14,000 events it is reported at under 0.4 seconds, against roughly 18 seconds for IMITATOR, in that paper. The journal version reports under a second against nearly 20 seconds. We will run the released ParamMONAA and our implementation on the same machine, logs, patterns and parameter domains, single-threaded, with five repetitions. Neither tool gets per-benchmark tuning. To beat it, we must cut the number of events inspected and the wall-clock time on extremal and safety queries, with identical output polyhedra and memory no worse than ParamMONAA's.
Isolating ablations. Two ablations isolate the key ingredient. The first, frozen, uses the piecewise tables but always looks up $D_0$; it separates the effect of two-ended jumps from the effect of run-time refinement. The second, recompute-on-shrink, keeps ParamMONAA's static construction but reruns it whenever $D_k$ shrinks by more than a set fraction. It tests whether precomputing the cells is necessary at all.
Why not just…?
Why not just run IMITATOR on the encoded log? Published numbers already settle this for extremal queries. On BLOWUP with a 1,000-event log, the standard algorithm took over 15 minutes, while PTPM_opt took 1.2 seconds (Offline timed pattern matching under uncertainty). IMITATOR also restarts its search at the next event after every mismatch. We keep it only as the reference for correct output.
Why not just grid the parameter or binary-search it with fast concrete MONAA? This is a real threat. MONAA processes 1.7 million events in 1.07 to 4.5 seconds (MONAA). For a single parameter in the L/U subclass, existence of a match is monotone in $p$, so binary search needs about $\log_2(1/\epsilon)$ MONAA runs to reach precision $\epsilon$. That may beat any symbolic method. We will run exactly this baseline at matched precision. We expect it to lose on two fronts. One is multi-parameter domains, where gridding grows exponentially with the number of parameters. The other is safety synthesis, whose answer is a non-convex region that bisection cannot recover exactly. If binary search wins on single-parameter extremal queries, we will say so and narrow our claim to the cases where it fails.
Why not just recompute ParamMONAA's static tables whenever the domain shrinks? This could match our approach if shrink events are rare and table construction is cheap. Precomputed cells pay off only when refinement is frequent or construction is expensive. The recompute-on-shrink ablation measures this directly. If it ties, the contribution is the query-aware soundness argument rather than the cell data structure, and we will report it that way.
Proposed Experiments
Benchmarks. We will use GEAR and ACCEL, both automotive transmission logs, scaled from the published 25,000 events up to the 1.7-million-entry transmission logs used by MONAA. We will also use BLOWUP as the stress case for growth in the number of polyhedra. ACCEL has no reported timing on Lacuna beyond "scaled linearly with log length". For each benchmark we pose three queries over the same pattern: maximize a deadline, synthesize never-match valuations over two or three parameters, and full matching.
Metrics. We measure the fraction of events inspected, wall-clock time, peak memory, and exact equality of the output with IMITATOR's.
Decisive checks. The first decisive check is ablation order. The fraction of events inspected should fall from ParamMONAA to frozen to query-aware on extremal and safety queries. Full matching should show no difference between frozen and query-aware, which confirms that the gain comes from the query and not from implementation artifacts. The second check is a crossover analysis against binary-searched MONAA as the number of parameters goes from one to three. The third check is a deliberate worst case: a log whose limiting valuations survive until the end. On that log we predict the advantage of query-aware skipping disappears, and observing this would confirm the mechanism.
References
- Offline Timed Pattern Matching under Uncertainty
- Online Parametric Timed Pattern Matching with Automata-Based Skipping
- Parametric Timed Pattern Matching
- Efficient Online Timed Pattern Matching by Automata-Based Skipping
- MONAA: A Tool for Timed Pattern Matching with Automata-Based Acceleration
- Parametric Timed Model Checking for Guaranteeing Timed Opacity