Recent from talks
Nothing was collected or created yet.
B-Method
View on WikipediaThe B method is a method of software development based on B, a tool-supported formal method based on an abstract machine notation, used in the development of computer software.[1][2]
Overview
[edit]B was originally developed in the 1980s by Jean-Raymond Abrial[3][4] in France and the UK. B is related to the Z notation (also originated by Abrial) and supports development of programming language code from specifications. B has been used in major safety-critical system applications in Europe (such as the automatic Paris Métro lines 14 and 1 and the Ariane 5 rocket).[5][6][7] It has robust, commercially available tool support for specification, design, proof and code generation.
Compared to Z, B is slightly more low-level and more focused on refinement to code rather than just formal specification — hence it is easier to correctly implement a specification written in B than one in Z. In particular, there is good tool support for this. The same language is used in specification, design and programming. Mechanisms include encapsulation and data locality.
Event-B
[edit]Subsequently, another formal method called Event-B[8][9][10] has been developed based on the B-Method, support by the Rodin Platform.[11][12] Event-B is a formal method aimed at system-level modelling and analysis. Features of Event-B are the use of set theory for modelling, the use of refinement to represent systems at different levels of abstraction, and the use of mathematical proof for verifying consistency between these refinement levels.
The main components
[edit]The B notation depends on set theory and first order logic in order to specify different versions of software that covers the complete cycle of project development.
Abstract machine
[edit]In the first and the most abstract version, which is called the Abstract Machine, the designer should specify the goal of the design.
Refinement
[edit]- Then, during a refinement step, they may pad the specification in order to clarify the goal or to turn the abstract machine more concrete by adding details about data structures and algorithms that define how the goal is achieved.
- The new version, which is called Refinement, should be proven to be coherent and include all the properties of the abstract machine.
- The designer may make use of B libraries in order to model data structures or to include or import existing components.
Implementation
[edit]- The refinement continues until a deterministic version is achieved: the Implementation.
- During all of the development steps, the same notation is used, and the last version may be translated to a programming language for compilation.
Software
[edit]B-Toolkit
[edit]The B-Toolkit[13][14] is a collection of programming tools designed to support the use of the B-Tool,[15] is a set theory-based mathematical interpreter for the purposes of supporting the B-Method. Development was originally undertaken by Ib Holm Sørensen and others, at BP Research and then at B-Core (UK) Limited.[16]
The toolkit uses a custom X Window Motif Interface[17] for GUI management and runs primarily on the Linux, Mac OS X and Solaris operating systems.
The B-Toolkit source code is now available.[18]
Atelier B
[edit]Developed by ClearSy, Atelier B[19][20] is an industrial tool that allows for the operational use of the B Method to develop defect-free proven software (formal software). Two versions are available: 1) Community Edition, available to anyone without any restriction; 2) Maintenance Edition for maintenance contract holders only. Atelier B has been used to develop safety automatisms for the various subways installed throughout the world by Alstom and Siemens, and also for Common Criteria certification and the development of system models by ATMEL and STMicroelectronics.

