Introduction
In modern engineering fields such as automotive systems and medical device monitoring, systems generate massive volumes of "timed words"—event logs where every entry is paired with a precise timestamp. A critical task for engineers is timed pattern matching: determining if these logs satisfy specific temporal requirements, such as ensuring a gear shift occurs within a strict two-second window following an RPM spike.
As shown in the figure above, timed pattern matching involves checking a sequence of events against a pattern defined by a Timed Automaton. However, as logs grow to millions of events, brute-force checking every possible time interval becomes computationally prohibitive. Furthermore, real-time embedded systems require "online" processing—analyzing data as it arrives with minimal memory overhead.
Methodology: Adapting FJS for Timed Systems
This research introduces a high-performance algorithm that adapts the Franek-Jennings-Smyth (FJS) string-matching algorithm for timed systems. FJS is a hybrid approach that combines the strengths of the Boyer-Moore algorithm (which skips based on the tail of a pattern) and the Knuth-Morris-Pratt algorithm (which skips based on the head).
To apply this to timed automata, the researchers utilized several advanced techniques:
- Zone-Based Abstraction: Because timed automata involve continuous clock variables, their state space is technically infinite. The authors use "zones" (polyhedral representations of clock constraints) to abstract the timed automaton into a finite Nondeterministic Finite Automaton (NFA). This makes the state space manageable for pre-computation.
- Automata-Based Skipping: Instead of matching a static string, the algorithm matches languages defined by these zone-based automata.
- Pre-computed Skip Values: The core of the efficiency lies in two skip functions, $\Delta$ (Quick Search-type) and $\beta$ (KMP-type). By analyzing the zone automaton beforehand, the algorithm determines exactly how many events it can safely "jump over" when a mismatch occurs.
As illustrated in the skipping mechanism above, the algorithm uses these pre-computed values to shift the search window forward significantly without the risk of missing a potential match. This "Aha!" moment—realizing that even in a timed setting, most events do not need to be inspected—is what drives the performance gains.
Performance and Results
The algorithm was evaluated against realistic automotive benchmarks (e.g., torque monitoring and gear shifting) and synthetic benchmarks designed to test complex temporal logic patterns.
Key results include:
- Speed: The FJS-type algorithm is generally twice as fast as previous Boyer-Moore-type implementations on realistic benchmarks. In online scenarios, it outperformed the tool Montre by a factor of roughly 250.
- Memory Efficiency: Unlike previous methods that required buffering large amounts of data to look "ahead" at the tail of a pattern, the FJS approach maintains near-constant memory consumption. This makes it uniquely suited for resource-constrained embedded hardware.
- Scalability: Execution time was found to grow linearly with the length of the input log, ensuring the algorithm can handle long-term monitoring tasks.
Conclusion and Future Work
By combining string-matching heuristics with formal verification techniques like zone abstraction, this research provides a robust framework for high-speed online monitoring. While the current implementation requires hardcoding patterns into C++, future work aims to develop a user-friendly parser for arbitrary timed automata and to deploy the system on actual embedded boards to test performance in real-world hardware environments.
Summary updated