Behavior Preservation in Model Refactoring Using DPO Transformations with Borrowed Contexts

  • Guilherme Rangel
  • Leen Lambers
  • Barbara König
  • Hartmut Ehrig
  • Paolo Baldan
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5214)

Abstract

Behavior preservation, namely the fact that the behavior of a model is not altered by the transformations, is a crucial property in refactoring. The most common approaches to behavior preservation rely basically on checking given models and their refactored versions. In this paper we introduce a more general technique for checking behavior preservation of refactorings defined by graph transformation rules. We use double pushout (DPO) rewriting with borrowed contexts, and, exploiting the fact that observational equivalence is a congruence, we show how to check refactoring rules for behavior preservation. When rules are behavior-preserving, their application will never change behavior, i.e., every model and its refactored version will have the same behavior. However, often there are refactoring rules describing intermediate steps of the transformation, which are not behavior-preserving, although the full refactoring does preserve the behavior. For these cases we present a procedure to combine refactoring rules to behavior-preserving concurrent productions in order to ensure behavior preservation. An example of refactoring for finite automata is given to illustrate the theory.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Mens, T., Gorp, P.V.: A taxonomy of model transformation. ENTCS 152, 125–142 (2006)Google Scholar
  2. 2.
    Mens, T., Tourwe, T.: A survey of software refactoring. IEEE Transactions on Software Engineering 30(2), 126–139 (2004)CrossRefGoogle Scholar
  3. 3.
    Rangel, G., König, B., Ehrig, H.: Bisimulation verification for the DPO approach with borrowed contexts. In: Proc. of GT-VMT 2007. Electronic Communications of the EASST, vol. 6 (2007)Google Scholar
  4. 4.
    Biermann, E., Ehrig, K., Köhler, C., Kuhns, G., Taentzer, G., Weiss, E.: EMF model refactoring based on graph transformation concepts. In: SeTra 2006. Electronic Communications of EASST, vol. 3 (2006)Google Scholar
  5. 5.
    Hoffmann, B., Janssens, D., Eetvelde, N.V.: Cloning and expanding graph transformation rules for refactoring. ENTCS 152, 53–67 (2006)Google Scholar
  6. 6.
    Mens, T., Taentzer, G., Runge, O.: Analysing refactoring dependencies using graph transformation. Software and Systems Modeling 6(3), 269–285 (2007)CrossRefGoogle Scholar
  7. 7.
    van Kempen, M., Chaudron, M., Kourie, D., Boake, A.: Towards proving preservation of behaviour of refactoring of UML models. In: SAICSIT 2005, South African Institute for Computer Scientists and Information Technologists, pp. 252–259 (2005)Google Scholar
  8. 8.
    Pérez, J., Crespo, Y.: Exploring a method to detect behaviour-preserving evolution using graph transformation. In: Proceedings of the Third International ERCIM Workshop on Software Evolution, pp. 114–122 (2007)Google Scholar
  9. 9.
    Narayanan, A., Karsai, G.: Towards verifying model transformations. In: Bruni, R., Varró, D. (eds.) Proc. of GT-VMT 2006, Vienna. ENTCS, pp. 185–194 (2006)Google Scholar
  10. 10.
    Van Gorp, P., Stenten, H., Mens, T., Demeyer, S.: Towards automating source-consistent UML refactorings. In: Stevens, P., Whittle, J., Booch, G. (eds.) UML 2003. LNCS, vol. 2863, pp. 144–158. Springer, Heidelberg (2003)Google Scholar
  11. 11.
    Bisztray, D., Heckel, R., Ehrig, H.: Verification of architectural refactorings by rule extraction. In: Fiadeiro, J.L., Inverardi, P. (eds.) FASE 2008. LNCS, vol. 4961, pp. 347–361. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Ehrig, H., König, B.: Deriving bisimulation congruences in the DPO approach to graph rewriting. In: Walukiewicz, I. (ed.) FOSSACS 2004. LNCS, vol. 2987, pp. 151–166. Springer, Heidelberg (2004)Google Scholar
  13. 13.
    Hirschkoff, D.: Bisimulation verification using the up-to techniques. International Journal on Software Tools for Technology Transfer 3(3), 271–285 (2001)MATHGoogle Scholar
  14. 14.
    Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Monographs in Theoretical Computer Science. An EATCS Series. Springer, New York (2006)MATHGoogle Scholar
  15. 15.
    Lambers, L.: Adhesive high-level replacement system with negative application conditions. Technical report, TU Berlin (2007)Google Scholar
  16. 16.
    Rangel, G., Lambers, L., König, B., Ehrig, H., Baldan, P.: Behavior preservation in model refactoring using DPO transformations with borrowed contexts. Technical Report 12/08, TU Berlin (2008)Google Scholar
  17. 17.
    Ehrig, H., König, B.: Deriving bisimulation congruences in the DPO approach to graph rewriting with borrowed contexts. Mathematical Structures in Computer Science 16(6), 1133–1163 (2006)MATHCrossRefMathSciNetGoogle Scholar
  18. 18.
    Corradini, A., Montanari, U., Rossi, F., Ehrig, H., Heckel, R., Loewe, M.: Algebraic approaches to graph transformation part I: Basic concepts and double pushout approach. In: Rozenberg, G. (ed.) Handbook of Graph Grammars and Computing by Graph transformation, Foundations, vol. 1, pp. 163–246. World Scientific, Singapore (1997)Google Scholar
  19. 19.
    Rangel, G.: Bisimulation Verification for Graph Transformation Systems with Borrowed Contexts. PhD thesis, TU Berlin (to appear, 2008)Google Scholar
  20. 20.
    Rangel, G., König, B., Ehrig, H.: Deriving bisimulation congruences in the presence of negative application conditions. In: Amadio, R. (ed.) FOSSACS 2008. LNCS, vol. 4962, pp. 413–427. Springer, Heidelberg (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Guilherme Rangel
    • 1
  • Leen Lambers
    • 1
  • Barbara König
    • 2
  • Hartmut Ehrig
    • 1
  • Paolo Baldan
    • 3
  1. 1.Institut für Softwaretechnik und Theoretische InformatikTechnische Universität BerlinGermany
  2. 2.Abteilung für Informatik und Angewandte KognitionswissenschaftUniversität Duisburg-EssenGermany
  3. 3.Dipartimento di Matematica Pura e ApplicataUniversità di PadovaItaly

Personalised recommendations