Advertisement

A Tutorial on Graph Transformation

  • Barbara König
  • Dennis NolteEmail author
  • Julia Padberg
  • Arend Rensink
Chapter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10800)

Abstract

Graph transformation or graph rewriting has been developed for nearly 50 years and has become a mature and manifold formal technique. Basically, rewrite rules are used to manipulate graphs. These rules are given by a left-hand side and a right-hand side graph and the application comprises matching the left-hand side and replacing it with the right-hand side of the rule.

In this contribution we give a tutorial on graph transformation that explains the so-called double-pushout approach to graph transformation in a rigorous, but non-categorical way, using a gluing construction. We explicate the definitions with several small examples.

We also introduce attributes and attributed graph transformation in a lightweight form. The paper is concluded by a more extensive example on a leader election protocol, the description of tool support and pointers to related work.

Notes

Acknowledgements

We would like to thank all the participants of the North German GraTra Day in February 2017 in Hamburg for the discussion about this paper. Especially, we would like to acknowledge Berthold Hoffmann, Leen Lambers and Hans-Jörg Kreowski who contributed by commenting on our paper and giving valuable suggestions and hints.

References

  1. 1.
    Andries, M., Engels, G., Habel, A., Hoffmann, B., Kreowski, H.-J., Kuske, S., Plump, D., Schürr, A., Taentzer, G.: Graph transformation for specification and programming. Sci. Comput. Program. 34(1), 1–54 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Bezem, M., Klop, J.W., de Vrijer, R. (eds.): Term Rewriting Systems. Cambridge University Press, Cambridge (2003)zbMATHGoogle Scholar
  3. 3.
    Chang, E.J.H., Roberts, R.: An improved algorithm for decentralized extrema-finding in circular configurations of processes. Commun. ACM 22(5), 281–283 (1979)CrossRefzbMATHGoogle Scholar
  4. 4.
    Corradini, A., Montanari, U., Rossi, F., Ehrig, H., Heckel, R., Löwe, 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, Volume 1: Foundations. World Scientific (1997). Chapter 3Google Scholar
  5. 5.
    Courcelle, B., Engelfriet, J.: Graph Structure and Monadic Second-Order Logic, A Language-Theoretic Approach. Cambridge University Press, New York (2012)CrossRefzbMATHGoogle Scholar
  6. 6.
    Csertán, G., Huszerl, G., Majzik, I., Pap, Z., Pataricza, A., Varró, D.: VIATRA - visual automated transformations for formal verification and validation of UML models. In: 17th IEEE International Conference on Automated Software Engineering, pp. 267–270. IEEE Computer Society (2002)Google Scholar
  7. 7.
    Danos, V., Feret, J., Fontana, W., Harmer, R., Hayman, J., Krivine, J., Thompson-Walsh, C.D., Winskel, G.: Graphs, rewriting and pathway reconstruction for rule-based models. In: Proceedings of the FSTTCS 2012. LIPIcs, vol. 18. Schloss Dagstuhl - Leibniz Center for Informatics (2012)Google Scholar
  8. 8.
    Lara, J., Vangheluwe, H.: AToM3: a tool for multi-formalism and meta-modelling. In: Kutsche, R.-D., Weber, H. (eds.) FASE 2002. LNCS, vol. 2306, pp. 174–188. Springer, Heidelberg (2002).  https://doi.org/10.1007/3-540-45923-5_12 CrossRefGoogle Scholar
  9. 9.
    Dershowitz, N., Jouannaud, J.-P.: Rewrite systems. In: van Leeuwen, J. (eds.) Formal Models and Semantics. Handbook of Theoretical Computer Science, vol. B, pp. 243–320. Elsevier (1990). Chapter 6Google Scholar
  10. 10.
    Ehrig, H.: Introduction to the algebraic theory of graph grammars (a survey). In: Claus, V., Ehrig, H., Rozenberg, G. (eds.) Graph Grammars 1978. LNCS, vol. 73, pp. 1–69. Springer, Heidelberg (1979).  https://doi.org/10.1007/BFb0025714 CrossRefGoogle Scholar
  11. 11.
    Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Monographs in Theoretical Computer Science. Springer, Heidelberg (2006).  https://doi.org/10.1007/3-540-31188-2 zbMATHGoogle Scholar
  12. 12.
    Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.): Handbook of Graph Grammars and Computing by Graph Transformation. Applications Languages and Tools. World Scientific, Singapore (1999)zbMATHGoogle Scholar
  13. 13.
    Ehrig, H., Ermel, C., Golas, U., Hermann, F.: Graph and Model Transformation - General Framework and Applications. Monographs in Theoretical Computer Science. Springer, Heidelberg (2015).  https://doi.org/10.1007/978-3-662-47980-3 CrossRefzbMATHGoogle Scholar
  14. 14.
    Ehrig, H., König, B.: Deriving bisimulation congruences in the DPO approach to graph rewriting with borrowed contexts. Math. Struct. Comput. Sci. 16(6), 1133–1163 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Ehrig, H., Kreowski, H.-J., Montanari, U., Rozenberg, G. (eds.): Handbook of Graph Grammars and Computing by Graph Transformation. Concurrency, Parallellism, and Distribution. World Scientific, Singapore (1999)zbMATHGoogle Scholar
  16. 16.
    Ehrig, H., Mahr, B.: Fundamentals of Algebraic Specification 1, Equations and Initial Semantics. Monographs in Theoretical Computer Science. Springer, Heidelberg (1985).  https://doi.org/10.1007/978-3-642-69962-7 CrossRefzbMATHGoogle Scholar
  17. 17.
    Ehrig, H., Pfender, M., Schneider, H.: Graph grammars: an algebraic approach. In: Proceedings of the 14th IEEE Symposium on Switching and Automata Theory, pp. 167–180 (1973)Google Scholar
  18. 18.
    Ehrig, H., Prange, U., Taentzer, G.: Fundamental theory for typed attributed graph transformation. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 161–177. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-540-30203-2_13 CrossRefGoogle Scholar
  19. 19.
    Fokkink, W.: Introduction to Process Algebra. Springer, Heidelberg (2000).  https://doi.org/10.1007/978-3-662-04293-9 CrossRefzbMATHGoogle Scholar
  20. 20.
    Ghamarian, A.H., de Mol, M.J., Rensink, A., Zambon, E., Zimakova, M.V.: Modelling and analysis using groove. Int. J. Soft. Tools Technol. Transf. 14(1), 15–40 (2012)CrossRefGoogle Scholar
  21. 21.
    Giese, H., Lambers, L., Becker, B., Hildebrandt, S., Neumann, S., Vogel, T., Wätzoldt, S.: Graph transformations for MDE, adaptation, and models at runtime. In: Bernardo, M., Cortellessa, V., Pierantonio, A. (eds.) SFM 2012. LNCS, vol. 7320, pp. 137–191. Springer, Heidelberg (2012).  https://doi.org/10.1007/978-3-642-30982-3_5 CrossRefGoogle Scholar
  22. 22.
    Habel, A., Pennemann, K.-H.: Nested constraints and application conditions for high-level structures. In: Kreowski, H.-J., Montanari, U., Orejas, F., Rozenberg, G., Taentzer, G. (eds.) Formal Methods in Software and Systems Modeling. LNCS, vol. 3393, pp. 293–308. Springer, Heidelberg (2005).  https://doi.org/10.1007/978-3-540-31847-7_17 CrossRefGoogle Scholar
  23. 23.
    Heckel, R.: Graph transformation in a nutshell. In: Bezivin, J., Heckel, R. (eds.) Language Engineering for Model-Driven Software Development, number 04101 in Dagstuhl Seminar Proceedings (2005)Google Scholar
  24. 24.
    Høgh Jensen, O., Milner, R.: Bigraphs and mobile processes (revised). Technical report UCAM-CL-TR-580, University of Cambridge (2004)Google Scholar
  25. 25.
    König, B., Kozioura, V.: Augur - a tool for the analysis of graph transformation systems. Bull. EATCS 87, 126–137 (2005)CrossRefGoogle Scholar
  26. 26.
    König, B., Kozioura, V.: Towards the verification of attributed graph transformation systems. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214, pp. 305–320. Springer, Heidelberg (2008).  https://doi.org/10.1007/978-3-540-87405-8_21 CrossRefGoogle Scholar
  27. 27.
    Kreowski, H.-J., Klempien-Hinrichs, R., Kuske, S.: Some essentials of graph transformation. In: Ésik, Z., Martin-Vide, C., Mitrana, V. (eds.) Recent Advances in Formal Languages and Applications, pp. 229–254. Springer, Heidelberg (2006).  https://doi.org/10.1007/978-3-540-33461-3_9 Google Scholar
  28. 28.
    Lack, S., Sobociński, P.: Adhesive and quasiadhesive categories. RAIRO - Theor. Inf. Appl. 39(3), 511–545 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  29. 29.
    Leifer, J.J., Milner, R.: Deriving bisimulation congruences for reactive systems. In: Palamidessi, C. (ed.) CONCUR 2000. LNCS, vol. 1877, pp. 243–258. Springer, Heidelberg (2000).  https://doi.org/10.1007/3-540-44618-4_19 CrossRefGoogle Scholar
  30. 30.
    Löwe, M.: Algebraic approach to single-pushout graph transformation. Theor. Comput. Sci. 109, 181–224 (1993)MathSciNetCrossRefzbMATHGoogle Scholar
  31. 31.
    Löwe, M., Müller, J.: Algebraische Graphersetzung: mathematische Modellierung und Konfluenz. Forschungsbericht des Fachbereichs Informatik, TU Berlin, Berlin (1993)Google Scholar
  32. 32.
    Milner, R. (ed.): A Calculus of Communicating Systems. LNCS, vol. 92. Springer, Heidelberg (1980).  https://doi.org/10.1007/3-540-10235-3 zbMATHGoogle Scholar
  33. 33.
    Nickel, U., Niere, J., Zündorf, A.: The FUJABA environment. In: Ghezzi, C., Jazayeri, M., Wolf, A.L. (eds.) Proceedings of the 22nd International Conference on on Software Engineering, pp. 742–745. ACM (2000)Google Scholar
  34. 34.
    Orejas, F.: Symbolic graphs for attributed graph constraints. J. Symbolic Comput. 46(3), 294–315 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
  35. 35.
    Padberg, J., Kahloul, L.: Overview of reconfigurable Petri nets. In: Heckel, R., Taentzer, G. (eds.) Ehrig Festschrift. LNCS, vol. 10800, pp. 201–222. Springer, Cham (2018)Google Scholar
  36. 36.
    Plump, D.: Computing by Graph Rewriting. Habilitation thesis, Universität Bremen (1999)Google Scholar
  37. 37.
    Plump, D., Steinert, S.: Towards graph programs for graph algorithms. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 128–143. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-540-30203-2_11 CrossRefGoogle Scholar
  38. 38.
    Reisig, W.: Petri Nets: An Introduction. EATCS Monographs on Theoretical Computer Science. Springer, Heidelberg (1985).  https://doi.org/10.1007/978-3-642-69968-9 CrossRefzbMATHGoogle Scholar
  39. 39.
    Rensink, A.: The GROOVE simulator: a tool for state space generation. In: Pfaltz, J.L., Nagl, M., Böhlen, B. (eds.) AGTIVE 2003. LNCS, vol. 3062, pp. 479–485. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-540-25959-6_40 CrossRefGoogle Scholar
  40. 40.
    Rensink, A.: Representing first-order logic using graphs. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 319–335. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-540-30203-2_23 CrossRefGoogle Scholar
  41. 41.
    Rensink, A., Kuperus, J.-H.: Repotting the geraniums: on nested graph transformation rules. In: Boronat, A., Heckel, R. (eds.) Graph Transformation and Visual Modelling Techniques (GT-VMT). Electronic Communications of the EASST, vol. 18 (2009)Google Scholar
  42. 42.
    Rozenberg, G. (ed.): Handbook of Graph Grammars and Computing by Graph Transformation, Volume 1: Foundations. World Scientific, Singapore (1997)zbMATHGoogle Scholar
  43. 43.
    Sangiorgi, D., Walker, D.: The \(\pi \)-calculus-A Theory of Mobile Processes. Cambridge University Press, Cambridge (2001)zbMATHGoogle Scholar
  44. 44.
    Schürr, A., Westfechtel, B.: Graph grammars and graph rewriting systems (in German). Technical report AIB 92–15, RWTH Aachen (1992)Google Scholar
  45. 45.
    Taentzer, G.: AGG: a tool environment for algebraic graph transformation. In: Nagl, M., Schürr, A., Münch, M. (eds.) AGTIVE 1999. LNCS, vol. 1779, pp. 481–488. Springer, Heidelberg (2000).  https://doi.org/10.1007/3-540-45104-8_41 CrossRefGoogle Scholar
  46. 46.
    Wirsing, M.: Algebraic specification. In: van Leeuwen, J. (ed.) Formal Models and Semantics. Handbook of Theoretical Computer Science, vol. B, pp. 675–788. Elsevier (1990). Chapter 13Google Scholar

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Universität Duisburg-EssenDuisburgGermany
  2. 2.Hochschule für Angewandte Wissenschaften HamburgHamburgGermany
  3. 3.University of TwenteEnschedeNetherlands

Personalised recommendations