arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.18771cs.SE
收藏

KBX:通过形式化双向变换实现经验证的模型同步

KBX: Verified Model Synchronization via Formal Bidirectional Transformation

Jianhong Zhao, Yongwang Zhao, Peisen Yao, Fanlang Zeng, Bohua Zhan, Kui Ren

AI总结:

本文提出形式化双向变换框架KBX,基于匹配逻辑在K框架中从单向定义合成双向变换定义并生成可验证的同步器,在UML与HCSP场景中减少82.8%开发工作量。

摘要:

复杂的安全关键系统需要多个模型进行全面描述,这导致开发过程容易出错且验证工作繁重。双向变换(BX)是一种自动同步这些模型的方法。然而,现有的BX框架缺乏形式化验证,无法严格保证这些模型的一致性。本文介绍了KBX,一个用于经验证的模型同步的形式化双向变换框架。首先,我们提出了一个基于匹配逻辑的BX模型,为在$\mathbb{K}$框架内构建BX定义提供了逻辑基础。其次,我们提出了从单向定义合成形式化BX定义的算法,使开发人员能够专注于编写单向定义,而无需考虑反向方向以及同步中缺失信息的恢复。随后,我们利用$\mathbb{K}$从合成后的定义生成形式化同步器,用于一致性维护和验证。为了评估KBX的有效性,我们与现有BX框架进行了对比分析。此外,我们展示了KBX在真实场景中构建UML与HCSP之间双向变换的应用,结果表明与在$\mathbb{K}$中手动编写规范相比,BX开发工作量减少了82.8%。

英文摘要:

Complex safety-critical systems require multiple models for a comprehensive description, resulting in error-prone development and laborious verification. Bidirectional transformation (BX) is an approach to automatically synchronizing these models. However, existing BX frameworks lack formal verification to enforce these models' consistency rigorously. This paper introduces KBX, a formal bidirectional transformation framework for verified model synchronization. First, we present a matching logic-based BX model, providing a logical foundation for constructing BX definitions within the $\mathbb{K}$ framework. Second, we propose algorithms to synthesize formal BX definitions from unidirectional ones, which allows developers to focus on crafting the unidirectional definitions while disregarding the reverse direction and missing information recovery for synchronization. Afterward, we harness $\mathbb{K}$ to generate a formal synchronizer from the synthesized definitions for consistency maintenance and verification. To evaluate the effectiveness of KBX, we conduct a comparative analysis against existing BX frameworks. Furthermore, we demonstrate the application of KBX in constructing a BX between UML and HCSP for real-world scenarios, showcasing an 82.8\% reduction in BX development effort compared to manual specification writing in $\mathbb{K}$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