Abstract
A model refactoring does not only need to ensure behavior preservation. First of all, it needs to ensure that specific 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-effects 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 verification 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 fine grained EMF model and can show that bugs that were present in refactorings of former Eclipse versions could have been avoided using our approach.
Keywords
This work was partially developed in the course of the project - Correct Model Transformations - Hasso Plattner Institut, Universität Potsdam and was published on its behalf and funded by the Deutsche Forschungsgemeinschaft. See http://www.hpi.uni-potsdam.de/giese/projekte/kormoran.html?L=1.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Becker, B., Beyer, D., Giese, H., Klein, F., Schilling, D.: Symbolic Invariant Verification for Systems with Dynamic Structural Adaptation. In: Proc. of the 28th International Conference on Software Engineering (ICSE). ACM Press, New York (2006)
Biermann, E., Ehrig, K., Köhler, C., Kuhns, G., Taentzer, G., Weiss, E.: EMF Model Refactoring based on Graph Transformation Concepts Electronic Communication of the EASST 3 (2006)
Bisztray, D., Heckel, R., Ehrig, H.: Compositional verification of architectural refactorings. In: de Lemos, R., Fabre, J.-C., Gacek, C., Gadducci, F., ter Beek, M. (eds.) Architecting Dependable Systems VI. LNCS, vol. 5835, pp. 308–333. Springer, Heidelberg (2009)
Cornélio, M., Cavalcanti, A., Sampaio, A.: Sound refactorings. Science of Computer Programming 75(3), 106–133 (2010)
Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Springer, Heidelberg (2006)
Ehrig, H., Habel, A., Lambers, L.: Parallelism and Concurrency Theorems for Rules with Nested Application Conditions. In: Festschrift dedicated to Hans-Jorg Kreowski at the Occasion of his 60th Birthday, EC-EASST, vol. 26 (2010)
Engels, G., Heckel, R., Küster, J., Groenewegen, L.: Consistency-Preserving Model Evolution through Transformations. In: Jézéquel, J.-M., Hussmann, H., Cook, S. (eds.) UML 2002. LNCS, vol. 2460, pp. 212–226. Springer, Heidelberg (2002)
Folli, A., Mens, T.: Refactoring of UML models using AGG. Electronic Communication of the EASST 8 (2007)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Object Technology Series. Addison-Wesley, Reading (1999)
Garrido, A., Meseguer, J.: Formal Specification and Verification of Java Refactorings. In: Proc. of 6th IEEE Intl. Workshop on Source Code Analysis and Manipulation SCAM 2006, pp. 165–174. IEEE Computer Society, Los Alamitos (2006)
Giese, H., Hildebrandt, S., Seibel, A.: Improved flexibility and scalability by interpreting story diagrams. In: Proceedings of the Eighth International Workshop on Graph Transformation and Visual Modeling Techniques (GT-VMT 2009), vol. 18. Electronic Communications of the EASST (2009)
Heidenreich, F., Johannes, J., Seifert, M., Wende, C.: Closing the Gap between Modelling and Java. In: van den Brand, M., Gašević, D., Gray, J. (eds.) SLE 2009. LNCS, vol. 5969, pp. 374–383. Springer, Heidelberg (2010)
Lambers, L.: Certifying Rule-Based Models using Graph Transformation. Ph.D. thesis, Technische Universität Berlin (2010)
Mens, T., Eetvelde, N.V., Demeyer, S., Janssens, D.: Formalizing refactorings with graph transformations. Journal of Software Maintenance and Evolution: Research and Practice 17(4), 247–276 (2005)
Mens, T., Taentzer, G., Runge, O.: Analysing refactoring dependencies using graph transformation. Software and Systems Modeling 6(3), 269–285 (2007)
Rangel, G., Lambers, L., König, B., Ehrig, H., Baldan, P.: Behavior Preservation in Model Refactoring using DPO Transformations with Borrowed Contexts. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214, pp. 242–256. Springer, Heidelberg (2008)
Van Der Straeten, R., D’Hondt, M.: Model refactorings through rule-based inconsistency resolution. In: Proc. of the ACM Symposium on Applied Computing, pp. 1210–1217. ACM, New York (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Becker, B., Lambers, L., Dyck, J., Birth, S., Giese, H. (2011). Iterative Development of Consistency-Preserving Rule-Based Refactorings. In: Cabot, J., Visser, E. (eds) Theory and Practice of Model Transformations. ICMT 2011. Lecture Notes in Computer Science, vol 6707. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-21732-6_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-21732-6_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-21731-9
Online ISBN: 978-3-642-21732-6
eBook Packages: Computer ScienceComputer Science (R0)