Model/code co-refactoring: An MDE approach

Model-driven engineering suggests that models are the primary artefacts of software development. This means that models may be refactored even after code has been generated from them, in which case the code must be changed to reflect the refactoring. However, as we show neither re-generating the code from the refactored model nor applying an equivalent refactoring to the generated code is sufficient to keep model and code in sync - rather, model and code need to be refactored jointly. To enable this, we investigate the technical requirements of model/code co-refactoring, and implement a model-driven solution that we evaluate using a set of open-source programs and their structural models. Results suggest that our approach is feasible.

[1]  Michael D. Ernst,et al.  HAMPI: A solver for word equations over strings, regular expressions, and context-free grammars , 2012, TSEM.

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

[3]  Jens von Pilgrim,et al.  A survey of traceability in requirements engineering and model-driven development , 2010, Software & Systems Modeling.

[4]  Friedrich Steimann,et al.  Refactorings without names , 2012, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

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

[6]  Friedrich Steimann,et al.  Constraint-Based Refactoring with Foresight , 2012, ECOOP.

[7]  Jacky Estublier,et al.  Evolution Control in MDE Projects: Controlling Model and Code Co-evolution , 2009, FSEN.

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

[9]  Friedrich Steimann Constraint-based model refactoring , 2011, MODELS'11.

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

[11]  Jim Steel,et al.  MOF QVT final adopted specification: meta object facility (MOF) 2.0 query/view/transformation specification. , 2005 .

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

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

[14]  Hassan Charaf,et al.  Novel Techniques For Model-Code Synchronization , 2008, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[15]  Andrew P. Black,et al.  How we refactor, and how we know it , 2009, 2009 IEEE 31st International Conference on Software Engineering.

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