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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Assume that a function \(\mathrm {mod2}(n)\) that returns \(n \, \mathrm {modulo} \, 2\) is defined in a context.
- 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.
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.
Available at http://tkoba.jp/software/slice_and_merge/.
- 5.
For the sake of simplicity we did not count invariants for typing.
- 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.
Models of this case study are at http://tkoba.jp/publications/fm2016/
References
Abrial, J.R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, New York (2010)
Abrial, J.R., Hallerstede, S.: Refinement, decomposition, and instantiation of discrete models: application to Event-B. Fundamenta Informaticae 77(1–2), 1–28 (2007)
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
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
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
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)
Gheyi, R., Borba, P.: Refactoring alloy specifications. Electron. Notes Theoret. Comput. Sci. 95, 227–243 (2004)
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
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)
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
Stepney, S., Polack, F., Toyn, I.: Refactoring in maintenance and development of Z specifications and proofs. ENTCS 70(3), 50–69 (2002)
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
Whiteside, I.J.: Refactoring Proofs. Ph.D. thesis, The University of Edinburgh (2013)
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
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)