Abstract
Refactoring of UML class diagrams is an emerging research topic and heavily inspired by refactoring of program code written in object-oriented implementation languages. Current class diagram refactoring techniques concentrate on the diagrammatic part but neglect OCL constraints that might become syntactically incorrect by changing the underlying class diagram. This paper formalizes the most important refactoring rules for class diagrams and classifies them with respect to their impact on attached OCL constraints. For refactoring rules that have an impact on OCL constraints, we formalize the necessary changes of the attached constraints. Our refactoring rules are specified in a graph-grammar inspired formalism. They have been implemented as QVT transformation rules. We finally discuss for our refactoring rules the problem of syntax preservation and show, by using the KeY-system, how this can be resolved.
Similar content being viewed by others
References
Ahrendt W., Baar T., Beckert B., Bubel R., Giese M., Hähnle R., Menzel W., Mostowski W., Roth A., Schlager S., Schmitt P.H. (2005). The KeY tool. Softw. Syst. Model. 4(1): 32–54
Astels, D.: Refactoring with UML. In: Proceedings of 3rd International Conference on eXtreme Programming and Flexible Processes in Software Engineering, pp. 67–70 (2002)
Baar, T.: The definition of transitive closure with OCL— limitations and applications. In: Broy, M., Zamulin, A.V. (ed.) Perspectives of Systems Informatics, 5th International Andrei Ershov Memorial Conference, PSI 2003, Akademgorodok, Novosibirsk, Russia, 9-12 July 2003, Revised Papers, volume 2890 of LNCS, pp. 358–365. Springer, Heidelberg (2003)
Baar, T., Marković, S.: A graphical approach to prove the semantic preservation of UML/OCL refactoring rules. In: Virbitskaite, I., Voronkov, A. (eds.) Proceedings, 6th International Andrei Ershov Memorial Conference on Perspectives of System Informatics (PSI 2006), Akademgorodok near Novosibirsk, Russia, vol 4378 of LNCS, pp. 70–83. Springer, Heidelberg (2007)
Baar, T., Whittle, J.: On the usage of concrete syntax in model transformation rules. In: Virbitskaite, I., Voronkov, A. (eds.) Proceedings, 6th International Andrei Ershov Memorial Conference on Perspectives of System Informatics (PSI 2006), Akademgorodok near Novosibirsk, Russia, vol. 4378 of LNCS, pp. 84–97. Springer, Heidelberg (2007)
Beck, K.: Extreme programming explained: embrace change. Addison-Wesley, Reading (2000)
Beckert, B., Hähnle, R., Schmitt, P.H.: (eds.) Verification of Object-Oriented Software: The KeY Approach. LNAI 4334. Springer, Heidelberg (2007)
Boger, M., Sturm, T., Fragemann, P.: Refactoring browser for UML. In: Proceedings of 3rd International Conference on extreme Programming and Flexible Processes in Software Engineering, pp. 77–81 (2002)
Borland: Together technologies. http://www.borland.com/together/ (2007)
Cabot, J., Teniente, E.: Computing the relevant instances that may violate an OCL constraint. In: Pastor, O., Falcão e Cunha, J. (eds.) 17th International Conference on Advanced Information Systems Engineering, CAiSE 2005, Porto, vol. 3520 of LNCS, pp. 48–62. Springer, Heidelberg (2005)
Cabot, J., Teniente, E.: Incremental evaluation of OCL constraints. In: Dubois, E., Pohl, K. (eds.) Advanced Information Systems Engineering, 18th International Conference, CAiSE 2006, Luxembourg, Luxembourg, Proceedings, vol. 4001 of LNCS, 5–9 June 2006, pp. 81–95. Springer, Heidelberg (2006)
Correa, A., Werner, C.: Applying refactoring techniques to UML/OCL. In: Baar, T., Strohmeier, A., Moreira, A., Mellor, S.J. (eds.) UML 2004—the Unified Modeling Language. Model Languages and Applications, Lisbon, Portugal, vol. 3273 of LNCS, pp. 173–187. Springer, Heidelberg (2004)
Fowler, M.: Refactoring: Improving the Design of Existing Programs. Addison-Wesley, Reading (1999)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns: elements of reusable object-oriented software. Addison-Wesley, Reading (1995)
Van Gorp, P., Stenten, H., Mens, T., Demeyer, S.: Towards automating source-consistent UML refactorings. In: Stevens, P., Whittle, J., Booch, G. (eds.) UML 2003—The Unified Modeling Language, Modeling Languages and Applications, San Francisco, CA, USA, vol. 2863 of LNCS, pp. 144–158. Springer, Heidelberg (2003)
Kerievsky, J.: Refactoring to Patterns. Addison-Wesley, Reading (2004)
Kruchten, P.: The Rational Unified Process: An Introduction. Addison-Wesley, Reading (2004)
Marković, S., Baar, T.: Refactoring OCL annotated UML class diagrams. In: Briand, L., Williams, C. (eds.) Model Driven Engineering Languages and Systems, 8th International Conference, MoDELS 2005, Montego Bay, Jamaica, 2–7 October 2005, Proceedings, vol. 3713 of LNCS, pp. 280–294. Springer, Heidelberg (2005)
Marković, S., Baar, T.: Documentation of UML/OCL refactoring rules. http://www.roclet.org/publications/SoSymSpecialIssueModels05/, 2007
Mens T., Tourwé T. (2004). A survey of software refactoring. IEEE Trans. Softw. Eng. 30(2): 126–139
O’Cinneide, M.: Automated application of design patterns: a refactoring approach. Ph.D. Thesis, University of Dublin, Trinity College (2001)
OMG: UML 1.5 Specification. OMG Document formal/03-03-01 (2003)
OMG: UML 2.0 Infrastructure Specification. OMG Document ptc/03-09-15 (2003)
OMG: UML 2.0 OCL specification—OMG final adopted specification. OMG Document ptc/03-10-14 (2003)
OMG: Revised submission for MOF 2.0, query/views/transformations, version 1.8. OMG document ad/04-10-11 (2004)
OMG: Meta object facility (MOF) 2.0 query/view/transformation specification. OMG document ptc/05-11-01, Nov 2005
OMG: Object constraint language—OMG available specification, version 2.0. OMG document formal/06-05-01 (2006)
Opdyke, W.F.: Refactoring: A program restructuring aid in designing object-oriented application frameworks. Ph.D. Thesis, University of Illinois at Urbana-Champaign (1992)
Porres, I.: Model refactorings as rule-based update transformations. In: Stevens, P., Whittle, J., Booch, G. (eds.) UML 2003—The Unified Modeling Language, Modeling Languages and Applications, San Francisco, CA, USA, vol. 2863 of LNCS, pp. 159–174. Springer, Heidelberg (2003)
Refactoring community: refactoring homepage. http://www.refactoring.com (2007)
Rumpe, B.: Agile Modellierung mit UML. Springer, Heidelberg (2005) In German
Sendall S., Kozaczynski W. (2003). Model transformation: the heart and soul of model-driven software development. IEEE Softw 20(5): 42–45
Sunyé, G., Pennaneac’h, F., Ho, W.-M., Guennec, A.L., Jézéquel, J.-M.: Using UML action semantics for executable modeling and beyond. In: Dittrich, K.R., Geppert, A., Norrie, M.C. (eds.) Advanced Information Systems Engineering, 13th International Conference, CAiSE 2001, Interlaken, Switzerland, Proceedings, vol. 2068 of LNCS, 4–8 June 2001, pp. 433–447. Springer, Heidelberg (2001)
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Dr. Lionel Briand.
Rights and permissions
About this article
Cite this article
Marković, S., Baar, T. Refactoring OCL annotated UML class diagrams. Softw Syst Model 7, 25–47 (2008). https://doi.org/10.1007/s10270-007-0056-x
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-007-0056-x