[论文解读] A Machine-Checked Proof for a Translation of Event-B Machines to JML
本文通过在Rodin平台中使用浅嵌入法,基于Event-B形式化了EB2Jml操作符,对Event-B机器到JML规范的翻译给出了机器可检查的正确性证明。该证明表明,EB2Jml生成的每个JML方法规范均正确模拟了原始Event-B替换语义,通过形式化验证确保了规约与正确性。
We present a machine-checked soundness proof of a translation of Event-B to the Java Modeling Language (JML). The translation is based on an operator EventB2Jml that maps Evnet-B events to JML method specifications, and deterministic and non-deterministic assignments to JML method post-conditions. This translation has previously been implemented as the EventB2Jml tool. We adopted a taking our own medicine approach in the formalisation of our proof so that Event-B as well as JML are formalised in Event-B and the proof is discharged with the Rodin platform. Hence, for any Event-B substitution (whether an event or an assignment) and for the JML method specification obtained by applying EventB2Jml to the substitution, we prove that the semantics of the JML method specification is simulated by the semantics of the substitution. Therefore, the JML specification obtained as translation from the Event-B substitution is a refinement of the substitution. Our proof includes invariants and the standard Event-B initialising event, but it does not include full machines or Event-B contexts. We assume that the semantics of JML and Event-B operate both on the same initial and final states, and we justify our assumption.
研究动机与目标
- 使用机器可检查的证明形式化验证EB2Jml从Event-B到JML的翻译正确性。
- 确保EB2Jml生成的JML方法规范的语义与原始Event-B替换语义一致。
- 通过证明JML语义被Event-B语义所模拟,证明翻译保持了规约关系。
- 通过在Event-B本身中对Event-B和JML进行浅嵌入,使用Rodin平台验证该方法。
- 提供一个可重用的框架,用于证明形式化语言之间翻译的正确性,特别是基于转移系统的语言。
提出的方法
- 作者在Rodin平台的Event-B语言逻辑中,使用浅嵌入法形式化Event-B和JML的语义。
- 将EB2Jml翻译操作符定义为一组公理,映射Event-B事件和赋值到相应的JML方法规范和后置条件。
- 使用类型构造器和状态转换器对Event-B和JML的状态转移进行建模,确保初始状态和最终状态的一致表示。
- 关键假设是两种语言使用相同的初始和最终状态表示,该假设在形式化中得到合理支持。
- 正确性证明以Rodin上下文的集合形式组织,翻译和语义规则以公理形式编码。
- 使用ProB模型检查器通过寻找一致的赋值来验证公理定义,增强了对形式化无矛盾性的信心。
实验结果
研究问题
- RQ1EB2Jml从Event-B到JML的翻译是否在语义上正确,即每个JML方法规范是否正确模拟了对应Event-B替换的行为?
- RQ2能否仅使用Event-B和Rodin平台,而不依赖外部形式化体系,构建该翻译的机器可检查证明?
- RQ3如何利用浅嵌入方法,对两种形式化语言之间的翻译语义进行形式化验证,特别是当两者均基于同一基础逻辑表达时?
- RQ4此类证明所需的关于状态表示的假设是什么?这些假设在形式化框架内是否合理?
- RQ5该证明方法能否推广到其他基于转移系统语义的形式化语言翻译?
主要发现
- 机器可检查的证明确认,EB2Jml生成的每个JML方法规范的语义均被对应Event-B替换所模拟,从而确立了规约关系。
- 该证明完全在Event-B中使用Rodin平台形式化,证明了自托管形式化验证的可行性。
- 浅嵌入方法实现了高效的证明消解,但限制了元逻辑推理,该权衡在工作中已明确承认。
- 使用ProB验证公理定义增强了对形式化一致性的信心。
- 该方法可良好推广至其他语言翻译,特别是涉及基于转移的语义的翻译。
- 该证明无需完整的Event-B机器或上下文,仅聚焦于事件、赋值和不变量等核心构造,这些已足够用于正确性验证。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。