Abstract
Event-B offers a rigorous state-based framework for designing critical systems. Models describe state changes (transitions), and invariant preservation is ensured by inductive proofs over execution traces. In a correct model, such changes transform safe states into safe states, effectively defining a partial function, whose domain prevents ill-defined state changes. Moreover, a state can be formalised as a complex data type, and as such it is accompanied by operators whose correct use is ensured by well-definedness (WD) conditions (partial functions).
This paper proposes to define transitions explicitly as partial functions in an Event-B theory. WD conditions associated to these functions prevent ill-defined transitions in a more effective way than usual Event-B events. We advocate that these WD conditions are sufficient to define transitions that preserve (inductive) invariants and safety properties, thus providing easier and reusable proof methods for model invariant preservation. We rely on the finite automata example to illustrate our approach.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
Rodin Integrated Development Environment http://www.event-b.org/index.html.
- 2.
For the initialisation event, the guard does not involve state variables.
References
Abrial, J.: The B-book - Assigning Programs to Meanings. Cambridge University Press, Cambridge (1996)
Abrial, J.R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, Cambridge (2010)
Abrial, J.R., Butler, M., Hallerstede, S., Leuschel, M., Schmalz, M., Voisin, L.: Proposals for mathematical extensions for Event-B. Technical report (2009). http://deploy-eprints.ecs.soton.ac.uk/216/
Abrial, J.-R., Mussat, L.: On using conditional definitions in formal theories. In: Bert, D., Bowen, J.P., Henson, M.C., Robinson, K. (eds.) ZB 2002. LNCS, vol. 2272, pp. 242–269. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45648-1_13
Barringer, H., Cheng, J.H., Jones, C.B.: A logic covering undefinedness in program proofs. Acta Inform. 21, 251–269 (1984)
Bertot, Y., Castran, P.: Interactive Theorem Proving and Program Development: Coq’Art The Calculus of Inductive Constructions, 1st edn. Springer Publishing Company Incorporated, Heidelberg (2010). https://doi.org/10.1007/978-3-662-07964-5
Börger, E., Stärk, R.F.: Abstract State Machines. A Method for High-Level System Design and Analysis. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-642-18216-7
Butler, M.J., Maamria, I.: Practical theory extension in Event-B. In: Theories of Programming and Formal Methods - Essays Dedicated to Jifeng He on the Occasion of His 70th Birthday, pp. 67–81 (2013)
Dijkstra, E.W.: Guarded commands, nondeterminacy and formal derivation of programs. Commun. ACM 18(8), 453–457 (1975)
Dupont, G., Aït-Ameur, Y., Singh, N.K., Pantel, M.: Event-B hybridation: a proof and refinement-based framework for modelling hybrid systems. ACM Trans. Embed. Comput. Syst. 20(4), 1–37 (2021)
Floyd, R.W.: Assigning meanings to programs. In: Proceedings of Symposium in Applied Mathematics - Mathematical Aspects of Computer Science, vol. 19, pp. 19–32 (1967)
van Gasteren, A.J.M., Tel, G.: Comments on “on the proof of a distributed algorithm’’: always-true is not invariant. Inf. Process. Lett. 35(6), 277–279 (1990)
George, C.: The RAISE specification language a tutorial. In: Prehn, S., Toetenel, H. (eds.) VDM 1991. LNCS, vol. 552, pp. 238–319. Springer, Heidelberg (1991). https://doi.org/10.1007/BFb0019998
Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)
Jones, C.B.: Partial functions and logics: a warning. Inf. Process. Lett. 54(2), 65–67 (1995)
Jones, C.B., Middelburg, C.A.: A typed logic of partial functions reconstructed classically. Acta Inform. 31(5), 399–430 (1994)
Jones, C.B.: Systematic Software Development Using VDM. Prentice Hall International Series in Computer Science, Prentice Hall, Hoboken (1986)
Lamport, L.: Specifying Systems. The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley, Boston (2002)
Leuschel, M.: Fast and effective well-definedness checking. In: Dongol, B., Troubitsyna, E. (eds.) IFM 2020. LNCS, vol. 12546, pp. 63–81. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-63461-2_4
Mendil, I., Singh, N.K., Aït-Ameur, Y., Méry, D., Palanque, P.: An integrated framework for the formal analysis of critical interactive systems. In: Liu, Y., Ma, S.P., Chen, S., Sun, J. (eds.) The 27th Asia-Pacific Software Engineering Conference, June Sun, p. 10. IEEE, Singapore, Singapore, December 2020
Mendil, I., Aït-Ameur, Y., Singh, N.K., Méry, D., Palanque, P.: Leveraging Event-B theories for handling domain knowledge in design models. In: Qin, S., Woodcock, J., Zhang, W. (eds.) SETTA 2021. LNCS, vol. 13071, pp. 40–58. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-91265-9_3
Mendil, I., Aït-Ameur, Y., Singh, N.K., Méry, D., Palanque, P.: Standard conformance-by-construction with Event-B. In: Lluch Lafuente, A., Mavridou, A. (eds.) Formal Methods for Industrial Critical Systems, pp. 126–146. Springer International Publishing, Cham (2021)
Nipkow, T., Wenzel, M., Paulson, L.C.: Isabelle/HOL. A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45949-9
Owre, S., Rushby, J.M., Shankar, N.: PVS: a prototype verification system. In: Kapur, D. (ed.) CADE 1992. LNCS, vol. 607, pp. 748–752. Springer, Heidelberg (1992). https://doi.org/10.1007/3-540-55602-8_217
Riviere, P.: Formal meta engineering Event-B: extension and reasoning the \( EB4EB \) framework. In: Raschke, A., Méry, D. (eds.) ABZ 2021. LNCS, vol. 12709, pp. 153–157. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-77543-8_15
Spivey, J.M.: Z Notation - A Reference Manual, 2 edn. Prentice Hall International Series in Computer Science, Prentice Hall, Hoboken (1992)
Stoddart, B., Dunne, S., Galloway, A.: Undefined expressions and logic in Z and B. Formal Methods Syst. Des. 15(3), 201–215 (1999)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Aït-Ameur, Y. et al. (2022). Empowering the Event-B Method Using External Theories. In: ter Beek, M.H., Monahan, R. (eds) Integrated Formal Methods. IFM 2022. Lecture Notes in Computer Science, vol 13274. Springer, Cham. https://doi.org/10.1007/978-3-031-07727-2_2
Download citation
DOI: https://doi.org/10.1007/978-3-031-07727-2_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-07726-5
Online ISBN: 978-3-031-07727-2
eBook Packages: Computer ScienceComputer Science (R0)