Iterative Development of Consistency-Preserving Rule-Based Refactorings

Basil Becker, Leen Lambers, Johannes Dyck, Stefanie Birth, Holger Giese. Iterative Development of Consistency-Preserving Rule-Based Refactorings. In Jordi Cabot, Eelco Visser, editors, Theory and Practice of Model Transformations, Fourth International Conference, ICMT 2011, Zurich, Switzerland, June 27-28, 2011. Proceedings. Volume 6707 of Lecture Notes in Computer Science, pages 123-137, Springer, 2011.

Abstract

A model refactoring does not only need to ensure behavior preservation. First of all, it needs to ensure that specifi c well-formedness constraints of the modeling language under consideration are preserved (consistency preservation). The consistency of model refactorings can be ensured by runtime checks. However, this means that not the developer of the refactorings but the user is confronted with the problem. In this paper we present an approach to statically check for consistency preservation of rule-based refactorings at design time. Thereby, refactoring rules describe which side-e ects may take place on the model to be refactored. We formalize rule-based refactorings using graph transformation and consistency using graph constraints. We extend a veri - cation technique capable of proving statically that refactoring rule applications preserve consistency. By automatically computing meaningful counterexamples, this technique allows for the iterative development of refactoring rules guaranteeing consistency preservation. We demonstrate the approach for common Java refactorings applied to a ne grained EMF model and can show that bugs that were present in refactorings of former Eclipse versions could have been avoided using our approach.