Skip to main content
Log in

Experiments in program verification using Event-B

  • Original Article
  • Published:
Formal Aspects of Computing

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. 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

    Google Scholar 

  2. Abrial J-R (1996) The B-book: assigning programs to meanings. CUP, Cambridge

    Book  MATH  Google Scholar 

  3. 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

  4. Abrial J-R (2010) Modeling in Event-B: system and software engineering. CUP, Cambridge

    MATH  Google Scholar 

  5. 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

  6. 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

    Chapter  Google Scholar 

  7. Apt KR, de Boer FS, Olderog E-R (2009) Verification of sequential and concurrent programs. Springer, Berlin

    Book  MATH  Google Scholar 

  8. Abrial J-R, Hallerstede S (2007) Refinement decomposition and instantiation of discrete models: application to Event-B. Fundam Inform 77(1–2): 1–28

    MATH  MathSciNet  Google Scholar 

  9. 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

    Google Scholar 

  10. 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

    Google Scholar 

  11. Back R-J, Kurki-Suonio R (1988) Distributed co-operation with action systems. ACM Trans Program Lang Syst 10: 513–554

    Article  MATH  Google Scholar 

  12. Börger E, Stärk R (2003) Abstract state machines: a method for high-level system design and analysis. Springer, Berlin

    MATH  Google Scholar 

  13. ClearSy (2001) PEA 98—conception et Codage ref ClearSy-ATB-PEA/1.1 18/12/2001. Internal Report (2001)

  14. Darlington J (1978) A synthesis of several sorting algorithms. Acta Inform 11(1): 1–30

    Article  MATH  MathSciNet  Google Scholar 

  15. Dijkstra EW (1976) A discipline of programming. Prentice-Hall, New Jersey

    MATH  Google Scholar 

  16. Foley M, Hoare CAR (1971) Proof of a recursive program: Quicksort. Comput J 14(4): 391–395

    Article  MATH  MathSciNet  Google Scholar 

  17. 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

  18. 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

    Google Scholar 

  19. 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

    Google Scholar 

  20. 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

  21. Hallerstede S (2009) Proving quicksort correct in Event-B. Electr Notes Theor Comput Sci 259: 47–65

    Article  Google Scholar 

  22. 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

  23. Jones CB (1990) Systematic software development using VDM, 2nd edn. Prentice Hall, New Jersey

    MATH  Google Scholar 

  24. Kaldewaij A (1990) Programming: the derivation of algorithms. Prentice-Hall, New Jersey

    Google Scholar 

  25. 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

    Chapter  Google Scholar 

  26. Leuschel M, Butler MJ (2008) ProB: an automated analysis toolset for the B method. STTT 10(2): 185–203

    Article  Google Scholar 

  27. Méry D (2009) Refinement-based guidelines for algorithmic systems. Int J Softw Inform 3(2–3): 197–239

    Google Scholar 

  28. Morris FL, Jones CB (1984) An early program proof by Alan Turing. Ann Hist Comput 6(2): 143–193

    Article  MathSciNet  Google Scholar 

  29. Morgan CC (1994) Programming from specifications, 2nd edn. Prentice Hall, New Jersey

    MATH  Google Scholar 

  30. 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

    Book  Google Scholar 

  31. Snook CF, Butler MJ (2006) . UML-B: formal modeling and design aided by UML. ACM Trans Softw Eng Methodol 15(1): 92–122

    Article  Google Scholar 

  32. Smith G (2000) The Object-Z specification language. Kluwer, Dordrecht

    MATH  Google Scholar 

  33. Spivey JM (1992) The Z notation: a reference manual, 2nd edn. Prentice Hall, New Jersey

    Google Scholar 

  34. 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

    Chapter  Google Scholar 

  35. 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

  36. 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

  37. 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

  38. Woodcock J, Davies J (1996) Using Z. specification, refinement, and proof. Prentice-Hall, New Jersey

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Stefan Hallerstede.

Additional information

Eerke Boiten, John Derrick, Dong Jin Song and Steve Reeves

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00165-011-0205-4

Keywords

Navigation