Abstract
The Event-B method, and its tools, provide a way to formally model systems; Tasking Event-B is an extension facilitating code generation. We have recently begun to explore how we can configure the code generator, for deployment on different target systems. In this paper, we describe how templates can be used to avoid hard-coding ‘boilerplate’ code, and how to merge this with code generated from the formal model. We have developed a lightweight approach, where tags (i.e. tagged mark-up) can be placed in source templates. The template-processors we introduce may be of use to other plug-in developers wishing to merge a ‘source’ text file with some generated output.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abrial, J.R.: Modeling in Event-B: System and Software Engineering. CUP (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. Software Tools for Technology Transfer 12(6), 447–466 (2010)
Edmunds, A.: Providing Concurrent Implementations for Event-B Developments. PhD thesis, University of Southampton (March 2010)
Edmunds, A., Butler, M.: Linking Event-B and Concurrent Object-Oriented Programs. In: Refine 2008 - International Refinement Workshop (May 2008)
Edmunds, A., Butler, M.: Tasking Event-B: An Extension to Event-B for Generating Concurrent Code. In: PLACES 2011(February 2011)
Edmunds, A., Colley, J., Butler, M.: Building on the DEPLOY Legacy: Code Generation and Simulation. In: DS-Event-B-2012: Workshop on the Experience of and Advances in Developing Dependable Systems in Event-B (2012)
The Advance Project Team. Advanced Design and Verification Environment for Cyber-physical System Engineering, http://www.advance-ict.eu
The Modelica Association Project. The Functional Mock-up Interface, https://www.fmi-standard.org/
The OpenMP Architecture Review Board. The OpenMP API specification for parallel programming, http://openmp.org/wp/
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Edmunds, A. (2014). Templates for Event-B Code Generation. In: Ait Ameur, Y., Schewe, KD. (eds) Abstract State Machines, Alloy, B, TLA, VDM, and Z. ABZ 2014. Lecture Notes in Computer Science, vol 8477. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-43652-3_25
Download citation
DOI: https://doi.org/10.1007/978-3-662-43652-3_25
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-43651-6
Online ISBN: 978-3-662-43652-3
eBook Packages: Computer ScienceComputer Science (R0)