Abstract
Formal verification of hybrid systems—which integrate continuous physical dynamics with discrete control logic—is a significant challenge due to the difficulty of finding global safety invariants. This paper introduces "Forward Invariant Cuts," a novel proof rule for differential dynamic logic ($dL$) implemented in the KeYmaera theorem prover. By allowing designers to decompose a global safety property into local, mode-specific invariants, this approach simplifies complex proofs and enables the integration of numerical tools like Lyapunov function discovery. We demonstrate the effectiveness of this method on several benchmarks, including a high-fidelity automotive powertrain control model.
The Challenge of Global Invariants
Formal verification tools like KeYmaera use differential dynamic logic to prove that a system, such as an autonomous vehicle or medical device, will never enter an unsafe state. Traditionally, this requires finding a "global safety certificate"—a single mathematical formula that describes the safe operating region across all discrete modes of the system.
However, finding such a global invariant is often an undecidable problem. System designers frequently possess strong "local" intuition about specific modes (e.g., "this mode is stable due to a specific Lyapunov function"), but theorem provers have historically struggled to integrate these fragmented insights into a unified global proof. This creates a complexity gap that limits the verification of non-linear systems or those with numerous switching modes.
Methods: The Forward Invariant Cut Rule
The authors address this by introducing the Forward Invariant Cut, a new inference rule that acts as a logical lemma. It allows a user to propose a local predicate $C$ (a "local invariant") and "cut" the behaviors associated with $C$ out of the main proof.
To apply this rule, three obligations must be met:
- Invariance: Once the system enters region $C$, it must stay there.
- Safety of $C$: Region $C$ must be entirely contained within the safe set.
- Safety of $\neg C$: The system must be proven safe even when it is not in region $C$.
This approach enables lazy construction of certificates; designers can carve out safe chunks of the state space one by one rather than solving the entire system at once. To make this practical, the authors combine KeYmaera with numerical optimization (Sum-of-Squares) for discovering candidate invariants and the dReal SMT solver to verify them against non-linear real arithmetic.
Evaluation and Key Results
The method was evaluated on three increasingly complex models:
- Synthetic Running Example: A multi-mode system used to demonstrate the basic logic of the cut rule.
- Non-autonomous Switched System: A classic challenge where switching between individually stable controllers can lead to global instability.
- Automotive Powertrain Control: A high-fidelity benchmark involving complex non-linear ODEs for an engine's air-to-fuel (A/F) ratio controller.
In the powertrain benchmark, the authors successfully proved that the A/F ratio stays within 10% of its optimal setpoint, even during sensor recovery periods—a known "challenge problem" in the community. Furthermore, in the switched system example, the use of local invariants allowed KeYmaera to automatically handle complex "forward image" calculations that typically require intense manual intervention.
Insights and Future Directions
The core insight of this work is that a safety certificate does not need to contain the starting state to be useful. If a specific mode can be proven to be a "trap" that remains safe, the rest of the proof is simplified by assuming the system is outside that trap. This provides a rigorous bridge to import results from control theory, such as Lyapunov functions, into high-assurance theorem provers.
While the cut rule significantly simplifies proofs, it still requires manual guidance to decide where to apply cuts. Future work aims to explore "bounded-time" invariants and automated methods for identifying sets that the system passes through safely without necessarily remaining in them indefinitely.
Summary updated