Advertisement

Verifiable Code Generation from Scheduled Event-B Models

  • Mohammadsadegh Dalvandi
  • Michael Butler
  • Abdolbaghi Rezazadeh
  • Asieh Salehi Fathabadi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10817)

Abstract

Scheduled Event-B (SEB) augments Event-B with a scheduling language to make the control flow in an Event-B model explicit and facilitate derivation of algorithmic structure in Event-B refinement. A concrete SEB model has a concrete algorithmic structure associated with it. Although this structure reduces the difficulty of code generation, there is still some gap between the model and executable code. This work formulates the translation of SEB models to a programming language called Dafny and proposes an approach in which a number of assertions are generated from the model that allows the verification of the generated code in a static program verifier.

Notes

Acknowledgments

This work was funded in part by the EPSRC PRiME Project (EP/K034448/1), www.prime-project.org.

References

  1. 1.
    Abrial, J.-R., Lee, M.K.O., Neilson, D.S., Scharbach, P.N., Sørensen, I.H.: The B-method. In: Prehn, S., Toetenel, H. (eds.) VDM 1991. LNCS, vol. 552, pp. 398–405. Springer, Heidelberg (1991).  https://doi.org/10.1007/BFb0020001CrossRefGoogle Scholar
  2. 2.
    Abrial, J.-R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, Cambridge (2010)CrossRefGoogle Scholar
  3. 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. Int. J. Softw. Tools Technol. Transf. 12(6), 447–466 (2010)CrossRefGoogle Scholar
  4. 4.
    Back, R.J.R., Kurki-Suonio, F.: Distributed cooperation with action systems. ACM Trans. Program. Lang. Syst. 10(4), 513–554 (1988)CrossRefGoogle Scholar
  5. 5.
    Butler, M.: Mastering system analysis and design through abstraction and refinement (2013)Google Scholar
  6. 6.
    Dalvandi, M., Butler, M., Rezazadeh, A.: Derivation of algorithmic control structures in Event-B refinement. Sci. Comput. Program. 148(Suppl. C), 49–65 (2017). Special Issue on Automated Verification of Critical Systems (AVoCS 2015)CrossRefGoogle Scholar
  7. 7.
    Dalvandi, M., Butler, M.J., Rezazadeh, A.: Transforming Event-B models to Dafny contracts. In: ECEASST, vol. 72 (2015)Google Scholar
  8. 8.
    de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008).  https://doi.org/10.1007/978-3-540-78800-3_24CrossRefGoogle Scholar
  9. 9.
    Edmunds, A., Butler, M.: Tasking Event-B: an extension to Event-B for generating concurrent code. Event Dates: 2nd April 2011, February 2011Google Scholar
  10. 10.
    Fathabadi, A.S., Butler, M.J., Yang, S., Maeda-Nunez, L.A., Bantock, J., Al-Hashimi, B.M., Merrett, G.V.: A model-based framework for software portability and verification in embedded power management systems. J. Syst. Architect. 82, 12–23 (2018)CrossRefGoogle Scholar
  11. 11.
    Hallerstede, S.: On the purpose of Event-B proof obligations. In: Börger, E., Butler, M., Bowen, J.P., Boca, P. (eds.) ABZ 2008. LNCS, vol. 5238, pp. 125–138. Springer, Heidelberg (2008).  https://doi.org/10.1007/978-3-540-87603-8_11CrossRefzbMATHGoogle Scholar
  12. 12.
    Leino, K.R.M.: This is Boogie 2. Manuscript KRML 178:131 (2008)Google Scholar
  13. 13.
    Leino, K.R.M.: Dafny: an automatic program verifier for functional correctness. In: Clarke, E.M., Voronkov, A. (eds.) LPAR 2010. LNCS (LNAI), vol. 6355, pp. 348–370. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-17511-4_20CrossRefzbMATHGoogle Scholar
  14. 14.
    Leino, K.R.M., Monahan, R.: Dafny meets the verification benchmarks challenge. In: Leavens, G.T., O’Hearn, P., Rajamani, S.K. (eds.) VSTTE 2010. LNCS, vol. 6217, pp. 112–126. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-15057-9_8CrossRefGoogle Scholar
  15. 15.
    Malcolm, G., Goguen, J.A.: Proving correctness of refinement and implementation. Computing Laboratory, Programming Research Group, Oxford University (1994)Google Scholar
  16. 16.
    Meyer, B.: Eiffel: The Language. Prentice-Hall, Inc., Upper Saddle River (1992)zbMATHGoogle Scholar
  17. 17.
    Meyer, B.: Design by Contract. Prentice Hall, Inc., Upper Saddle River (2002)Google Scholar
  18. 18.
    Wirth, N.: Extended Backus-Naur Form (EBNF). ISO/IEC 14977:2996 (1996)Google Scholar

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Mohammadsadegh Dalvandi
    • 1
  • Michael Butler
    • 1
  • Abdolbaghi Rezazadeh
    • 1
  • Asieh Salehi Fathabadi
    • 1
  1. 1.University of SouthamptonSouthamptonUK

Personalised recommendations