Constraint-Based Model Refactoring
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.
KeywordsModelling Language Constraint Satisfaction Problem Sequence Diagram Constraint Solver Constraint Variable
Unable to display preview. Download preview PDF.
- 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.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.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.Egyed, A.: Fixing inconsistencies in UML design models. In: Proc. of ICSE, pp. 292–301 (2007)Google Scholar
- 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.WG Griswold Program Restructuring as an Aid to Software Maintenance (PhD Disserta-tion, University of Washington (1992)Google Scholar
- 10.OMG Unified Modeling Language Superstructure Version 2.3 (May 2010), http://www.omg.org/spec/UML/2.3/Superstructure
- 11.Object Management Group Object Constraint Language Version 2.2, http://www.omg.org/spec/OCL/2.2
- 17.Russell, S., Norvel, P.: Artificial Intelligence: A Modern Approach, 2nd edn. Prentice Hall, Englewood Cliffs (2003)Google Scholar
- 20.Steimann, F., von Pilgrim, J.: Constraint-based refactoring with foresight (unpublished manuscript ), http://www.feu.de/ps/docs/Foresight.pdf
- 22.Tip, F., Kiezun, A., Bäumer, D.: Refactoring for generalization using type constraints. In: Proc. of OOPSLA, pp. 13–26 (2003)Google Scholar
- 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