Abstract
Runtime verification of hyperproperties, such as non-interference and observational determinism, is essential for ensuring system security and correctness. However, monitoring these properties often involves comparing multiple execution traces, leading to a combinatorial explosion in computational and memory requirements. This paper presents an optimized version of RVHyper, a tool that introduces a novel trace storage technique based on prefix trees (tries). By sharing the computation of common prefixes across different traces, RVHyper significantly reduces redundant processing, achieving performance improvements of several orders of magnitude over traditional approaches.
Introduction
Most runtime monitoring tools analyze a single execution trace in isolation to detect property violations. In contrast, hyperproperties define relationships between sets of traces. For example, Non-interference requires that a system's public outputs remain invariant regardless of changes to secret inputs. To verify such a property, a monitor must compare a new execution trace against all previously observed traces.
This requirement leads to a "combinatorial explosion": if a system has $n$ traces and a property compares pairs, the monitor must perform $n^2$ comparisons. Storing every trace independently and re-processing shared prefixes for every comparison quickly exhausts system resources, making real-time monitoring of complex systems nearly impossible.
Hyperproperty Monitoring with RVHyper
RVHyper is an automata-based monitor for HyperLTL, a temporal logic that allows quantification over traces. The tool translates HyperLTL specifications into monitor automata that track the state of the system across multiple trace instances.
As shown in the figure above, the monitor transitions between states based on the equality or inequality of inputs ($i$) and outputs ($o$) across different traces (denoted by $\pi$ and $\pi'$). The state $q_\top$ represents an accepting state (property satisfied), while $q_\perp$ represents a violation.
Optimization via Prefix Trees (Tries)
The primary innovation of this work is the use of prefix trees (tries) to store and process traces. In real-world systems, execution traces often share long initial sequences due to common initialization routines or similar execution paths. Instead of treating traces as independent lists, RVHyper stores them in a trie structure.
By maintaining the monitor state at the nodes of the trie, the tool processes the shared part of the traces only once. The computation only "branches" when the traces themselves diverge. This approach transforms the memory and computational burden from a redundant list-based model to an efficient tree-based model where "partial equality" is handled elegantly.
In addition to tries, RVHyper employs two other optimization strategies:
- Specification Analysis: Using the EAHyper solver to identify mathematical properties like symmetry, transitivity, and reflexivity in the HyperLTL formula to skip redundant comparisons.
- Trace Analysis: Pruning traces that do not add new information to the monitoring process based on language inclusion checks.
Evaluation and Key Results
The authors evaluated RVHyper across several benchmarks, including information-flow security, error-correcting codes, and hardware design (e.g., the Bakery Protocol and black-box circuits).
- Massive Speedups: In non-interference benchmarks with 64-bit inputs, the optimized RVHyper completed monitoring in 7.5 seconds, whereas naive approaches were entirely impractical.
- Instance Reduction: The trie-based approach drastically reduced the number of active monitor instances. In one benchmark, instances dropped from nearly 2 million to just 248.
- Stability: Unlike previous trace analysis methods that could introduce significant overhead, the trie-based optimization provided consistent, stable improvements across all tested domains.
Conclusion
By combining high-level logical analysis of specifications with low-level data structure optimizations like prefix trees, RVHyper enables efficient runtime verification of complex hyperproperties. Future work aims to integrate trace pruning logic more deeply with the trie structure and refine the "online" version of the algorithm for traces that grow indefinitely.
Summary updated