Modeling and Verifying Cyber-Physical Systems with Hybrid Active Objects

Eduard Kamburjan, Stefan Mitsch, Martina Kettenbach, Reiner HähnlearXiv 2019 · OpenReview

Abstract

Formal modeling of cyber-physical systems (CPS) is hard, because they pose the double challenge of combined discrete-continuous dynamics and concurrent behavior. Existing formal specification and verification languages for CPS are designed on top of their underlying proof search technology. They lack high-level structuring elements. In addition, they are not efficiently executable. This makes formal CPS models hard to understand and to validate, hence impairs their usability. Instead, we suggest to model CPS in an Active Objects (AO) language designed for concise, intuitive modeling of concurrent systems. To this end, we extend the AO language ABS and its runtime environment with Hybrid Active Objects (HAO). CPS models and requirements formalized in HAO must follow certain communication patterns that permit automatic translation into differential dynamic logic, a sequential hybrid program logic. Verification is achieved by discharging the resulting formulas with the theorem prover KeYmaera X. We demonstrate the practicality of our approach with case studies.

Introduction: The Usability Gap in CPS Design

Cyber-Physical Systems (CPS)—such as autonomous vehicles, medical devices, and smart grids—are notoriously difficult to model. Designers face a "double challenge":

  1. Hybrid Nature: These systems combine discrete computer logic with continuous physical processes (e.g., a controller deciding to open a valve vs. the actual flow of water).
  2. Concurrent Nature: They consist of many distributed components (sensors, actuators, controllers) that run simultaneously and communicate asynchronously.

Existing tools often force a trade-off. Formal verification languages like hybrid automata are mathematically rigorous but lack high-level programming structures and are often not executable, making them hard to debug. Conversely, standard programming languages lack the built-in ability to reason about continuous physics and formal safety proofs. This paper presents a novel approach to bridging this "usability gap" by extending a high-level programming language with continuous dynamics.

The Hybrid Active Objects (HAO) Approach

The researchers built their solution on the foundation of Hybrid ABS (HABS), an extension of the existing Active Objects (AO) language, ABS. AO is an actor-based language where objects communicate via asynchronous calls and "futures."

The authors added a physical block to classes, allowing developers to define Ordinary Differential Equations (ODEs) that govern how object fields (like level or velocity) change over time. This allows for a natural mapping between the software controller and the physical environment it manages. By being able to run a model (simulation) as well as prove it (verification), developers can ensure the model reflects reality while maintaining safety.

Example of HABS code for a water tank alongside its simulated behavior.

Integrated Toolchain and Verification

To verify these models, the paper describes a method to translate HABS code into differential dynamic logic (dL). Because verifying distributed hybrid systems is computationally intensive, the authors identify specific communication patterns that allow them to decompose the system. This makes verification compositional: each class can be proven safe individually rather than attempting to prove the entire complex system at once.

The framework connects to KeYmaera X for discharging proof obligations and uses Maxima (a computer algebra system) and Erlang to power an executable simulator that produces visual graphs of the system's behavior.

The HABS toolchain architecture, showing the paths for verification and simulation.

Key Results and Case Studies

The approach was evaluated using standard benchmarks, most notably Water Tank Models. The authors successfully modeled both a single-object version and a more complex two-object version where a discrete controller and a physical tank communicate over a network.

Key findings include:

  • Successful Translation: HABS models can be automatically converted into dL formulas.
  • Safety Proofs: For the water tank case study, they successfully proved a safety invariant: if the tank starts within a certain range, the controller is guaranteed to keep the water level between 3l and 10l, despite the continuous draining and filling.
  • Executable Simulation: The toolchain generates Erlang code that simulates the system, providing a visual "sanity check" for developers before they attempt rigorous mathematical proofs.

Conclusion and Future Work

Active Objects are a natural fit for CPS because the "Actor" model inherently mimics how independent components send messages in the real world. By imposing specific interaction patterns, the authors turned a distributed hybrid system problem into a set of sequential hybrid program problems manageable by existing tools.

Future work includes "liberalizing" communication patterns to support more complex architectures, improving the simulator's handling of complex ODEs, and scaling the framework to industrial-scale case studies to prove its practicality in the field.

Summary updated

Abstract

Formal modeling of cyber-physical systems (CPS) is hard, because they pose the double challenge of combined discrete-continuous dynamics and concurrent behavior. Existing formal specification and verification languages for CPS are designed on top of their underlying proof search technology. They lack high-level structuring elements. In addition, they are not efficiently executable. This makes formal CPS models hard to understand and to validate, hence impairs their usability. Instead, we suggest to model CPS in an Active Objects (AO) language designed for concise, intuitive modeling of concurrent systems. To this end, we extend the AO language ABS and its runtime environment with Hybrid Active Objects (HAO). CPS models and requirements formalized in HAO must follow certain communication patterns that permit automatic translation into differential dynamic logic, a sequential hybrid program logic. Verification is achieved by discharging the resulting formulas with the theorem prover KeYmaera X. We demonstrate the practicality of our approach with case studies.
BibTeX
@misc{kamburjan2019modeling,
  author = {Eduard Kamburjan and Stefan Mitsch and Martina Kettenbach and Reiner Hähnle},
  title = {{Modeling and Verifying Cyber-Physical Systems with Hybrid Active Objects}},
  year = {2019},
  eprint = {1906.05704},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.05704},
}
Figure