Abstract
The UML standard specifies well-formedness rules as constraints on UML models. To be correct, refactoring of a model must take these constraints into account and check that they are still satisfied after a refactoring has been performed — if not, the refactoring must be refused. With constraint-based refactoring, constraint checking is replaced by constraint solving, lifting the role of constraints from permitting or denying a tentative refactoring to computing additional model changes required for the refactoring to be executable. Thus, to the degree that the semantics of a modelling language is specified using constraints, refactorings based on these constraints are guaranteed to be meaning preserving. To enable the reuse of pre-existing constraints for refactoring, we present a mapping from well-formedness rules as provided by the UML standard to constraint rules as required by constraint-based refactoring. Using these mappings, models can be refactored at no extra cost; if refactorings fail, the lack of meaning preservation points us to how the constraint-based semantic specifications of the modelling language can be improved.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Ali, S., Iqbal, M.Z., Arcuri, A., Briand, L.: A search-based OCL constraint solver for model-based test data generation. In: Proc. of QSIC, pp. 41–50 (2011)
Cabot, J., Clarisó, R., Riera, D.: UMLtoCSP: A tool for the formal verification of UML/OCL models using constraint programming. In: Proc. of ASE, pp. 547–548 (2007)
Correa, A.L., Werner, C.M.L.: Applying refactoring techniques to UML/OCL models. In: Baar, T., Strohmeier, A., Moreira, A., Mellor, S.J. (eds.) UML 2004. LNCS, vol. 3273, pp. 173–187. Springer, Heidelberg (2004)
Egyed, A.: Fixing inconsistencies in UML design models. In: Proc. of ICSE, pp. 292–301 (2007)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley, Reading (1999)
Gheyi, R., Massoni, T., Borba, P.: A rigorous approach for proving model refactorings. In: Proc. of ASE, pp. 372–375 (2005)
WG Griswold Program Restructuring as an Aid to Software Maintenance (PhD Disserta-tion, University of Washington (1992)
Moha, N., Mahé, V., Barais, O., Jézéquel, J.-M.: Generic model refactorings. In: Schürr, A., Selic, B. (eds.) MODELS 2009. LNCS, vol. 5795, pp. 628–643. Springer, Heidelberg (2009)
Nethercote, N., Stuckey, P.J., Becket, R., Brand, S., Duck, G.J., Tack, G.R.: MiniZinc: Towards a standard CP modelling language. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 529–543. Springer, Heidelberg (2007)
OMG Unified Modeling Language Superstructure Version 2.3 (May 2010), http://www.omg.org/spec/UML/2.3/Superstructure
Object Management Group Object Constraint Language Version 2.2, http://www.omg.org/spec/OCL/2.2
Palsberg, J., Schwartzbach, M.I.: Object-Oriented Type. Wiley, Chichester (1994)
Philipps, J., Rumpe, B.: Refactoring of programs and specifications. In: Practical Foundations of Business and System Specifications, pp. 281–297. Kluwer Academic Publishers, Dordrecht (2003)
Porres, I.: Model refactorings as rule-based update transformations. In: Stevens, P., Whittle, J., Booch, G. (eds.) UML 2003. LNCS, vol. 2863, pp. 159–174. Springer, Heidelberg (2003)
Pretschner, A., Prenninger, W.: Computing refactorings of state machines. Software and System Modeling 6(4), 381–399 (2007)
Reimann, J., Seifert, M., Aßmann, U.: Role-based generic model refactoring. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) MODELS 2010. LNCS, vol. 6395, pp. 78–92. Springer, Heidelberg (2010)
Russell, S., Norvel, P.: Artificial Intelligence: A Modern Approach, 2nd edn. Prentice Hall, Englewood Cliffs (2003)
Steimann, F., Thies, A.: From public to private to absent: Refactoring java programs under constrained accessibility. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 419–443. Springer, Heidelberg (2009)
Steimann, F., Kollee, C., von Pilgrim, J.: A refactoring constraint language and its application to eiffel. In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 255–280. Springer, Heidelberg (2011)
Steimann, F., von Pilgrim, J.: Constraint-based refactoring with foresight (unpublished manuscript ), http://www.feu.de/ps/docs/Foresight.pdf
Sunyé, G., Pollet, D., Le Traon, Y., Jézéquel, J.-M.: Refactoring UML models. In: Gogolla, M., Kobryn, C. (eds.) UML 2001. LNCS, vol. 2185, pp. 134–148. Springer, Heidelberg (2001)
Tip, F., Kiezun, A., Bäumer, D.: Refactoring for generalization using type constraints. In: Proc. of OOPSLA, pp. 13–26 (2003)
Tip, F.: Refactoring using type constraints. In: Riis Nielson, H., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 1–17. Springer, Heidelberg (2007)
Xiong, Y., Hu, Z., Zhao, H., Song, H., Takeichi, M., Mei, H.: Supporting automatic model incon-sistency fixing. In: Proc. of ESEC/SIGSOFT FSE, pp. 315–324 (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Steimann, F. (2011). Constraint-Based Model Refactoring. In: Whittle, J., Clark, T., Kühne, T. (eds) Model Driven Engineering Languages and Systems. MODELS 2011. Lecture Notes in Computer Science, vol 6981. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-24485-8_32
Download citation
DOI: https://doi.org/10.1007/978-3-642-24485-8_32
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-24484-1
Online ISBN: 978-3-642-24485-8
eBook Packages: Computer ScienceComputer Science (R0)