Skip to main content

Refactoring Refinement Structure of Event-B Machines

  • Conference paper
  • First Online:
FM 2016: Formal Methods (FM 2016)

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

Included in the following conference series:

Abstract

Refinement in formal specifications has received significant attention as a method to gradually construct a rigorous model. Although refactoring methods for formal specifications have been proposed, there are no methods for refactoring of refinement structures in formal specifications. In this paper, we describe a method to restructure refinements in specifications of Event-B, a formal specification method with supports for refinement. The core of our method is decomposition of refinements. Namely, when an abstract Event-B machine A, a concrete machine C refining A, and a slicing strategy are provided, our method constructs a consistent intermediate machine B, which refines A and is refined by C. We show effectiveness of our methods through two case studies on representative usages of our method: decomposition of large-scale refinements and extraction of reusable parts of specifications.

This work is partially supported by JSPS KAKENHI Grant Number 26700005.

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

Notes

  1. 1.

    Assume that a function \(\mathrm {mod2}(n)\) that returns \(n \, \mathrm {modulo} \, 2\) is defined in a context.

  2. 2.

    Actually static predicates (axioms) and predicates of event parameters are also included in POs. We will omit them for the sake of simplicity.

  3. 3.

    BAPs that are expressible by \(V_{\mathrm {B}}\cup V_{\mathrm {B}}'\) are also specified, where \(V_{\mathrm {B}}'\) represents the set of after-state variables of \(V_{\mathrm {B}}\).

  4. 4.

    Available at http://tkoba.jp/software/slice_and_merge/.

  5. 5.

    For the sake of simplicity we did not count invariants for typing.

  6. 6.

    There were differences in the actual specifications, because several invariants were moved in order to abstract the intermediate machines and the refinement structures of the events were changed.

  7. 7.

    Models of this case study are at http://tkoba.jp/publications/fm2016/

References

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

    Book  MATH  Google Scholar 

  2. Abrial, J.R., Hallerstede, S.: Refinement, decomposition, and instantiation of discrete models: application to Event-B. Fundamenta Informaticae 77(1–2), 1–28 (2007)

    MathSciNet  MATH  Google Scholar 

  3. Butler, M.: Decomposition structures for Event-B. In: Leuschel, M., Wehrheim, H. (eds.) IFM 2009. LNCS, vol. 5423, pp. 20–38. Springer, Heidelberg (2009). doi:10.1007/978-3-642-00255-7_2

    Chapter  Google Scholar 

  4. Clarke, E., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-guided abstraction refinement. In: Emerson, E.A., Sistla, A.P. (eds.) CAV 2000. LNCS, vol. 1855, pp. 154–169. Springer, Heidelberg (2000). doi:10.1007/10722167_15

    Chapter  Google Scholar 

  5. Correa, A., Werner, C., Barros, M.: An empirical study of the impact of OCL smells and refactorings on the understandability of OCL specifications. In: Engels, G., Opdyke, B., Schmidt, D.C., Weil, F. (eds.) MODELS 2007. LNCS, vol. 4735, pp. 76–90. Springer, Heidelberg (2007). doi:10.1007/978-3-540-75209-7_6

    Chapter  Google Scholar 

  6. Degiovanni, R., Alrajeh, D., Aguirre, N., Uchitel, S.: Automated goal operationalisation based on interpolation and SAT solving. In: Proceedings of the 36th International Conference on Software Engineering, pp. 129–139. ACM, New York (2014)

    Google Scholar 

  7. Gheyi, R., Borba, P.: Refactoring alloy specifications. Electron. Notes Theoret. Comput. Sci. 95, 227–243 (2004)

    Article  Google Scholar 

  8. Marković, S., Baar, T.: Refactoring OCL annotated UML class diagrams. In: Briand, L., Williams, C. (eds.) MODELS 2005. LNCS, vol. 3713, pp. 280–294. Springer, Heidelberg (2005). doi:10.1007/11557432_21

    Chapter  Google Scholar 

  9. Matichuk, D., Murray, T., Andronick, J., Jeffery, R., Klein, G., Staples, M.: Empirical Study Towards a Leading Indicator for Cost of Formal Software Verification. In: Proceedings of the 37th International Conference on Software Engineering. pp. 722–732. ACM, New York (2015)

    Google Scholar 

  10. McComb, T., Smith, G.: A minimal set of refactoring rules for object-Z. In: Barthe, G., Boer, F.S. (eds.) FMOODS 2008. LNCS, vol. 5051, pp. 170–184. Springer, Heidelberg (2008). doi:10.1007/978-3-540-68863-1_11

    Chapter  Google Scholar 

  11. Stepney, S., Polack, F., Toyn, I.: Refactoring in maintenance and development of Z specifications and proofs. ENTCS 70(3), 50–69 (2002)

    MATH  Google Scholar 

  12. Tarasyuk, A., Pereverzeva, I., Troubitsyna, E., Latvala, T.: The formal derivation of mode logic for autonomous satellite flight formation. In: Koornneef, F., Gulijk, C. (eds.) SAFECOMP 2015. LNCS, vol. 9337, pp. 29–43. Springer, Heidelberg (2015). doi:10.1007/978-3-319-24255-2_4

    Chapter  Google Scholar 

  13. Whiteside, I.J.: Refactoring Proofs. Ph.D. thesis, The University of Edinburgh (2013)

    Google Scholar 

  14. Yaghoubi Shahir, H., Farahbod, R., Glässer, U.: Refactoring abstract state machine models. In: Derrick, J., Fitzgerald, J., Gnesi, S., Khurshid, S., Leuschel, M., Reeves, S., Riccobene, E. (eds.) ABZ 2012. LNCS, vol. 7316, pp. 345–348. Springer, Heidelberg (2012). doi:10.1007/978-3-642-30885-7_28

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tsutomu Kobayashi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing AG

About this paper

Cite this paper

Kobayashi, T., Ishikawa, F., Honiden, S. (2016). Refactoring Refinement Structure of Event-B Machines. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds) FM 2016: Formal Methods. FM 2016. Lecture Notes in Computer Science(), vol 9995. Springer, Cham. https://doi.org/10.1007/978-3-319-48989-6_27

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-48989-6_27

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-48988-9

  • Online ISBN: 978-3-319-48989-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics