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.


Modelling Language Constraint Satisfaction Problem Sequence Diagram Constraint Solver Constraint Variable 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    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)Google Scholar
  2. 2.
    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)Google Scholar
  3. 3.
    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)Google Scholar
  4. 4.
    Egyed, A.: Fixing inconsistencies in UML design models. In: Proc. of ICSE, pp. 292–301 (2007)Google Scholar
  5. 5.
    Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley, Reading (1999)zbMATHGoogle Scholar
  6. 6.
    Gheyi, R., Massoni, T., Borba, P.: A rigorous approach for proving model refactorings. In: Proc. of ASE, pp. 372–375 (2005)Google Scholar
  7. 7.
    WG Griswold Program Restructuring as an Aid to Software Maintenance (PhD Disserta-tion, University of Washington (1992)Google Scholar
  8. 8.
    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)CrossRefGoogle Scholar
  9. 9.
    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)CrossRefGoogle Scholar
  10. 10.
    OMG Unified Modeling Language Superstructure Version 2.3 (May 2010),
  11. 11.
    Object Management Group Object Constraint Language Version 2.2,
  12. 12.
    Palsberg, J., Schwartzbach, M.I.: Object-Oriented Type. Wiley, Chichester (1994)zbMATHGoogle Scholar
  13. 13.
    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)CrossRefGoogle Scholar
  14. 14.
    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)CrossRefGoogle Scholar
  15. 15.
    Pretschner, A., Prenninger, W.: Computing refactorings of state machines. Software and System Modeling 6(4), 381–399 (2007)CrossRefGoogle Scholar
  16. 16.
    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)CrossRefGoogle Scholar
  17. 17.
    Russell, S., Norvel, P.: Artificial Intelligence: A Modern Approach, 2nd edn. Prentice Hall, Englewood Cliffs (2003)Google Scholar
  18. 18.
    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)CrossRefGoogle Scholar
  19. 19.
    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)CrossRefGoogle Scholar
  20. 20.
    Steimann, F., von Pilgrim, J.: Constraint-based refactoring with foresight (unpublished manuscript ),
  21. 21.
    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)CrossRefGoogle Scholar
  22. 22.
    Tip, F., Kiezun, A., Bäumer, D.: Refactoring for generalization using type constraints. In: Proc. of OOPSLA, pp. 13–26 (2003)Google Scholar
  23. 23.
    Tip, F.: Refactoring using type constraints. In: Riis Nielson, H., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 1–17. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  24. 24.
    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)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Friedrich Steimann
    • 1
  1. 1.Lehrgebiet ProgrammiersystemeFernuniversität in HagenHagenGermany

Personalised recommendations