Skip to main content

A Tutorial on Graph Transformation

  • Chapter
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNTCS,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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    Note that considerable part of graph transformation theory is concerned with making the results independent of the specific graph structure under consideration (see [28, 30]). This however depends on the use of category theory and we will not follow this path here.

  2. 2.

    The morphism n need not be injective, hence an edge e might have several preimages under n. In this case, it is possible that the new attribute of an edge cannot be uniquely determined.

  3. 3.

    http://groove.cs.utwente.nl/.

  4. 4.

    http://groove.cs.utwente.nl/wp-content/uploads/leader-electiongps.zip.

  5. 5.

    http://www.user.tu-berlin.de/o.runge/agg/.

References

  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)

    Article  MathSciNet  MATH  Google Scholar 

  2. Bezem, M., Klop, J.W., de Vrijer, R. (eds.): Term Rewriting Systems. Cambridge University Press, Cambridge (2003)

    MATH  Google Scholar 

  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)

    Article  MATH  Google Scholar 

  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 3

    Google Scholar 

  5. Courcelle, B., Engelfriet, J.: Graph Structure and Monadic Second-Order Logic, A Language-Theoretic Approach. Cambridge University Press, New York (2012)

    Book  MATH  Google Scholar 

  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. 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. 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

    Chapter  Google Scholar 

  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 6

    Google Scholar 

  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

    Chapter  Google Scholar 

  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

    MATH  Google Scholar 

  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)

    MATH  Google Scholar 

  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

    Book  MATH  Google Scholar 

  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)

    Article  MathSciNet  MATH  Google Scholar 

  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)

    MATH  Google Scholar 

  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

    Book  MATH  Google Scholar 

  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. 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

    Chapter  Google Scholar 

  19. Fokkink, W.: Introduction to Process Algebra. Springer, Heidelberg (2000). https://doi.org/10.1007/978-3-662-04293-9

    Book  MATH  Google Scholar 

  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)

    Article  Google Scholar 

  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

    Chapter  Google Scholar 

  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

    Chapter  Google Scholar 

  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. Høgh Jensen, O., Milner, R.: Bigraphs and mobile processes (revised). Technical report UCAM-CL-TR-580, University of Cambridge (2004)

    Google Scholar 

  25. König, B., Kozioura, V.: Augur - a tool for the analysis of graph transformation systems. Bull. EATCS 87, 126–137 (2005)

    Article  Google Scholar 

  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

    Chapter  Google Scholar 

  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. Lack, S., Sobociński, P.: Adhesive and quasiadhesive categories. RAIRO - Theor. Inf. Appl. 39(3), 511–545 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  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

    Chapter  Google Scholar 

  30. Löwe, M.: Algebraic approach to single-pushout graph transformation. Theor. Comput. Sci. 109, 181–224 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  31. Löwe, M., Müller, J.: Algebraische Graphersetzung: mathematische Modellierung und Konfluenz. Forschungsbericht des Fachbereichs Informatik, TU Berlin, Berlin (1993)

    Google Scholar 

  32. Milner, R. (ed.): A Calculus of Communicating Systems. LNCS, vol. 92. Springer, Heidelberg (1980). https://doi.org/10.1007/3-540-10235-3

    MATH  Google Scholar 

  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. Orejas, F.: Symbolic graphs for attributed graph constraints. J. Symbolic Comput. 46(3), 294–315 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  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. Plump, D.: Computing by Graph Rewriting. Habilitation thesis, Universität Bremen (1999)

    Google Scholar 

  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

    Chapter  Google Scholar 

  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

    Book  MATH  Google Scholar 

  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

    Chapter  Google Scholar 

  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

    Chapter  Google Scholar 

  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. Rozenberg, G. (ed.): Handbook of Graph Grammars and Computing by Graph Transformation, Volume 1: Foundations. World Scientific, Singapore (1997)

    MATH  Google Scholar 

  43. Sangiorgi, D., Walker, D.: The \(\pi \)-calculus-A Theory of Mobile Processes. Cambridge University Press, Cambridge (2001)

    MATH  Google Scholar 

  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. 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

    Chapter  Google Scholar 

  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 13

    Google Scholar 

Download references

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dennis Nolte .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

König, B., Nolte, D., Padberg, J., Rensink, A. (2018). A Tutorial on Graph Transformation. In: Heckel, R., Taentzer, G. (eds) Graph Transformation, Specifications, and Nets. Lecture Notes in Computer Science(), vol 10800. Springer, Cham. https://doi.org/10.1007/978-3-319-75396-6_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-75396-6_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-75395-9

  • Online ISBN: 978-3-319-75396-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics