RVHyper: A Runtime Verification Tool for Temporal Hyperproperties

Bernd Finkbeiner, Christopher Hahn, Marvin Stenger, Leander Tentrup

TL;DR

This paper introduces RVHyper, a novel runtime verification tool designed to check complex properties called "hyperproperties" that relate multiple system execution traces. By employing clever trace and specification analysis techniques, RVHyper efficiently detects violations of these properties, providing valuable counterexamples for debugging, particularly in hardware design.

What Problem Does This Paper Address?

Ensuring the correctness of complex systems often involves verifying properties that go beyond checking individual execution paths. "Hyperproperties" are a class of such properties that relate multiple execution traces to each other. Examples include security properties like non-interference (ensuring one user's actions don't reveal information to another) and observational determinism (ensuring two executions that are indistinguishable to an observer produce the same output).

While formalisms like HyperLTL exist to express these properties, and model checking tools can verify them, runtime verification (RV) tools for hyperproperties have been lacking. RV is crucial when the system's internal workings are inaccessible or when dealing with systems that are already deployed. The challenge with hyperproperties in RV is that a monitor needs to potentially store and compare all previously observed traces with new ones, leading to unbounded memory consumption. This paper addresses the need for a practical RV tool for hyperproperties and tackles the inherent scalability and memory challenges.

Methods

RVHyper tackles the problem of monitoring hyperproperties at runtime through two key optimizations:

  • Trace Analysis (Minimizing Trace Storage): This technique aims to reduce the amount of memory needed to store past traces. It identifies "redundant" traces – traces that, if discarded, wouldn't affect whether a hyperproperty is satisfied or violated. The core idea is to check if a new trace t is "dominated" by an existing trace t', meaning t' contains at least as much information as t with respect to the hyperproperty. This allows RVHyper to maintain a minimal set of traces necessary for verification.
  • Specification Analysis (Decreasing Running Time): This is a preprocessing step that analyzes the HyperLTL specification itself. RVHyper checks for properties like symmetry, transitivity, and reflexivity in the specification. For instance, if a property is symmetric, the number of monitors needed can be halved. This analysis helps reduce the computational overhead during runtime monitoring.

The overall monitoring process involves constructing a "monitor-template" from the HyperLTL formula. This template is then instantiated for combinations of traces. If any instantiation detects a violation, RVHyper returns a counterexample (a tuple of traces).

Datasets

Not discussed in the paper. The paper uses traces generated from Verilog descriptions of hardware circuits for evaluation.

Key Insights and Ideas

  • Hyperproperties are more than just trace properties: The fundamental insight is that properties relating multiple traces are distinct and require specialized verification techniques, especially at runtime.
  • Runtime verification of hyperproperties is feasible: Despite the theoretical challenges of unbounded memory, RVHyper demonstrates that practical RV for hyperproperties is achievable through intelligent optimizations.
  • Trace redundancy is a key to scalability: Identifying and discarding redundant traces is crucial for managing the memory footprint of hyperproperty monitors.
  • Specification analysis can significantly speed up monitoring: Exploiting the structure of the hyperproperty itself (e.g., symmetry) can lead to substantial performance gains by reducing the number of monitors.
  • RVHyper is applicable beyond security: The paper showcases its utility in detecting spurious dependencies in hardware designs, demonstrating its broader applicability.

Key Results

RVHyper was evaluated on several hardware design examples (XOR, MUX, counter). The results, summarized in Table 1, show that RVHyper can scale to handle thousands of input traces with millions of monitor instantiations.

  • For instances where the hyperproperty was satisfied (XOR and MUX2), RVHyper did not find any violations.
  • For instances where violations were expected (counter), RVHyper successfully identified counterexamples.
  • The optimizations (trace analysis and specification analysis) were highlighted as key factors enabling this scalability. For example, the counter instances, which are more complex, required more traces to find a violating pair, but RVHyper still managed to process them efficiently.

Limitations and Future Work

  • Limitations: The paper doesn't explicitly detail limitations of RVHyper itself, but the inherent complexity of hyperproperties means that extremely large or complex specifications might still pose challenges. The performance is dependent on the efficiency of the underlying BDD library (Buddy) and the HyperLTL satisfiability solver (EAHyper).
  • Future Work: The paper suggests that RVHyper complements existing model checking and satisfiability checking tools for HyperLTL. Its utility during the development of HyperLTL specifications is also emphasized, allowing users to refine formulas based on sample trace feedback. Future work could involve exploring more advanced trace analysis techniques or extending RVHyper to support other temporal logics for hyperproperties.

Summary updated

BibTeX
@inproceedings{finkbeiner2018rvhyper,
  author = {Bernd Finkbeiner and Christopher Hahn and Marvin Stenger and Leander Tentrup},
  title = {{RVHyper: A Runtime Verification Tool for Temporal Hyperproperties}},
  booktitle = {TACAS},
  year = {2018},
  doi = {10.1007/978-3-319-89963-3\_11},
}
Figure