Introduction
Reactive systems are increasingly defined by hyperproperties, which describe relationships between multiple execution traces rather than properties of a single trace. A prominent example is non-interference in security, where a system's observable behavior must remain indistinguishable regardless of secret inputs. Formally, these properties often involve an alternation of quantifiers, such as $\forall \tau_1 \exists \tau_2 . \psi$, asserting that for every possible execution $\tau_1$, there exists a corresponding execution $\tau_2$ satisfying a relational specification $\psi$.
While model checking can verify these properties for finite-state systems, deductive verification for general, infinite-state programs remains a significant challenge. Traditional methods often require the human prover to provide a complete "witness" or strategy for choosing $\tau_2$ at the start of the proof, which is often impractical for complex software.
The Challenge of Hyperliveness
The difficulty in proving hyperliveness lies in the "alternation" of quantifiers and the branching structure of systems.
As illustrated in Figure 1, the timing of nondeterministic choices can prevent simple step-by-step simulation. In $TS_1$, the choice between a future of 'b's or 'c's is made immediately at the first 'a' transition. In $TS_2$, the system transitions to a state $s_1$ that can perform either 'b' or 'c' at any time. Proving a property like $\forall \tau_2 \in TS_2, \exists \tau_1 \in TS_1$ requires "looking into the future" to see which path $TS_2$ will take before $TS_1$ can make its initial choice. This highlights the need for sophisticated reasoning techniques beyond standard simulation.
The HyCo Framework
To address these challenges, the authors introduce HyCo, a mechanized framework for the Coq proof assistant. HyCo leverages parameterized coinduction to allow for incremental proof construction.
Coinductive Relations and Incremental Reasoning
HyCo defines a relation fe (forall-exists) that soundly approximates the $\forall \exists$ pattern over infinite traces. By using a modern flavor of coinduction known as GPACO, the framework allows developers to build proofs step-by-step. Instead of defining a global witness function upfront, a user can match a transition in the universal execution with one in the existential execution and add this pair to their coinductive hypothesis on the fly. This "incremental witness construction" is a key innovation of the framework.
Temporal Logic via Derivatives
To handle specifications in temporal logic (like HyperLTL), HyCo utilizes the concept of derivatives. A derivative $\Delta(\psi)$ represents the requirements that must hold in the future based on current events. This allows the proof to "unroll" the specification alongside the program's execution steps, maintaining synchronization between the code and its requirements.
Formal Foundations and Soundness
The soundness of HyCo is formally verified in Coq. A key technical achievement is the use of the Axiom of Functional Choice to extract a concrete witness function from a completed coinductive proof. This effectively transforms the interactive proof into a winning strategy for the "existential player" in a game-theoretic sense.
Figure 2 shows a simpler nondeterministic system where such strategies can be applied. In HyCo, if a system like the one in Figure 2 is part of a relational property, the user can interactively decide which branch ($s_1$ or $s_2$) to take to satisfy the existential requirement using specialized Coq tactics such as hyco_step and hyco_deriv.
Evaluation and Key Results
The authors evaluated HyCo by verifying several representative examples in Coq, demonstrating its language-agnostic nature:
- Echo Servers: Proving that the output of one server consistently relates to the input of another (e.g., doubling the input).
- Nondeterministic Programs: Verifying systems where existential choices must resolve nondeterminism to satisfy relational properties.
- IMPio: A small imperative language with I/O and nondeterminism used to demonstrate HyCo's applicability to actual source code.
The framework provides a set of automation tactics (hyco_step, hyco_deriv, hyco_cycle) that streamline the process of coinductive reasoning, making it feel more like standard imperative program verification.
Conclusion and Future Work
HyCo provides a powerful foundation for verifying complex hyperproperties. By shifting from global witness functions to incremental coinductive reasoning, it makes the verification of hyperliveness more accessible.
Future work includes addressing the current limitation regarding "future-dependent" choices through the addition of prophecy variables. Additionally, the authors aim to integrate automated solvers to reduce the manual effort in finding existential witnesses and to extend the framework to more complex models like Interaction Trees (ITrees).
Summary updated