Skip to main content
QUICK REVIEW

[Paper Review] Why Just Boogie? Translating Between Intermediate Verification Languages

Michael Ameri, Carlo A. Furia|arXiv (Cornell University)|Jan 4, 2016
Logic, programming, and type systemsComputer Science17 references4 citations
TL;DR

This paper presents a semantic-preserving translation from Boogie to WhyML, enabling verification of Boogie programs using Why3's more versatile back-end provers. The tool b2w translates 194 Boogie programs, and Why3 successfully verifies 83% of them with the same outcome as Boogie, demonstrating practical feasibility and cross-tool validation potential.

ABSTRACT

The verification systems Boogie and Why3 use their respective intermediate languages to generate verification conditions from high-level programs. Since the two systems support different back-end provers (such as Z3 and Alt-Ergo) and are used to encode different high-level languages (such as C# and Java), being able to translate between their intermediate languages would provide a way to reuse one system's features to verify programs meant for the other. This paper describes a translation of Boogie into WhyML (Why3's intermediate language) that preserves semantics, verifiability, and program structure to a large degree. We implemented the translation as a tool and applied it to 194 Boogie-verified programs of various sources and sizes; Why3 verified 83% of the translated programs with the same outcome as Boogie. These results indicate that the translation is often effective and practically applicable.

Motivation & Objective

  • To enable reuse of Why3's advanced verification back-ends (e.g., Alt-Ergo, CVC4, Coq) for programs originally verified in Boogie.
  • To preserve semantic correctness, verifiability, and program structure during translation between Boogie and WhyML.
  • To provide a practical validation mechanism for Boogie's verification results by rechecking translated programs in Why3.
  • To address limitations in Boogie’s verification stack—such as incorrect handling of real arithmetic and loop invariants—by leveraging Why3’s more robust and diverse prover support.
  • To demonstrate that translation between intermediate verification languages (IVLs) is viable and beneficial for improving confidence in automated verification.

Proposed method

  • Design a translation function 𝒯 from Boogie programs to equivalent WhyML programs that preserves semantics and structure.
  • Implement the translation as a tool named b2w, supporting core Boogie features including procedures, assertions, and imperative constructs.
  • Handle Boogie’s type system and logic expressions by mapping them to WhyML’s ML-family syntax and its expressive type system.
  • Address challenges in translating complex features such as polymorphic maps and bitvectors by restricting instantiation and using conservative encodings.
  • Leverage Why3’s ability to dispatch verification conditions to multiple back-ends, including interactive provers, to overcome limitations in Boogie’s default SMT-based verification.
  • Apply the tool to 194 Boogie-verified programs from diverse sources to evaluate correctness, verifiability, and readability.

Experimental results

Research questions

  • RQ1Can a translation from Boogie to WhyML preserve semantic correctness and verifiability across a broad range of programs?
  • RQ2To what extent can Why3 verify Boogie programs after translation, especially when Boogie fails due to limitations in its back-end (e.g., Z3)?
  • RQ3How well does the translation preserve program structure and readability to support maintainability and debugging?
  • RQ4Can the translation serve as a cross-validation mechanism to detect false positives in Boogie’s verification results?
  • RQ5What are the practical limitations of translating Boogie features such as bitvectors and polymorphic maps into WhyML?

Key findings

  • The tool b2w successfully translated 194 Boogie programs into WhyML, with 161 (83%) being verified by Why3 with the same outcome as Boogie.
  • Why3 correctly rejected the problematic Boogie program 'not_verify' with a contradictory postcondition, while Boogie and Z3 incorrectly verified it.
  • Why3 correctly verified 'lemma_yes' (2³ > 0) and rejected 'lemma_no' (2³ < 0), demonstrating superior handling of real arithmetic compared to Boogie’s Z3 integration.
  • For the loop invariant in 'trivial_inv', Why3 successfully verified the invariant using its CVC4 backend or interactive prover, while Boogie failed due to trigger heuristics in Z3.
  • The translation remains effective despite limitations in handling complex polymorphic maps and bitvector operations, which are either restricted or semantically approximated.
  • The results confirm that translating between IVLs is practical and enhances verification confidence through cross-tool 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.