Click'n'Prove
[edit]The Click'n'Prove tool provides an environment for the generation and discharge of proof obligations, for consistency and refinement checking.[21]
Rodin
[edit]The Rodin Platform is a tool that supports Event-B.[8][22][11] Rodin is based on an Eclipse software IDE (integrated development environment) and provides support for refinement and mathematical proof. The platform is open source and forms part of the Eclipse framework It is extendable using software component plug-ins. The development of Rodin has been supported by the European Union projects DEPLOY (2008–2012), RODIN (2004–2007), and ADVANCE (2011–2014).[8]
BHDL
[edit]BHDL provides a method for the correct design of digital circuits, combining the advantages of the hardware description language VHDL with the formality of B.[23]
APCB
[edit]APCB (French: Association de Pilotage des Conférences B, the International B Conference Steering Committee) has organized meetings associated with the B-Method.[24] It has organized ZB conferences with the Z User Group and ABZ conferences, including Abstract State Machines (ASM) as well as the Z notation.
Books
[edit]- The B-Book: Assigning Programs to Meanings, Jean-Raymond Abrial, Cambridge University Press, 1996. ISBN 0-521-49619-5.
- The B-Method: An Introduction, Steve Schneider, Palgrave Macmillan, Cornerstones of Computing series, 2001. ISBN 0-333-79284-X.
- Software Engineering with B, John Wordsworth, Addison Wesley Longman, 1996. ISBN 0-201-40356-0.
- The B Language and Method: A Guide to Practical Formal Development, Kevin Lano, Springer-Verlag, FACIT series, 1996. ISBN 3-540-76033-4.
- Specification in B: An Introduction using the B Toolkit, Kevin Lano, World Scientific Publishing Company, Imperial College Press, 1996. ISBN 1-86094-008-0.
- Modeling in Event-B: System and Software Engineering, Jean-Raymond Abrial, Cambridge University Press, 2010. ISBN 978-0-521-89556-9.
Conferences
[edit]The following conferences have explicitly included the B-Method and/or Event-B:
- Z2B Conference, Nantes, France, 10–12 October 1995
- First B Conference, Nantes, France, 25–27 November 1996
- Second B Conference, Montpellier, France, 22–24 April 1998
- ZB 2000, York, United Kingdom, 28 August – 2 September 2000
- ZB 2002, Grenoble, France, 23–25 January 2002
- ZB 2003, Turku, Finland, 4–6 June 2003
- ZB 2005, Guildford, United Kingdom, 2005
- B 2007, Besançon, France, 2007
- B, from research to teaching, Nantes, France, 16 June 2008
- B, from research to teaching, Nantes, France, 8 June 2009
- B, from research to teaching, Nantes, France, 7 June 2010
- ABZ 2008, British Computer Society, London, United Kingdom, 16–18 September 2008
- ABZ 2010, Orford, Québec, Canada, 23–25 February 2010
- ABZ 2012, Pisa, Italy, 18–22 June 2012
- ABZ 2014, Toulouse, France, 2–6 June 2014
- ABZ 2016, Linz, Austria, 23–27 May 2016
- ABZ 2018, Southampton, United Kingdom, 2018
- ABZ 2020, Ulm, Germany, 2021 (delayed due to the COVID-19 pandemic)
- ABZ 2021, Ulm, Germany, 2021
See also
[edit]References
[edit]- ^ Cansell, Dominique, and Dominique Méry. "Foundations of the B method." Computing and informatics 22, no. 3-4 (2003): 221-256.
- ^ Butler, Michael, Philipp Körner, Sebastian Krings, Thierry Lecomte, Michael Leuschel, Luis-Fernando Mejia, and Laurent Voisin. "The first twenty-five years of industrial use of the B-method." In International Conference on Formal Methods for Industrial Critical Systems, pp. 189-209. Springer, Cham, 2020.
- ^ Jean-Raymond Abrial (1988). "The B Tool (Abstract)" (PDF). In Bloomfield, Robin E.; Marshall, Lynn S.; Jones, Roger B. (eds.). VDM – The Way Ahead, Proc. 2nd VDM-Europe Symposium. Lecture Notes in Computer Science. Vol. 328. Springer. pp. 86–87. doi:10.1007/3-540-50214-9_8. ISBN 978-3-540-50214-2.
- ^ Abrial, J-R., Matthew KO Lee, D. S. Neilson, P. N. Scharbach, and Ib Holm Sørensen. "The B-method." In International Symposium of VDM Europe, pp. 398-405. Springer, Berlin, Heidelberg, 1991.
- ^ Gerhart, Susan, D. Craigen, and Ted Ralston. "Case study: Paris metro signaling system." IEEE Software 11, no. 1 (1994): 32-28.
- ^ Behm, Patrick, Paul Benoit, Alain Faivre, and Jean-Marc Meynadier. "METEOR: A successful application of B in a large project." In International Symposium on Formal Methods, pp. 369-387. Springer, Berlin, Heidelberg, 1999.
- ^ Lecomte, Thierry. "Applying a formal method in industry: a 15-year trajectory." In International workshop on formal methods for industrial critical systems, pp. 26-34. Springer, Berlin, Heidelberg, 2009.
- ^ a b c "Event-B and the Rodin Platform". Event-B.org.
- ^ Butler, Michael. "Decomposition structures for Event-B." In International Conference on Integrated Formal Methods, pp. 20-38. Springer, Berlin, Heidelberg, 2009.
- ^ Abrial, Jean-Raymond. Modeling in Event-B: system and software engineering. Cambridge University Press, 2010.
- ^ a b Abrial, Jean-Raymond, Michael Butler, Stefan Hallerstede, Thai Son Hoang, Farhad Mehta, and Laurent Voisin. "Rodin: an open toolset for modelling and reasoning in Event-B." International journal on software tools for technology transfer 12, no. 6 (2010): 447-466.
- ^ Hoang, Thai Son, Andreas Fürst, and Jean-Raymond Abrial. "Event-B patterns and their tool support." Software & Systems Modeling 12, no. 2 (2013): 229-244.
- ^ "The B-Toolkit". [B-Core (UK) Limited]. 2004. Archived from the original on October 12, 2004. Retrieved February 22, 2012.
- ^ Haughton, Howard, and Kevin Lano. Specification in B: An introduction using the B toolkit. World Scientific, 1996.
- ^ Abrial, Jean-Raymond. "The B Tool." In International Symposium of VDM Europe, pp. 86-87. Springer, Berlin, Heidelberg, 1988.
- ^ Bowen, Jonathan (July 2022). "Ib Holm Sørensen: Ten Years After" (PDF). FACS FACTS. No. 2022–2. BCS-FACS. pp. 41–49. Retrieved 3 August 2022.
- ^ B-Toolkit Requirements Archived 2004-10-12 at the Wayback Machine
- ^ Crichton, Edward. "B-Toolkit source code". GitHub.
- ^ "AtelierB.eu".
- ^ Mentré, David, Claude Marché, Jean-Christophe Filliâtre, and Masashi Asuka. "Discharging proof obligations from Atelier B using multiple automated provers." In International Conference on Abstract State Machines, Alloy, B, VDM, and Z, pp. 238-251. Springer, Berlin, Heidelberg, 2012.
- ^ Abrial, J.-R.; Cansell, D. (2003). "Click'n Prove: Interactive Proofs within Set Theory". In Basin, D.; Wolff, B. (eds.). Theorem Proving in Higher Order Logics (TPHOLs). Lecture Notes in Computer Science. Vol. 2758. Berlin, Heidelberg: Springer. doi:10.1007/10930755_1.
- ^ Abrial, J-R. "A system development process with Event-B and the Rodin platform." In International Conference on formal engineering methods, pp. 1–3. Springer, Berlin, Heidelberg, 2007.
- ^ Aljer, Ammar, Philippe Devienne, Sophie Tison, J-L. Boulanger, and Georges Mariano. "BHDL: Circuit design in B." In Third International Conference on Application of Concurrency to System Design Proceedings, pp. 241–242. IEEE, 2003.
- ^ "Association de pilotage des conférences B". librairiecosmopolite.com. Retrieved 27 July 2022.
External links
[edit]- B Method.com – work and subjects concerning the B method, a formal method with proof
- Atelier B.eu Archived 2008-02-21 at the Wayback Machine: Atelier B is a systems engineering workshop, which enables software to be developed that is guaranteed to be flawless
- Site B Grenoble
B-Method
View on GrokipediaIntroduction
History and Development
The B-Method originated in the late 1980s as a formal approach to software development, primarily developed by Jean-Raymond Abrial as a successor to the Z notation, emphasizing refinement and tool-supported proof for rigorous specification and verification.[6] Abrial, who had earlier contributed to Z while at the University of Oxford in the 1970s and 1980s, shifted focus to B to address limitations in handling implementation details through abstract machines and stepwise refinement.[7] Initial formalization efforts in the 1980s involved collaborations among European researchers, building on mathematical foundations like set theory to enable precise modeling of system behaviors.[6] Key milestones in the 1990s marked B's transition from academic concept to practical toolset. In 1993, the first B-Toolset was delivered by Alstom, providing type-checking and proof capabilities that facilitated industrial application.[4] Abrial's seminal publication, The B-Book: Assigning Programs to Meanings in 1996, formalized the method's principles, notations, and development process, serving as the authoritative reference for its use in specifying and coding software systems. By the late 1990s, B gained traction in safety-critical domains, notably through its adoption for the automatic train control system of Paris Métro Line 14, inaugurated in 1998, where over 110,000 lines of B models were used to generate 86,000 lines of Ada code, ensuring high reliability in a driverless rail environment.[8] This project, led by RATP and partners like Matra Transport, demonstrated B's efficacy in rail signaling and extended to similar applications in aviation and other sectors requiring certified software.[4] In the 2000s, the method evolved into Event-B, an extension developed by Abrial to better support system-level modeling of discrete transition systems, incorporating event-driven refinements while retaining core B elements like set-theoretic notations. This transition, formalized in Abrial's 2010 book Modeling in Event-B: System and Software Engineering, broadened B's scope beyond software to complex reactive systems, influencing ongoing industrial uses in railways such as Alstom's URBALIS systems across multiple European cities.[6] No formal international standardization emerged specifically for B, though its rigorous proof obligations contributed to sector-specific guidelines, such as those in European railway safety standards.[4] The method's continued relevance is evident in recent projects, including the 2024 extension of Paris Métro Line 14, which relies on B for ensuring safety and reliability.[8]Core Principles
The B-Method embodies the correctness-by-construction paradigm, wherein systems are developed starting from highly abstract mathematical specifications that are progressively refined into executable code, with formal proofs ensuring that key properties—such as safety and functional correctness—are preserved at every step.[9] This approach contrasts with traditional post-hoc verification by integrating proof obligations directly into the development process, thereby minimizing errors in safety-critical applications like railway signaling and avionics.[10] By mandating exhaustive formal justification rather than partial or informal checks, the method avoids ambiguities that could lead to system failures, emphasizing a rigorous pathway from intent to implementation.[11] At its foundation, the B-Method relies on Zermelo-Fraenkel set theory with the axiom of choice (ZFC), providing a mathematically precise framework for modeling data and behaviors without reliance on ad-hoc assumptions.[10] All variables in B specifications are treated as abstract sets, enabling the representation of complex structures—such as relations, functions, and sequences—through set-theoretic operations like unions, powersets, and Cartesian products, which underpin the method's expressive power.[12] Operations, in turn, are formalized as generalized substitutions, a construct that generalizes classical assignment statements to include guarded actions, non-deterministic choices, and preconditioned behaviors, all defined within the weakest precondition semantics to ensure predictable state transitions.[13] This set-theoretic rigor distinguishes the B-Method from informal engineering practices, as it requires full formal proofs of consistency and invariance preservation throughout the refinement process—often mechanized via tools that generate and discharge proof obligations automatically or interactively.[9] Unlike methods that tolerate incomplete specifications or rely on testing alone, B insists on total coverage, making it particularly suited for domains where partiality could introduce unacceptable risks, such as embedded systems in transportation.[11] Refinement serves as the mechanism to bridge abstraction levels while maintaining these guarantees, but the principles prioritize upfront mathematical certainty over iterative debugging.[12]Modeling Language
Abstract Machines
In the B-Method, an abstract machine serves as the primary modeling artifact, encapsulating the state of a system through variables and defining operations that transition between states in a modular and reusable manner.[14] This structure enables formal specification of software behavior using set theory and predicate logic, ensuring that all state changes preserve system properties.[15] The key components of an abstract machine are organized into specific clauses within the Abstract Machine Notation (AMN). The MACHINE clause names the machine and declares visibility to other machines via SEES or INCLUDES. The SETS clause defines deferred sets used in the model, while CONSTANTS and PROPERTIES specify fixed values and their constraints. The VARIABLES clause declares state variables, the INVARIANT clause provides predicates that must hold for all reachable states, the INITIALISATION clause sets the starting state, and the OPERATIONS clause describes state-modifying actions using generalized substitutions with preconditions and postconditions.[15][14] State in an abstract machine is represented by variables typed as basic sets (e.g., integers, booleans) or constructed types like relations, functions, or sequences, ensuring abstract data modeling without implementation details.[15] Invariants are logical predicates over these variables that guarantee consistency, such as type constraints or relational properties, and must be maintained by every operation to uphold the machine's correctness.[14] A representative example is a simple counter machine, which models a bounded integer value with increment and decrement operations:MACHINE Counter
SEES Short
CONSTANTS max_val
PROPERTIES max_val ∈ SHORT ∧ max_val > 0
VARIABLES value
INVARIANT value ∈ SHORT ∧ value ≤ max_val
INITIALISATION value := 0
OPERATIONS
increment(n) =
PRE n ∈ SHORT ∧ n > 0 ∧ value + n ≤ max_val
THEN value := value + n
END;
decrement =
PRE value > 0
THEN value := value − 1
END;
res ← getValue =
BEGIN res := value END
END
MACHINE Counter
SEES Short
CONSTANTS max_val
PROPERTIES max_val ∈ SHORT ∧ max_val > 0
VARIABLES value
INVARIANT value ∈ SHORT ∧ value ≤ max_val
INITIALISATION value := 0
OPERATIONS
increment(n) =
PRE n ∈ SHORT ∧ n > 0 ∧ value + n ≤ max_val
THEN value := value + n
END;
decrement =
PRE value > 0
THEN value := value − 1
END;
res ← getValue =
BEGIN res := value END
END
value represents the counter state, the invariant ensures it stays non-negative and bounded, initialization sets it to zero, and operations include guards to prevent invalid states.[16]
Abstract machines promote modularity by allowing one machine to SEE another's constants and variables for read-only access or INCLUDE it for shared state, facilitating composition into larger systems without direct coupling.[15] This design supports refinement, where abstract machines are progressively detailed toward concrete implementations while preserving invariants.[14]
Notations and Syntax
The B-Method employs a formal notation grounded in set theory and predicate logic to specify abstract machines and their behaviors, enabling precise mathematical descriptions of system states and operations.[17] This notation includes symbols for sets, relations, and logical predicates, which are used to declare types, invariants, and substitutions within machine specifications.[17] Basic notations in B-Method draw from set theory, featuring symbols such as for membership, for subset inclusion, for union, for intersection, and for Cartesian products.[17] Predicate logic notations include universal quantification , existential quantification , conjunction , disjunction , and implication , allowing the expression of constraints and properties in a rigorous manner.[17] For instance, a predicate might state , where denotes the set of integers.[17] Substitution notations facilitate the description of state transitions, with structures like for non-deterministic choices over variables satisfying predicate , followed by substitution .[17] Guarded operations use , executing only if precondition holds.[17] These are essential for defining operations that modify machine variables while preserving invariants.[17] Type declarations specify the domains of variables and expressions, using typed sets such as for the powerset of integers from 1 to , and relations denoted by , partial functions by , and total functions by .[17] Predefined types include for integers, for natural numbers, for reals, for Booleans, and for strings, with powersets like for any type .[17] Deferred sets are declared in the clause as identifiers, optionally enumerated via , ensuring type safety in specifications.[17] The syntax for key clauses follows structured rules akin to BNF, where the clause consists of one or more predicates conjoined by , such as , defining state constraints.[17] Operations in the clause are defined as or , with inputs typed in the precondition and outputs via substitution , ensuring no variable renaming in abstract machines.[17] Common constructs include Cartesian products , typed as , for pairing elements from types and .[17] Functions are partial () or total (), both typed as , with application as .[17] Sequences, denoted , support operations like , , , and for ordered collections.[17]| Construct | Notation | Type/Example |
|---|---|---|
| Cartesian Product | , e.g., | |
| Total Function | , e.g., | |
| Partial Function | ||
| Sequence | , e.g., |
