Abstract
Runtime verification (RV) is a pragmatic and scalable, yet rigorous technique, to assess the correctness of complex systems, including cyber-physical systems (CPS). By measuring how robustly a CPS run satisfies a specification, RV allows in addition, to quantify the resiliency of a CPS to perturbations. In this paper we propose Algebraic Runtime Verification (ARV), a general, semantic framework for RV, which takes advantage of the monoidal structure of runs (w.r.t. concatenation) and the semiring structure of a specification automaton (w.r.t. choice and concatenation), to compute in an incremental and application specific fashion the resiliency measure. This allows us to expose the core aspects of RV, by developing an abstract monitoring algorithm, and to strengthen and unify the various qualitative and quantitative approaches to RV, by instantiating choice and concatenation with real-valued functions as dictated by the application. We demonstrate the power and effectiveness of our framework on two case studies from the automotive domain.
Introduction
Cyber-Physical Systems (CPS)—such as autonomous vehicles and medical devices—operate in continuous, unpredictable environments. Ensuring their safety requires Runtime Verification (RV), a process that checks whether a system's execution trace satisfies a given specification. Traditionally, these checks rely on the syntax of the logic used (e.g., Signal Temporal Logic). However, syntax-based approaches often suffer from inaccuracy—under-approximating robustness—and fragmentation, requiring entirely new algorithms for every new metric (e.g., spatial vs. temporal violations).
The Algebraic Runtime Verification (ARV) Framework
The authors introduce Algebraic Runtime Verification (ARV), a semantic framework that decouples the specification from the measurement logic. The core of ARV is the translation of specifications into Symbolic Weighted Automata (SWA).
As shown in the pipeline above, a regular specification is transformed into a symbolic automaton, which is then weighted to compute the distance between a trace and the specification. This process is governed by the choice of an underlying semiring.
Semirings as Measurement Engines
The flexibility of ARV stems from its use of different semirings to define the logic of the monitor. By swapping the semiring, users can change the nature of the verification without altering the underlying algorithm.
- Boolean Semiring: Yields a binary True/False verdict.
- MinMax Semiring: Computes robustness based on the "infinite norm," identifying the worst-case spatial violation.
- Tropical Semiring: Measures robustness via "Hamming distance," accumulating violations over time.
This algebraic approach allows for a unified "mathematical playground" where qualitative and quantitative verification coexist seamlessly.
Evaluation and Results
The framework was evaluated using two automotive benchmarks: an Autonomous Vehicle Control Stack (AVCS) and an Automatic Transmission System.
Key findings include:
- Precision: ARV outperformed industry-standard tools like Breach and S-TaLiRo. It correctly identified robustness margins in complex formulas where existing tools returned inconclusive results.
- Syntax Independence: Unlike syntax-based monitors, ARV ensures that semantically equivalent formulas yield identical robustness values.
- Consistency: Positive robustness scores were mathematically proven to always imply correct system behavior, ensuring reliability.
- Unsatisfiability Detection: ARV can identify "unsatisfiable" specifications—rules that can never be met—and assign them a robustness of negative infinity.
Limitations and Future Outlook
While powerful, the ARV framework faces the "state explosion problem," where complex formulas lead to an exponential increase in automaton states. Future research will focus on:
- Optimization: Integrating minimization techniques for symbolic automata to maintain lightweight monitors.
- Hardware Implementation: Leveraging the automaton structure for efficient execution on FPGAs and embedded systems.
- Probabilistic Extensions: Adapting the framework to handle non-idempotent semirings for probabilistic runtime verification.
By moving from syntax to semantics, ARV provides a robust, flexible foundation for the next generation of CPS monitoring tools.
Summary updated