[论文解读] Mars 2.0: A Toolchain for Modeling, Analysis, Verification and Code Generation of Cyber-Physical Systems
Mars 2.0 是一个针对信息物理系统的形式化验证工具链,将 AADL 与 Simulink/Stateflow 集成到统一的图形化建模框架中,将模型转换为混合CSP(HCSP)以使用 Isabelle/HOL 和 HHLPy 进行形式化仿真与验证,并生成正确性经证明的 C 与 SystemC 代码,通过形式化证明的转换实现端到端正确性。
We introduce Mars 2.0 for modeling, analysis, verification and code generation of Cyber-Physical Systems. Mars 2.0 integrates Mars 1.0 with several important extensions and improvements, allowing the design of cyber-physical systems using the combination of AADL and Simulink/Stateflow, which provide a unified graphical framework for modeling the functionality, physicality and architecture of the system to be developed. For a safety-critical system, formal analysis and verification of its combined AADL and Simulink/Stateflow model can be conducted via the following steps. First, the toolchain automatically translates AADL and Simulink/Stateflow models into Hybrid CSP (HCSP), an extension of CSP for formally modeling hybrid systems. Second, the HCSP processes can be simulated using the HCSP simulator, and to complement incomplete simulation, they can be verified using the Hybrid Hoare Logic prover in Isabelle/HOL, as well as the more automated HHLPy prover. Finally, implementations in SystemC or C can be automatically generated from the verified HCSP processes. The transformation from AADL and Simulink/Stateflow to HCSP, and the one from HCSP to SystemC or C, are both guaranteed to be correct with formal proofs. This approach allows model-driven design of safety-critical cyber-physical systems based on graphical and formal models and proven-correct translation procedures. We demonstrate the use of the toolchain on several benchmarks of varying complexity, including several industrial-sized examples.
研究动机与目标
- 解决在安全关键型信息物理系统(CPS)中集成物理系统、软件与系统架构的异构建模挑战。
- 通过将 AADL 与 Simulink/Stateflow 统一为单一图形化建模框架,克服独立 AADL(缺乏连续动力学)与 Simulink/Stateflow(缺乏架构建模)的局限性。
- 为 CPS 设计提供形式化验证与正确性保证的代码生成,以确保可靠性与安全性。
- 通过语义一致性证明,为从 AADL⊕S/S 到 HCSP 的模型转换以及从 HCSP 到 C/SystemC 的转换提供形式化正确性保证。
- 通过从高层设计到经验证的低层实现的端到端工具链,支持工业规模的 CPS 开发。
提出的方法
- 将 AADL 与 Simulink/Stateflow 集成到统一的图形化建模语言 AADL⊕S/S 中,用于建模功能、物理动力学与系统架构。
- 自动将 AADL⊕S/S 模型转换为混合CSP(HCSP),一种扩展了常微分方程以支持混合系统的正式语言。
- 使用专用的 HCSP 模拟器对 HCSP 过程进行仿真,以验证动态行为。
- 使用 Isabelle/HOL 中的混合霍尔逻辑证明器与自动化的 HHLPy 证明器对 HCSP 模型进行验证,以增强验证覆盖范围。
- 通过基于近似 bisimulation 的形式化证明转换过程,从经验证的 HCSP 模型生成 C 与 SystemC 代码。
- 通过形式化证明确保转换的正确性:AADL⊕S/S 与 HCSP 之间的语义一致性,以及 HCSP 与生成的 C/SystemC 代码之间的语义一致性。
实验结果
研究问题
- RQ1如何将 AADL 与 Simulink/Stateflow 有效结合为信息物理系统的单一统一建模框架?
- RQ2从 AADL⊕S/S 到 HCSP 的转换能否通过形式化证明确保正确性,以保证语义保真度?
- RQ3能否使用 HCSP 与自动化/交互式定理证明有效支持混合系统行为的形式化验证?
- RQ4能否从经验证的 HCSP 模型自动生成 C 与 SystemC 代码,并提供形式化正确性保证?
- RQ5Mars 2.0 工作流在真实世界 CPS 基准测试中,其行为与正确性相较于以往方法表现如何?
主要发现
- Mars 2.0 工具链成功支持了安全关键型 CPS 的端到端开发,从 AADL⊕S/S 建模到经验证的 C/SystemC 代码生成。
- 从 AADL⊕S/S 到 HCSP 的转换经过形式化证明,保留了原始模型的语义。
- 从 HCSP 到 C 代码的转换通过近似 bisimulation 证明正确,确保了形式化模型与生成实现之间的行为保真度。
- 生成的 C 代码(3500–4000 行)准确反映了原始 ACCS 模型的详细行为,而以往工作(Zhan et al., 2019)缺乏此类 bisimulation 保证。
- 生成 C 代码的仿真结果与 HCSP 模型仿真(蓝线)及以往工作(Zhan et al., 2019)高度一致,证实了行为一致性与正确性。
- 该工具链已在工业规模基准测试中得到验证,包括自适应巡航控制系统(ACCS),证明了其可扩展性与实用性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。