Abstract
Refactoring is a method for improving the structure of programs/specifications as to enhance readability, modularity and reusability. Refactorings are required to be behaviour-preserving in that – to an external observer – no difference between the program before and after refactoring is visible. In this paper, we develop refactorings for an object-oriented specification formalism combining a state-based language (Object-Z) with a process algebra (CSP). In contrast to OO-programming languages, refactorings moving methods or attributes up and down the class hierarchy, in addition, need to change CSP processes. We formally prove behaviour preservation with respect to the failures-divergences model of CSP.
This work was partially funded by the German Research Council DFG under grant WE 2290/6-1.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Baar, T., Markovic̀., S.: A Graphical Approach to Prove the Semantic Preservation of UML/OCL Refactoring Rules. Technical report, Ecole Polytechnique Fédérale de Lausanne (2006)
Bannwart, F., Müller, P.: Changing Programs Correctly: Refactoring with Specifications. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006. LNCS, vol. 4085, pp. 492–507. Springer, Heidelberg (2006)
Cornélio, M.L., Cavalcanti, A.L.C., Sampaio, A.C.A.: Refactoring by Transformation. In: REFINE’2002. Eletronic Notes in Theoretical Computer Science, vol. 70, Elsevier, Amsterdam (2002)
Cornélio, M.L.: Refactorings as Formal Refinment. PhD thesis, Universidade Federal de Pernambuco (2004)
Derrick, J., Boiten, E.A.: Refinement in Z and Object-Z. Springer, Heidelberg (2001)
de Roever, W.-P., Engelhardt, K.: Data Refinement: Model-Oriented Proof Methods and their Comparison. CUP (1998)
Derrick, J., Wehrheim, H.: Model Transformations Incorporating Multiple Views. In: Johnson, M., Vene, V. (eds.) AMAST 2006. LNCS, vol. 4019, pp. 111–126. Springer, Heidelberg (2006)
Formal Systems (Europe) Ltd. Failures-Divergence Refinement: FDR2 User Manual (October 1997)
Fischer, C.: A combination of Object-Z and CSP. In: FMOODS ’97, vol. 2, pp. 423–438. Chapman & Hall, Sydney, Australia (1997)
Fischer, C.: Combination and Implementation of Processes and Data: from CSP-OZ to Java. PhD thesis, University of Oldenburg (2000)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Reading (2004)
Hoare, C.A.R.: Communicating sequential processes. Prentice-Hall, Englewood Cliffs (1985)
Heckel, R., Thöne, S.: Behavior-preserving refinement relations between dynamic software architectures. In: Fiadeiro, J.L., Mosses, P.D., Orejas, F. (eds.) WADT 2004. LNCS, vol. 3423, pp. 1–27. Springer, Heidelberg (2005)
Küster, J., Heckel, R., Engels, G.: Defining and validating transformations of UML models. In: HCC, pp. 145–152. IEEE Computer Society Press, Los Alamitos (2003)
McComb, T.: Refactoring Object-Z Specifications. In: Wermelinger, M., Margaria-Steffen, T. (eds.) FASE 2004. LNCS, vol. 2984, pp. 69–83. Springer, Heidelberg (2004)
Mens, T., Van Eetvelde, N., Demeyer, S., Janssens, D.: Formalizing refactorings with graph transformations. Journal of Software Maintenance 17(4), 247–276 (2005)
McComb, T., Smith, G.: Architectural Design in Object-Z. In: ASWEC’04. Australian Software Engineering Conference, pp. 77–86. IEEE Computer Society Press, Los Alamitos (2004)
McComb, T., Smith, G.: Refactoring object-oriented specifications: A process for deriving designs. Technical Report SSE-2006-01, University of Queensland, Australia (May 2006)
Mens, T., Tourwé, T.: A survey of software refactoring. IEEE Trans. Software Eng. 30(2), 126–139 (2004)
Roscoe, W.: The Theory and Practice of Concurrency. Prentice-Hall, Englewood Cliffs (1997)
Ruhroth, Th.: Refactoring Object-Z Specifications. In: 18th Nordic Workshop on Programming Theory (2006)
Van Der Straeten, R., D’Hondt, M.: Model refactorings through rule-based inconsistency resolution. In: Bézivin, J. (ed.) Proceedings of the 2006 ACM Symposium on Applied Computing, pp. 71210–71217. ACM Press, New York (2006)
Smith, G.: The Object-Z Specification Language. KAP (2000)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 IFIP International Federation for Information Processing
About this paper
Cite this paper
Ruhroth, T., Wehrheim, H. (2007). Refactoring Object-Oriented Specifications with Data and Processes. In: Bonsangue, M.M., Johnsen, E.B. (eds) Formal Methods for Open Object-Based Distributed Systems. FMOODS 2007. Lecture Notes in Computer Science, vol 4468. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-72952-5_15
Download citation
DOI: https://doi.org/10.1007/978-3-540-72952-5_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-72919-8
Online ISBN: 978-3-540-72952-5
eBook Packages: Computer ScienceComputer Science (R0)