Skip to main content

Generating Event-B Specifications from Algorithm Descriptions

  • Conference paper
  • First Online:
Abstract State Machines, Alloy, B, TLA, VDM, and Z (ABZ 2016)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9675))

Abstract

We present a high-level algorithm description language which is translated to Event-B specifications for simulation, model checking and proof. Rather than trying to recover the program structure from a lower-level Event-B specification, we start with a high-level description of the algorithm. Our goals are more tractable code generation and more convenient modelling, while keeping the power of the Event-B method in terms of proof and refinement. We present various examples of algorithm descriptions and show that our translation ensures that they can be completely proven within Rodin while achieving a high-level of automatic proof.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Private communication with Thierry Lecomte related to [4] and experiences of the FORCOMENT project on deducing the Ariane flight sequencer from an Event-B model.

  2. 2.

    Its documentation is available online http://www.prob2.de.

  3. 3.

    The same holds for procedure calls whose treatment we omit in this article.

  4. 4.

    Our models and the standalone translation tool can be found at https://github.com/joyclark/eventb_gen.

References

  1. Abrial, J.-R.: Modeling in Event-B: System and Software Engineering, 1st edn. Cambridge University Press, New York (2010)

    Book  MATH  Google Scholar 

  2. Abrial, J.-R.: The B-Book. Cambridge University Press, New York (1996)

    Book  MATH  Google Scholar 

  3. Schneider, S.: The B-Method: An Introduction. Palgrave Macmillan, Basingstoke (2001)

    Google Scholar 

  4. Lecomte, T.: Ten years disseminating the B method. In: Attiogbe, C., Mery, D. (eds.) Proceedings of TFM-B 2010, pp. 65–72. APCB, June 2010

    Google Scholar 

  5. Hallerstede, S., Leuschel, M.: Experiments in program verification using Event-B. Formal Aspects Comput. 24(1), 97–125 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  6. Snook, C.F., Butler, M.J.: UML-B: formal modeling and design aided by UML. ACM Trans. Softw. Eng. Methodol. 15(1), 92–122 (2006)

    Article  Google Scholar 

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

    Google Scholar 

  8. Iliasov, A.: Use case scenarios as verification conditions: event-B/Flow approach. In: Troubitsyna, E.A. (ed.) SERENE 2011. LNCS, vol. 6968, pp. 9–23. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  9. Edmunds, A., Butler, M., Maamria, I., Silva, R., Lovell, C.: Event-B code generation: type extension with theories. In: Derrick, J., Fitzgerald, J., Gnesi, S., Khurshid, S., Leuschel, M., Reeves, S., Riccobene, E. (eds.) ABZ 2012. LNCS, vol. 7316, pp. 365–368. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  10. Edmunds, A.: Templates for Event-B code generation. In: Ait Ameur, Y., Schewe, K.-D. (eds.) ABZ 2014. LNCS, vol. 8477, pp. 284–289. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  11. Petit, D., Poirriez, V., Mariano, G.: The B method and the component-based approach. Trans. SDPS 8(1), 65–76 (2004)

    Google Scholar 

  12. Bert, D., Boulmé, S., Potet, M.-L., Requet, A., Voisin, L.: Adaptable translator of B specifications to embedded C programs. In: Araki, K., Gnesi, S., Mandrioli, D. (eds.) FME 2003. LNCS, vol. 2805, pp. 94–113. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  13. Requet, A.: BART: a tool for automatic refinement. In: Börger, E., Butler, M., Bowen, J.P., Boca, P. (eds.) ABZ 2008. LNCS, vol. 5238, p. 345. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  14. Lamport, L.: Specifying Systems, The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley, Boston (2002)

    Google Scholar 

  15. Yu, Y., Manolios, P., Lamport, L.: Model checking TLA+ specifications. In: Pierre, L., Kropf, T. (eds.) CHARME 1999. LNCS, vol. 1703, pp. 54–66. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  16. Chaudhuri, K., Doligez, D., Lamport, L., Merz, S.: Verifying safety properties with the TLA + proof system. In: Giesl, J., Hähnle, R. (eds.) IJCAR 2010. LNCS, vol. 6173, pp. 142–148. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  17. Rustan, K., Leino, M.: Developing verified programs with dafny. In: Proceedings ICSE 2013, pp. 1488–1490 (2013)

    Google Scholar 

  18. Koenig, J., Rustan, K., Leino, M.: Getting started with dafny: a guide. In: Nipkow, T., Grumberg, O., Hauptmann, B. (eds.) Software Safety and Security - Tools for Analysis and Verification. NATO Science for Peace and Security Series - D: Information and Communication Security, vol. 33, pp. 152–181. IOS Press (2012)

    Google Scholar 

  19. Leino, K.R.M., Rümmer, P.: A polymorphic intermediate verification language: design and logical encoding. In: Esparza, J., Majumdar, R. (eds.) TACAS 2010. LNCS, vol. 6015, pp. 312–327. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  20. Déharbe, D., Fontaine, P., Guyot, Y., Voisin, L.: SMT solvers for rodin. In: Derrick, J., Fitzgerald, J., Gnesi, S., Khurshid, S., Leuschel, M., Reeves, S., Riccobene, E. (eds.) ABZ 2012. LNCS, vol. 7316, pp. 194–207. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  21. Allen, F.E.: Control flow analysis. SIGPLAN Not. 5(7), 1–19 (1970)

    Article  Google Scholar 

  22. Hallerstede, S.: On the purpose of Event-B proof obligations. Formal Asp. Comput 23(1), 133–150 (2011)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jens Bendisposto .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Clark, J., Bendisposto, J., Hallerstede, S., Hansen, D., Leuschel, M. (2016). Generating Event-B Specifications from Algorithm Descriptions. In: Butler, M., Schewe, KD., Mashkoor, A., Biro, M. (eds) Abstract State Machines, Alloy, B, TLA, VDM, and Z. ABZ 2016. Lecture Notes in Computer Science(), vol 9675. Springer, Cham. https://doi.org/10.1007/978-3-319-33600-8_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-33600-8_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-33599-5

  • Online ISBN: 978-3-319-33600-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics