arXiv · 2606.20121
BARReL: a modern backend for Atelier B in Lean
Abstract
BARReL is a Lean 4 library bridging Atelier B, an industrial tool for the B method, and the Lean proof assistant by enabling users to conduct their formal B developments -- up to machine refinement and implementation -- interactively inside Lean, while retaining standard B syntax. B partial operators are carefully encoded by generating explicit well-definedness conditions, leveraging Lean's dependent types to enforce a well-definedness discipline by construction. That is, proof obligations and proof steps cannot silently rely on ill-typed or ill-defined instantiations. BARReL also features basic automation to try to discharge such well-definedness conditions automatically. The implementation is written entirely using Lean meta-programming and is designed to be modular: extending the supported B fragment typically requires only adding new syntax and encoding clauses. We illustrate the approach on a small but representative case study, and argue that BARReL can act as a stepping stone towards a strongly reliable Atelier B toolchain grounded in the Lean proof assistant.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Ghilain Bergeron, Vincent Trélat. 2026-06-18. BARReL: a modern backend for Atelier B in Lean. https://arxiv.org/abs/2606.20121
Cite the original work for its findings. Save a collection to share your selection of sources.