Abstract
The Event-B method can be used to model all sorts of discrete event systems, among them sequential programs. In this article we describe our experiences with using Event-B by way of two examples. We present a simple model of a factorial program, explaining the method, and a more intricate model of the Quicksort algorithm, providing some insights into strengths and weaknesses of Event-B. The two models are interspersed with our observations and some suggestions of how, we believe, Event-B could evolve. This evaluation of Event-B is intended to serve for determining directions for the evolution of Event-B and judging progress. It is our hope that the observations and suggestions can also be put to use for similar modelling formalisms, such as Z, ASM or VDM.
Similar content being viewed by others
References
Abrial J-R, Butler M, Hallerstede S, Voisin L (2006) An open extensible tool environment for Event-B. In: Liu Z, He J (eds) ICFEM 2006, vol 4260. Springer, Berlin, pp 588–605
Abrial J-R (1996) The B-book: assigning programs to meanings. CUP, Cambridge
Abrial J-R Event based sequential program development: application to constructing a pointer program. In: Araki K, Gnesi S, Mandrioli D (eds) FME 2003: formal methods. LNCS, vol 2805. Springer, Berlin, pp 51–74
Abrial J-R (2010) Modeling in Event-B: system and software engineering. CUP, Cambridge
Abrial J-R, Cansell D, Dominique M (2005) Refinement and reachability in Event B. In: Treharne H, King S, Henson M, Schneider S (eds) ZB 2005. LNCS, vol 3455, pp 222–241
Apt KR, de Boer FS, Olderog E-R (2009) Modular verification of recursive programs. In: Grumberg O, Kaminski M, Katz S, Wintner S (eds) Languages: from formal to natural. LNCS, vol 5533. Springer, Berlin, pp 1–21
Apt KR, de Boer FS, Olderog E-R (2009) Verification of sequential and concurrent programs. Springer, Berlin
Abrial J-R, Hallerstede S (2007) Refinement decomposition and instantiation of discrete models: application to Event-B. Fundam Inform 77(1–2): 1–28
Back R-J (1989) Refinement calculus II: parallel and reactive programs. In: Bakker JW, Roever WP, Rozenberg G (eds) In: Stepwise refinement of distributed systems. LNCS, vol 430. Springer, Berlin, pp 67–93
Bertot Y, Castéran P (2004) Interactive theorem proving and program development. Coq’Art: the calculus of inductive constructions. Texts in theoretical computer science. Springer, Berlin
Back R-J, Kurki-Suonio R (1988) Distributed co-operation with action systems. ACM Trans Program Lang Syst 10: 513–554
Börger E, Stärk R (2003) Abstract state machines: a method for high-level system design and analysis. Springer, Berlin
ClearSy (2001) PEA 98—conception et Codage ref ClearSy-ATB-PEA/1.1 18/12/2001. Internal Report (2001)
Darlington J (1978) A synthesis of several sorting algorithms. Acta Inform 11(1): 1–30
Dijkstra EW (1976) A discipline of programming. Prentice-Hall, New Jersey
Foley M, Hoare CAR (1971) Proof of a recursive program: Quicksort. Comput J 14(4): 391–395
Hallerstede S (2007) Justifications for the Event-B modelling notation. In: Julliand J, Kouchnarenko O (eds) B 2007. LNCS, vol 4355. Springer, Berlin, pp 49–63
Hallerstede S (2008) Incremental system modelling in Event-B. In: Boer FS, Bonsangue MM, Madelaine E (eds) FMCO. LNCS, vol 5751. Springer, Berlin, pp 139–158
Hallerstede S (2008) On the purpose of Event-B proof obligations. In: Börger E, Butler MJ, Bowen JP, Boca P (eds) ABZ. LNCS, vol 5238. Springer, Berlin, pp 125–138
Hallerstede S (2009) A (small) improvement of Event-B? In: Dagstuhl seminar on refinement based methods for the construction of dependable systems (09381), pp 48–52
Hallerstede S (2009) Proving quicksort correct in Event-B. Electr Notes Theor Comput Sci 259: 47–65
Hallerstede S, Leuschel M, Daniel P (2010) Refinement-animation for Event-B—towards a method of validation. In: Frappier M, Glässer U, Khurshid S, Laleau R, Reeves S (eds) ABZ 2010. LNCS, vol 5977. Springer, Berlin, pp 287–301
Jones CB (1990) Systematic software development using VDM, 2nd edn. Prentice Hall, New Jersey
Kaldewaij A (1990) Programming: the derivation of algorithms. Prentice-Hall, New Jersey
Leuschel M, Butler M (2003) Pro B: a model checker for B. In: Araki K, Gnesi S, Mandrioli D (eds) FME 2003: formal methods. LNCS, vol 2805. Springer, Berlin, pp 855–874
Leuschel M, Butler MJ (2008) ProB: an automated analysis toolset for the B method. STTT 10(2): 185–203
Méry D (2009) Refinement-based guidelines for algorithmic systems. Int J Softw Inform 3(2–3): 197–239
Morris FL, Jones CB (1984) An early program proof by Alan Turing. Ann Hist Comput 6(2): 143–193
Morgan CC (1994) Programming from specifications, 2nd edn. Prentice Hall, New Jersey
de Roever WP, Engelhardt K (1998) Data refinement: model-oriented proof methods and their comparison. Cambridge tracts in theoretical computer science, vol 47. CUP, Cambridge
Snook CF, Butler MJ (2006) . UML-B: formal modeling and design aided by UML. ACM Trans Softw Eng Methodol 15(1): 92–122
Smith G (2000) The Object-Z specification language. Kluwer, Dordrecht
Spivey JM (1992) The Z notation: a reference manual, 2nd edn. Prentice Hall, New Jersey
Sampaio A, Woodcock J, Cavalcanti A (2002) Refinement in circus. In: Eriksson L-H, Lindsay PA (eds) Formal methods—getting IT right. LNCS, vol 2391. Springer, Berlin, pp 451–470
Turner E, Butler M, Leuschel M (2010) A refinement-based correctness proof of symmetry reduced model checking. In: ABZ 2010. LNCS, Springer, Berlin, pp 231–244
Turing AM (1949) Checking a large routine. In: Report of a conference on high speed automatic calculating machines. EDSAC inaugural conference, University Mathematical Laboratory, Cambridge, pp 67–69
Woodcock JCP, Cavalcanti ALC (2001) A concurrent language for refinement. In: Butterfield A, Pahl C (eds) IWFM’01: 5th Irish workshop in formal methods. BCS Electronic Workshops in Computing
Woodcock J, Davies J (1996) Using Z. specification, refinement, and proof. Prentice-Hall, New Jersey
Author information
Authors and Affiliations
Corresponding author
Additional information
Eerke Boiten, John Derrick, Dong Jin Song and Steve Reeves
Rights and permissions
About this article
Cite this article
Hallerstede, S., Leuschel, M. Experiments in program verification using Event-B. Form Asp Comp 24, 97–125 (2012). https://doi.org/10.1007/s00165-011-0205-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-011-0205-4