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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The EventB2Java tool is hosted at http://poporo.uma.pt/EventB2Java/.
- 2.
Event-B models and respective Java code generated by EventB2Java can be reached at http://poporo.uma.pt/EventB2Java/EventB2Java_studies.html.
References
Abrial, J.-R.: Sequential Program Development: Teaching Resources (2009). http://deploy-eprints.ecs.soton.ac.uk/122/1/sld.ch15%2Cseq.pdf. Accessed 2015
Abrial, J.-R.: Modeling in Event-B: System and Software Design. Cambridge University Press, New York (2010)
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)
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)
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)
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)
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
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)
Méry, D., Singh, N.: Automatic code generation from Event-B models. In: Symposium on Information and Communication Technology, Hanoi, Vietnam. ACM (2011)
Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall Inc, Upper Saddle River (1997)
Ostroumov, S., Tsiopoulos, L.: VHDL code generation from formal Event-B models. In: Euromicro Conference on Digital System Design, pp. 127–134 (2011)
Víctor, R., Cataño, N.: The Social-Event Planner (2012). http://poporo.uma.pt/favas/Social-Event_Planner.html. Accessed 2015
Rivera, V., Cataño, N.: Translating Event-B to JML-specified Java programs. In: 29th ACM SAC, Gyeongju, South Korea, 24–28 March 2014
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)
State-Machines and Code Generation (2012). http://wiki.event-b.org/index.php/State-Machines_and_Code_Generation. Accessed Aug 2013
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)