Skip to main content

EventB2Java: A Code Generator for Event-B

  • Conference paper
  • First Online:
NASA Formal Methods (NFM 2016)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9690))

Included in the following conference series:

Abstract

Event-B is a formal specification language and a methodology used to build software systems. Formal specifications are more useful when they can be executed. An executable formal specification provides insight on the behaviour of the system being modelled w.r.t an expected behaviour. This paper presents a tool that generates executable implementations of Event-B models. The tool is implemented as a plug-in of the Rodin platform, an Eclipse IDE that provides a set of tools to work with Event-B models. Our tool has extensively been used for generating code for Event-B models of Android applications, reactive systems, Smart Cards, searching algorithms, among others. The first author regularly uses EventB2Java in teaching to help master students of Software Engineering to get a better grasp of the behaviour of a model in Event-B and to detect inconsistencies in the model.

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 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.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

Notes

  1. 1.

    The EventB2Java tool is hosted at http://poporo.uma.pt/EventB2Java/.

  2. 2.

    Event-B models and respective Java code generated by EventB2Java can be reached at http://poporo.uma.pt/EventB2Java/EventB2Java_studies.html.

References

  1. Abrial, J.-R.: Sequential Program Development: Teaching Resources (2009). http://deploy-eprints.ecs.soton.ac.uk/122/1/sld.ch15%2Cseq.pdf. Accessed 2015

  2. Abrial, J.-R.: Modeling in Event-B: System and Software Design. Cambridge University Press, New York (2010)

    Book  MATH  Google Scholar 

  3. Abrial, J.-R., Butler, M., Hallerstede, S., Hoang, T.S., Mehta, F., Voisin, L.: Rodin: an open toolset for modelling and reasoning in Event-B. Softw. Tools Technol. Transf. 12(6), 447–466 (2010)

    Article  Google Scholar 

  4. Catano, N., Rueda, C.: Teaching formal methods for the unconquered territory. In: Gibbons, J., Oliveira, J.N. (eds.) TFM 2009. LNCS, vol. 5846, pp. 2–19. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  5. Catano, N., Rueda, C.: Matelas: a predicate calculus common formal definition for social networking. In: Frappier, M., Glässer, U., Khurshid, S., Laleau, R., Reeves, S. (eds.) ABZ 2010. LNCS, vol. 5977, pp. 259–272. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  6. Edmunds, A., Butler, M.: Tool support for Event-B code generation. In: Workshop on Tool Building in Formal Methods, Québec, Canada. John Wiley and Sons (2010)

    Google Scholar 

  7. Edmunds, A., Rezazedeh, A.: Development of a Heating Controller System (2011). http://wiki.event-b.org/index.php/Development_of_a_Heating_Controller_System. Accessed Mar 2015

  8. Leavens, G., Baker, A., Ruby, C.: Preliminary design of JML: a behavioral interface specification language for Java. ACM Spec. Interest Group Softw. Eng. 31(3), 1–38 (2006)

    Article  Google Scholar 

  9. Méry, D., Singh, N.: Automatic code generation from Event-B models. In: Symposium on Information and Communication Technology, Hanoi, Vietnam. ACM (2011)

    Google Scholar 

  10. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall Inc, Upper Saddle River (1997)

    MATH  Google Scholar 

  11. Ostroumov, S., Tsiopoulos, L.: VHDL code generation from formal Event-B models. In: Euromicro Conference on Digital System Design, pp. 127–134 (2011)

    Google Scholar 

  12. Víctor, R., Cataño, N.: The Social-Event Planner (2012). http://poporo.uma.pt/favas/Social-Event_Planner.html. Accessed 2015

  13. Rivera, V., Cataño, N.: Translating Event-B to JML-specified Java programs. In: 29th ACM SAC, Gyeongju, South Korea, 24–28 March 2014

    Google Scholar 

  14. Rivera, V., Cataño, N., Wahls, T., Rueda, C.: Code generation for Event-B. Int. J. Softw. Tools Technol. Transf. (STTT), pp. 1–22 (2015)

    Google Scholar 

  15. State-Machines and Code Generation (2012). http://wiki.event-b.org/index.php/State-Machines_and_Code_Generation. Accessed Aug 2013

  16. Wright, S.: Automatic generation of C from Event-B. In: Workshop on Integration of Model-based Formal Methods and Tools, Nantes, France. Springer-Verlag (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Víctor Rivera .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Cataño, N., Rivera, V. (2016). EventB2Java: A Code Generator for Event-B. In: Rayadurgam, S., Tkachuk, O. (eds) NASA Formal Methods. NFM 2016. Lecture Notes in Computer Science(), vol 9690. Springer, Cham. https://doi.org/10.1007/978-3-319-40648-0_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-40648-0_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-40647-3

  • Online ISBN: 978-3-319-40648-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics