B2ACSL: Bridging the B-Method and ACSL for Deductive Verification of Generated C Code
Authors:
- Fagner Morais DiasFDFagner Morais Dias
- Marcel OliveiraMOMarcel Oliveira
- Thierry LecomteTLThierry Lecomte
- Dalay AlmeidaDADalay Almeida
Preprint
- 5 August 2026
- preprint
- Published by Elsevier in SSRN Electronic Journal
Abstract
The B-Method is a formal specification and development method that supports correctness-by-construction through refinement and proof obligations. However, generating C code from a proved B implementation introduces an additional assurance gap, particularly in verifying that the generated code respects the specified properties. To address this, we propose a systematic translation process from the B-Method to ACSL, enabling the formal verification of the generated C code with Frama-C, a platform for deductive verification of C programs. Our approach comprises an ACSL library that encodes the B-Method data structures (sets, tuples, relations, functions, and sequences) and their operations, a mapping from B components to ACSL contracts, and B2ACSL, an Atelier-B plugin (currently in its initial version and under active development) that integrates these artifacts into a guided verification workflow. A case study demonstrates the practical application of this translation strategy, illustrating its application to a fuel-level monitoring system.Keywords
This publication has 6 references indexed in Scilit:
- Formally Verifying that a Program Does What It Should: The Wp Plug-in2024
- The First Twenty-Five Years of Industrial Use of the B-Method2020
- Code Generation for Event-B2014
- Behavioral interface specification languagesACM Computing Surveys, 2012
- CVC42011
- Software engineering and formal methodsCommunications of the ACM, 2008