TL;DR
This paper presents a method to automatically generate SystemC code from models of hybrid systems that include time delays. This is crucial for developing reliable embedded systems, as it bridges the gap between formal, delay-aware models and executable code, ensuring correctness and preserving essential system properties.
What Problem Does This Paper Address?
Developing reliable complex embedded systems (ESs) is a significant challenge, especially when these systems involve hybrid dynamics (combining continuous and discrete behaviors) and time delays. Time delays are ubiquitous in real-world systems (e.g., due to communication latency) and can significantly impact stability and safety. While Model-Driven Design (MDD) aims to transform high-level verified models into executable code, ensuring that the generated code correctly reflects the behavior of the original, delay-prone model is difficult. Existing methods for system verification and code generation often overlook the complexities introduced by time delays, leading to potential inaccuracies in the final code. This paper addresses this gap by providing a systematic approach to synthesize SystemC code from verified delay hybrid systems.
Methods
The core of this work lies in extending the Hybrid CSP (HCSP) formalism to Delay HCSP (dHCSP) by replacing ordinary differential equations (ODEs) with delay differential equations (DDEs). This allows for the formal modeling of systems with time delays. The authors then introduce the concept of approximate bisimulation for dHCSP processes, which allows for bounded differences in behavior between the original and discretized models.
The process involves two main steps:
- Discretization of dHCSP: A simulation-based method is used to discretize DDEs, ensuring that the discrete model is approximately bisimilar to the original DDE within a given time bound and precision. This involves computing appropriate step sizes for the discretization.
- Code Generation to SystemC: Rules are defined to translate the discretized dHCSP model into SystemC code. This translation preserves the approximate bisimilarity, ensuring that the generated SystemC code behaves equivalently to the discretized model within the specified precisions.
Datasets
Not discussed in the paper. The paper focuses on a formal method and its application to a case study, rather than empirical evaluation on large datasets.
Key Insights and Ideas
- Formalizing Delay in Hybrid Systems: Extending HCSP to dHCSP provides a formal language to precisely model hybrid systems with time delays, which is a critical step for rigorous analysis and code generation.
- Approximate Bisimulation for Delays: The adaptation of approximate bisimulation to dHCSP is key. It allows for a practical trade-off between formal exactness and the inherent inaccuracies introduced by discretization and the nature of DDEs.
- Bridging the Gap to Executable Code: The paper demonstrates a concrete pathway from a formal, delay-aware model (dHCSP) to executable SystemC code, a vital step for industrial adoption of formal methods in embedded systems design.
- Robust Safety is Crucial: The authors highlight that the (δ, ε)-robustly safe condition for dHCSP processes is essential for guaranteeing the correctness of the discretization and subsequent code generation.
Key Results
The paper presents a method and a prototypical tool for automatically transforming dHCSP models into SystemC code. They demonstrate the approach with a water tank system example, showing that the simulation results of the original dHCSP model and the generated SystemC code closely match, falling within the computed error bounds. This validates the correctness of their discretization and code generation process.
Limitations and Future Work
- Decidability of Approximate Bisimilarity: While the paper proves the decidability of approximate bisimilarity for dHCSP processes on a bounded interval, the practical computation for complex systems might still be challenging.
- Robustly Safe Condition: The requirement for the original dHCSP models to be (δ, ε)-robustly safe can be difficult to satisfy in practice for all systems.
- Future Work: The authors plan to extend their approach to generate code for other practical programming languages (C, C++, Java) and apply it to more complex real-world case studies. They also aim to further investigate the automatic generation of robustly safe models.
Summary updated