Abstract
We study the runtime verification of hyperproperties, expressed in the temporal logic HyperLTL, as a means to inspect a system with respect to security polices. Runtime monitors for hyperproperties analyze trace logs that are organized by common prefixes in the form of a tree-shaped Kripke structure, or are organized both by common prefixes and by common suffixes in the form of an acyclic Kripke structure. Unlike runtime verification techniques for trace properties, where the monitor tracks the state of the specification but usually does not need to store traces, a monitor for hyperproperties repeatedly model checks the growing Kripke structure. This calls for a rigorous complexity analysis of the model checking problem over tree-shaped and acyclic Kripke structures. We show that for trees, the complexity in the size of the Kripke structure is L-complete independently of the number of quantifier alternations in the HyperLTL formula. For acyclic Kripke structures, the complexity is PSPACE-complete (in the level of the polynomial hierarchy that corresponds to the number of quantifier alternations). The combined complexity in the size of the Kripke structure and the length of the HyperLTL formula is PSPACE-complete for both trees and acyclic Kripke structures, and is as low as NC for the relevant case of trees and alternation-free HyperLTL formulas. Thus, the size and shape of both the Kripke structure and the formula have significant impact on the complexity of the model checking problem.
Introduction
Standard runtime monitoring focuses on trace properties, which can be checked by observing a single execution at a time (e.g., "does the system ever reach an error state?"). However, many critical security policies are hyperproperties: they define how sets of traces relate to one another. For example, observational determinism requires that if two executions have the same public inputs, they must produce the same public outputs. Monitoring these requires storing a log of observed traces and repeatedly checking the entire log against a specification as new traces arrive. While general HyperLTL verification is known to be "non-elementary," this paper investigates whether monitoring is feasible when traces are organized into space-efficient structures.
Representing Trace Logs
To manage the growth of trace logs, monitors can organize data into structures that share common elements. The authors analyze two primary types of Kripke structures used to represent these logs:
- Tree-shaped structures: Where traces are merged based on common prefixes.
- Acyclic structures: Where traces are merged based on both common prefixes and common suffixes.
Complexity Analysis and Key Results
The study distinguishes between System Complexity (how the cost scales with the size of the trace log for a fixed formula) and Combined Complexity (how the cost scales with both the log size and the length of the HyperLTL formula). System complexity is the most critical metric for runtime monitoring as logs grow massive over time.
A major finding is the "shape jump" in complexity between these structures. For tree-shaped structures, the system complexity is L-complete (logarithmic space) regardless of the number of quantifier alternations in the formula. This suggests high efficiency and low memory overhead for prefix-sharing logs. However, moving to acyclic structures causes a jump to PSPACE-complete because acyclic graphs allow for a "repeated-diamonds" structure that can encode complex logic more densely.
Importantly, the research shows that monitoring is significantly easier than static verification. While general HyperLTL verification is non-elementary, monitoring over these trace logs never exceeds PSPACE. Furthermore, for the "alternation-free" fragment of HyperLTL on tree-shaped logs, the problem is in NC, indicating high potential for parallel processing.
Conclusion
This research demonstrates that monitoring hyperproperties is a practical reality when trace logs are structured efficiently. The L-completeness result for trees implies that a monitor's memory needs only grow logarithmically relative to the total length of the traces. Future work may explore "flat graphs" as a middle ground, develop incremental monitoring algorithms to reuse results as logs grow, and extend the analysis to more expressive logics like HyperCTL* or first-order extensions.
Summary updated