Skip to main content
QUICK REVIEW

[Paper Review] A Machine-Checked Proof for a Translation of Event-B Machines to JML

Néstor Cataño, Camilo Rueda|arXiv (Cornell University)|Sep 9, 2013
Logic, programming, and type systemsComputer Science31 references5 citations
TL;DR

This paper presents a machine-checked soundness proof for the translation of Event-B machines into JML specifications using the EB2Jml operator, formalized in Event-B via a shallow embedding in the Rodin platform. The proof establishes that every JML method specification generated by the translation correctly simulates the semantics of the original Event-B substitution, ensuring refinement and correctness through formal verification.

ABSTRACT

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.

Motivation & Objective

  • To formally verify the correctness of the EB2Jml translation from Event-B to JML using machine-checked proofs.
  • To ensure that the semantics of JML method specifications generated by EB2Jml are sound with respect to the original Event-B substitutions.
  • To demonstrate that the translation preserves refinement by proving that JML semantics are simulated by Event-B semantics.
  • To validate the approach through a shallow embedding of both Event-B and JML within Event-B itself, using the Rodin platform.
  • To provide a reusable framework for proving soundness of translations between formal languages, particularly those based on transition systems.

Proposed method

  • The authors formalize Event-B and JML semantics using a shallow embedding in the logic of the Event-B language within the Rodin platform.
  • They define the EB2Jml translation operator as a set of axioms mapping Event-B events and assignments to corresponding JML method specifications and postconditions.
  • The proof models state transitions for both Event-B and JML using type constructors and state transducers, ensuring consistent representation of initial and final states.
  • A key assumption is that both languages operate on the same initial and final state representations, which is justified within the formalization.
  • The soundness proof is structured as a collection of Rodin contexts, with translation and semantic rules encoded as axioms.
  • The ProB model-checker is used to validate the axiomatic definitions by finding consistent valuations, enhancing confidence in the absence of inconsistencies.

Experimental results

Research questions

  • RQ1Is the EB2Jml translation from Event-B to JML sound in the sense that every JML method specification correctly simulates the behavior of the corresponding Event-B substitution?
  • RQ2Can a machine-checked proof of this translation be constructed using only Event-B and the Rodin platform, without relying on external formalisms?
  • RQ3How can a shallow embedding approach be used to formally verify the semantics of a translation between two formal languages, especially when both are expressed in the same foundational logic?
  • RQ4What assumptions about state representation are necessary for such a proof, and are they justifiable within the formal framework?
  • RQ5Can this proof methodology be generalized to other formal language translations based on transition system semantics?

Key findings

  • The machine-checked proof confirms that the semantics of every JML method specification generated by EB2Jml is simulated by the corresponding Event-B substitution, establishing refinement.
  • The proof is fully formalized within Event-B using the Rodin platform, demonstrating the feasibility of self-hosted formal verification.
  • The shallow embedding approach enables efficient proof discharge but limits meta-logical reasoning, which is a trade-off acknowledged in the work.
  • The use of ProB to validate the axiomatic definitions increases confidence in the consistency of the formalization.
  • The approach generalizes well to other language translations, particularly those involving transition-based semantics.
  • The proof does not require full Event-B machines or contexts, focusing instead on core constructs like events, assignments, and invariants, which are sufficient for soundness validation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.