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.

[1]  Jean-Marc Jézéquel,et al.  Refactoring UML Models , 2001, UML.

[2]  Alexander Egyed,et al.  Fixing Inconsistencies in UML Design Models , 2007, 29th International Conference on Software Engineering (ICSE'07).

[3]  Jens Palsberg,et al.  Object-oriented type systems , 1994, Wiley professional computing.

[4]  Cláudia Maria Lima Werner,et al.  Applying Refactoring Techniques to UML/OCL Models , 2004, UML.

[5]  William G. Griswold Program restructuring as an aid to software maintenance , 1992 .

[6]  Alain Wegmann,et al.  Practical Foundations of Business and System Specifications , 2003 .

[7]  Lionel C. Briand,et al.  A Search-Based OCL Constraint Solver for Model-Based Test Data Generation , 2011, 2011 11th International Conference on Quality Software.

[8]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[9]  Paulo Borba,et al.  A rigorous approach for proving model refactorings , 2005, ASE.

[10]  Ivan Porres,et al.  Model Refactorings as Rule-Based Update Transformations , 2003, UML.

[11]  Uwe Aßmann,et al.  Role-based generic model refactoring , 2010, MODELS'10.

[12]  Kevin Lano,et al.  Slicing of UML models using model transformations , 2010, MODELS'10.

[13]  Olivier Barais,et al.  Generic Model Refactorings , 2009, MoDELS.

[14]  Peter J. Stuckey,et al.  MiniZinc: Towards a Standard CP Modelling Language , 2007, CP.

[15]  Frank Tip,et al.  Refactoring using type constraints , 2011, TOPL.

[16]  Frank Tip,et al.  Refactoring for generalization using type constraints , 2003, OOPSLA '03.

[17]  Christian Bessière Principles and Practice of Constraint Programming - CP 2007, 13th International Conference, CP 2007, Providence, RI, USA, September 23-27, 2007, Proceedings , 2007, CP.

[18]  Peter Norvig,et al.  Artificial intelligence - a modern approach, 2nd Edition , 2003, Prentice Hall series in artificial intelligence.

[19]  Peter Norvig,et al.  Artificial Intelligence: A Modern Approach , 1995 .

[20]  Alexander Pretschner,et al.  Computing refactorings of state machines , 2007, Software & Systems Modeling.

[21]  Bernhard Rumpe,et al.  Refactoring of Programs and Specifications , 2003 .

[22]  Friedrich Steimann,et al.  From Public to Private to Absent: Refactoring Java Programs under Constrained Accessibility , 2009, ECOOP.

[23]  Jordi Cabot,et al.  UMLtoCSP: a tool for the formal verification of UML/OCL models using constraint programming , 2007, ASE.

[24]  Andrew D. Gordon,et al.  Maintaining Database Integrity with Refinement Types , 2011, ECOOP.

[25]  Friedrich Steimann,et al.  A Refactoring Constraint Language and Its Application to Eiffel , 2011, ECOOP.

[26]  Haiyan Zhao,et al.  Supporting automatic model inconsistency fixing , 2009, ESEC/SIGSOFT FSE.

[27]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.

[28]  Martin Fowler. Refactoring Improving the Design of Existing Code , 1999 .