Constructive Hybrid Games

Rose Bohrer, André Platzer

Abstract

Hybrid games combine discrete, continuous, and adversarial dynamics. While classical Differential Game Logic ($dGL$) enables proving the existence of winning strategies, these proofs are often non-constructive. We introduce Constructive Differential Game Logic (CdGL) for hybrid games, where proofs that a player can win a game correspond directly to computable winning strategies. This constitutes a logical foundation for the synthesis of correct control and monitoring code for safety-critical cyber-physical systems. Our contributions include novel semantics as well as proofs of soundness and consistency.

Introduction

In safety-critical Cyber-Physical Systems (CPS)—such as autonomous vehicles, medical robotics, or industrial drones—software must navigate three distinct layers of complexity: discrete logic (software control), continuous physics (differential equations), and adversarial uncertainty (environmental disturbances). While existing frameworks like Differential Game Logic ($dGL$) can prove that a "winning strategy" for safety exists, these proofs are often non-constructive. In classical logic, proving existence does not necessarily provide a method to compute the solution, making it impossible to directly translate such proofs into executable code for microcontrollers.

Presented at IJCAR 2020, this work introduces Constructive Differential Game Logic (CdGL). By applying the Curry-Howard correspondence to hybrid games, the authors ensure that a proof of a winning strategy is a computable program that can be directly synthesized into control code.

Methodology: Bridging Logic and Computation

The core of $CdGL$ lies in merging hybrid systems theory with constructive logic. The authors employ several key techniques to ensure mathematical rigor and computability:

  • Curry-Howard Correspondence: Formulas are treated as types, and proofs as programs. In $CdGL$, a proof that "Player Angel can win game $\alpha$" inherently contains the algorithm for that winning strategy.
  • Constructive Real Analysis: Standard floating-point arithmetic is insufficient for formal safety proofs. $CdGL$ uses Bishop-style real analysis, treating real numbers as computable entities (Type-2 computability). This ensures that operations are mathematically sound and computable to any required precision.
  • Type-Theoretic Semantics: The logic is interpreted into a Calculus of Inductive and Coinductive Constructions (CIC), providing a foundation compatible with proof assistants like Coq.
  • Operational Semantics: A play function defines how strategies for opposing players (Angel vs. Demon) interact, serving as a high-level interpreter for game execution.

Key Insights: Safe Envelopes and Computability

A significant challenge in constructive mathematics is that comparing two real numbers for exact equality is undecidable. However, functions like $\min(f, g)$ and $\max(f, g)$ remain computable. $CdGL$ leverages this to construct "safe envelopes"—regions of the state space where the controller is guaranteed to remain safe despite adversarial environmental moves.

Figure 2: A safe velocity envelope for 1D driving control, illustrating computable bounds in CdGL.

As shown in Figure 2, the logic can define a range of safe velocities ($v$) relative to position ($x$). The shaded region represents the "safe envelope" where the system can operate. Even when an opponent (the environment) chooses the sampling rate or timing of control loops ("Demonic" timing), the "Angel" (the controller) remains robust.

Case Study: 1D Driving Control

The paper evaluates $CdGL$ using a 1D driving control benchmark. In this scenario, a vehicle must reach a goal position while maintaining a safe velocity and avoiding collisions. Unlike classical methods that might produce non-computable results for edge cases, $CdGL$ successfully models this car-following scenario. It proves that the controller can reach its goal while maintaining safety, even when the environment dictates when the control loop runs.

Results and Logical Foundations

The authors establish several critical properties for $CdGL$:

  • Soundness and Consistency: The logic is proven to be sound (valid proofs correspond to true statements in the model) and consistent (it is impossible to prove that both players win the same game).
  • Extraction Algorithm: Because the soundness proof is constructive, it functions as an algorithm to extract executable programs from $CdGL$ proofs.
  • Reach-Avoid Specifications: The framework handles complex "reach-avoid" properties, proving that a system will reach a target state while avoiding all unsafe states throughout its trajectory.

Limitations and Future Outlook

While $CdGL$ provides a robust theoretical foundation, several areas remain for future development:

  • Mechanization: Currently, the proofs are manual. The authors aim to fully mechanize these results in proof assistants like Coq or Lean to achieve the highest level of formal assurance.
  • Automation: Due to the high expressivity of the logic, synthesis is undecidable and will likely require interactive proof sessions rather than fully automated "push-button" solutions.
  • Zeno Behaviors: Handling "Zeno" strategies—where moves become infinitely frequent, effectively stopping time—requires more nuanced treatment in a constructive setting.

Conclusion

$CdGL$ represents a significant step toward the automated synthesis of provably correct control code. By ensuring that safety proofs are inherently computable, it bridges the gap between high-level mathematical verification and the low-level execution required for modern cyber-physical systems.

Summary updated

BibTeX
@inproceedings{bohrer2020constructive,
  author = {Rose Bohrer and André Platzer},
  title = {{Constructive Hybrid Games}},
  booktitle = {IJCAR},
  year = {2020},
  url = {https://openreview.net/forum?id=_ISBDUP0Tl},
}
Figure