作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2024, Vol. 50 ›› Issue (11): 173-186. doi: 10.19678/j.issn.1000-3428.0068642

• 网络空间安全 • 上一篇    下一篇

基于状态图转形式化B模型的安全苛求系统开发方法

赵大地1,3, 王恪铭2,3,*()   

  1. 1. 西南交通大学信息科学与技术学院, 四川 成都 611756
    2. 西南交通大学计算机与人工智能学院, 四川 成都 611756
    3. 西南交通大学系统可信性自动验证国家地方联合实验室, 四川 成都 611756
  • 收稿日期:2023-10-20 出版日期:2024-11-15 发布日期:2024-11-01
  • 通讯作者: 王恪铭
  • 基金资助:
    四川省自然科学基金(2022NSFSC0464); 成都市软科学研究项目(2023-RK00-00084-ZF)

Safety-Critical System Development Method Based on Translating State Chart to B Formal Model

ZHAO Dadi1,3, WANG Keming2,3,*()   

  1. 1. School of Information Science and Technology, Southwest Jiaotong University, Chengdu 611756, Sichuan, China
    2. School of Computing and Artificial Intelligence, Southwest Jiaotong University, Chengdu 611756, Sichuan, China
    3. National-Local Joint Engineering Laboratory of System Credibility Automatic Verification, Southwest Jiaotong University, Chengdu 611756, Sichuan, China
  • Received:2023-10-20 Online:2024-11-15 Published:2024-11-01
  • Contact: WANG Keming

摘要:

形式化方法精确且严格, 较多应用于安全苛求系统开发, 但目前仍存在学习成本高、使用复杂、重用性低等问题。常用的非形式化状态图模型虽易于使用却缺乏严格验证。针对这些问题, 提出一种将状态图SCXML模型转译为形式化B模型的模型转化方法, 从而结合状态图的易用性降低在安全苛求软件系统开发过程中使用形式化方法的复杂度。该转译方法分为映射规则、同步语义和程序实现3个部分, 以保证自动转译后的模型自身含义与基础语义不变。在平交道口控制系统开发案例分析中, 该方法根据图元模型自动生成了对应形式化模型, 通过对形式化模型的分析改进系统在功能安全、数据安全、隐藏分支3个方面的非安全因素, 并保证从需求至模型的一致性, 证明了该方法可降低形式化方法建模难度, 提高软件系统的正确性、可靠性与安全性。

关键词: 软件功能安全, 形式化方法, 模型转化, SCXML状态图, B方法

Abstract:

The formal method is widely used to develop safety-critical systems because it is rigorous and precise. However, it has high learning costs, high complexity, and low reusability. The commonly used informal state chart model is easy to use but lacks rigorous verification. Thus, we propose an approach to automatically translate the SCXML model into the B formal model. The aim is to combine the ease of use of the state chart to reduce the complexity of formal methods when developing safety-critical software systems. The translation method is elaborated in three parts: mapping rules, synchronous semantics, and program implementation, to ensure that the meaning and basic semantics of the model do not change after automatic translation. In the case analysis of developing a level crossing control system, the method automatically generates a corresponding formal model according to the original state chart, improving functional safety, data security, and the three unsafe aspects of hidden branches through the analysis of the formal model, while ensuring consistency with model requirements. This method reduces the modeling complexity of the formal method and enhances the correctness, reliability, and safety of software systems.

Key words: software functional safety, formal method, model transformation, State Chart extensible Markup Language(SCXML) state chart, B method