Introduction
In the world of autonomous systems—think self-driving cars, medical robots, or smart power grids—safety isn't just a feature; it’s a requirement. However, guaranteeing safety in "hybrid systems" that mix continuous physics with discrete logic is a significant challenge. Uppaal Coshy is a tool designed to automatically synthesize compact "shields" to keep these complex systems within safe boundaries.
Problem Statement: Safety in Continuous Spaces
Hybrid systems involve continuous variables (like velocity or temperature) alongside discrete events (like flipping a switch). Mathematically, determining if such a system will reach an unsafe state is often undecidable. Existing shielding techniques—which act as a safety layer overriding dangerous commands—often struggle with continuous spaces, producing massive lookup tables (grids) too large for embedded deployment. Uppaal Coshy addresses this by creating fully automatic and memory-efficient safety strategies.
Methodology: The Synthesis Workflow
Uppaal Coshy is an extension of the Uppaal model-checking framework. Its workflow consists of three primary stages: partitioning, simulation-based synthesis, and compression via the CAAP algorithm.
- Partitioning: The continuous state space is divided into a fine-grained rectangular grid.
- Simulation-based Synthesis: Instead of solving complex differential equations, the tool uses Uppaal’s simulator to sample points in each grid cell. It runs simulations to determine which actions lead to safety, allowing it to handle non-linear dynamics.
- The CAAP Algorithm: The core innovation is CAAP (Coarsify Axis-Aligned Partitionings). This greedy algorithm identifies neighboring cells with identical safe actions and merges them into larger regions, representing the final strategy as a compact decision tree.
Case Studies and Results
The tool was evaluated on models like the Bouncing Ball, Boost Converter, and Water Tank. The results for the CAAP algorithm demonstrated significant memory reduction. For the Bouncing Ball model, an initial grid of 1,430,000 cells was compressed into just 2,972 regions in 53 seconds.
Statistical evaluations of 10,000 trials showed that the synthesized shields maintained a safety rate of at least 99.47% (with 99% confidence), even in stochastic environments.
Integration with Reinforcement Learning
A key advantage of Uppaal Coshy is its integration with Reinforcement Learning (RL) via Uppaal Stratego. By synthesizing a shield first, developers define a "safe playground." An RL agent can then learn the most efficient way to perform a task while the shield ensures it never violates safety constraints.
Conclusion and Future Work
Uppaal Coshy represents a major step toward practical safety for hybrid systems. While it relies on simulation—which may theoretically miss rare corner cases—its ability to compress massive safety strategies into lean decision trees makes it ideal for real-time embedded applications. Future work aims to improve the "explainability" of safety violations to help developers debug complex models.
Summary updated