Abstract
Triple Graph Grammars (TGGs) provide a rule-based means of specifying a consistency relation over two graph languages, with correspondences between elements in the two different languages represented explicitly as a third “traceability” graph. Many useful tools can be derived automatically from a TGG including incrementally working synchronisers, which are able to realise forward and backward change propagation without incurring unnecessary information loss. TGGs are typically introduced based on the algebraic graph transformation framework, which is not particularly accessible to many members of the bidirectional transformation (bx) community, who are often more familiar with some variant of the lens framework as a theoretical foundation for bx.
This chapter, therefore, provides a self-contained, relatively gentle and tutorial-like introduction to TGGs as a pragmatic implementation of the symmetric delta-lens (sd-lens) framework proposed by Diskin et al., thereby mapping abstract and general terms used in the sd-lens framework such as models and deltas, to concrete realisations in the TGG framework such as typed graphs and spans of typed graphs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Subscripts on \(\varDelta \) are omitted if all arrows are meant.
- 2.
The formal diagrams used in this chapter are placed in a frame with a label in the right-bottom corner denoting how to interpret the objects and arrows in the diagram. For example, a diagram with label Sets means that objects in the diagram are sets, and arrows in the diagram are total functions. All other diagrams are informal and require a diagram-specific legend or extra explanation.
- 3.
As d and b can be seen as being derived by “pushing out” a and c along each other.
- 4.
As d and b can be seen as being derived by “pulling back” a and c along each other.
- 5.
Remember that not all squares can be combined.
- 6.
This is analogous to notions of a “conservative copy” in the context of model migration, e.g., as exemplified in the Epsilon Flock tool [30].
- 7.
- 8.
Hence the suggestion to view source ignore rules as generating only fpg squares.
- 9.
The diagram is more complex for constraints; the interested reader is referred to Anjorin et al. [4].
- 10.
Most practical implementations also support attribute manipulation; some even support “moving” a subgraph in a containing graph.
- 11.
This visualisation, as an attempt to impart to a geometric intuition for consistency, was suggested by James McKinna at the 2016 summer school on bidirectional transformations: https://www.cs.ox.ac.uk/projects/tlcbx/ssbx/.
References
Anjorin, A.: Synchronization of models on different abstraction levels using triple graph grammars. Ph.D. thesis, Technische Universität Darmstadt (2014)
Anjorin, A., Leblebici, E., Kluge, R., Schürr, A., Stevens, P.: A systematic approach and guidelines to developing a triple graph grammar. In: Cunha, A., Kindler, E. (eds.) BX 2015, CEUR Workshop Proceedings, vol. 1396, pp. 81–95. CEUR-WS.org (2015)
Anjorin, A., Leblebici, E., Schürr, A.: 20 years of triple graph grammars: a roadmap for future research. ECEASST 73, 1–20 (2016)
Anjorin, A., Leblebici, E., Schürr, A., Taentzer, G.: A static analysis of non-confluent triple graph grammars for efficient model transformation. In: Giese, H., König, B. (eds.) ICGT 2014. LNCS, vol. 8571, pp. 130–145. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-09108-2_9
Anjorin, A., Saller, K., Lochau, M., Schürr, A.: Modularizing triple graph grammars using rule refinement. In: Gnesi, S., Rensink, A. (eds.) FASE 2014. LNCS, vol. 8411, pp. 340–354. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54804-8_24
Anjorin, A., Schürr, A., Taentzer, G.: Construction of integrity preserving triple graph grammars. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) ICGT 2012. LNCS, vol. 7562, pp. 356–370. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-33654-6_24
Anjorin, A., Varró, G., Schürr, A.: Complex attribute manipulation in TGGs with constraint-based programming techniques. In: Hermann, F., Voigtländer, J. (eds.) BX 2012, ECEASST, vol. 49, pp. 1–16. EASST (2012)
Awodey, S.: Category Theory. Oxford Logic Guides. Ebsco Publishing, Ipswich (2006)
Biermann, E., Ermel, C., Taentzer, G.: Precise semantics of EMF model transformations by graph transformation. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 53–67. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-87875-9_4
Cheney, J., Gibbons, J., McKinna, J., Stevens, P.: Towards a principle of least surprise for bidirectional transformations. In: Cunha, A., Kindler, E. (eds.) BX 2015, CEUR Workshop Proceedings, vol. 1396, pp. 66–80. CEUR-WS.org (2015)
Czarnecki, K., Foster, J.N., Hu, Z., Lämmel, R., Schürr, A., Terwilliger, J.F.: Bidirectional transformations: a cross-discipline perspective. In: Paige, R.F. (ed.) ICMT 2009. LNCS, vol. 5563, pp. 260–283. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-02408-5_19
Diskin, Z., Eramo, R., Pierantonio, A., Czarnecki, K.: Incorporating uncertainty into bidirectional model transformations and their delta-lens formalization. In: Anjorin, A., Gibbons, J. (eds.) BX 2016, CEUR Workshop Proceedings, vol. 1571, pp. 15–31. CEUR-WS.org (2016)
Diskin, Z., Xiong, Y., Czarnecki, K., Ehrig, H., Hermann, F., Orejas, F.: From state- to delta-based bidirectional model transformations: the symmetric case. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 304–318. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24485-8_22
Ehrig, H., Ehrig, K., Ermel, C., Hermann, F., Taentzer, G.: Information preserving bidirectional model transformations. In: Dwyer, M.B., Lopes, A. (eds.) FASE 2007. LNCS, vol. 4422, pp. 72–86. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-71289-3_7
Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Monographs in Theoretical Computer Science. An EATCS Series. Springer, Heidelberg (2006). https://doi.org/10.1007/3-540-31188-2
Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bidirectional tree transformations: a linguistic approach to the view-update problem. ACM Trans. Program. Lang. Syst. 29(3), 17 (2007)
Hermann, F., Ehrig, H., Orejas, F., Czarnecki, K., Diskin, Z., Xiong, Y.: Correctness of model synchronization based on triple graph grammars. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 668–682. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24485-8_49
Hermann, F., Ehrig, H., Orejas, F., Czarnecki, K., Diskin, Z., Xiong, Y., Gottmann, S., Engel, T.: Model synchronization based on triple graph grammars: correctness, completeness and invertibility. SoSym 14(1), 241–269 (2015)
Hermann, F., et al.: Triple graph grammars in the large for translating satellite procedures. In: Di Ruscio, D., Varró, D. (eds.) ICMT 2014. LNCS, vol. 8568, pp. 122–137. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08789-4_9
Hildebrandt, S.: On the performance and conformance of triple graph grammar implementations. Ph.D. thesis, University of Potsdam (2014)
Hildebrandt, S., Lambers, L., Giese, H., Rieke, J., Greenyer, J., Schäfer, W., Lauder, M., Anjorin, A., Schürr, A.: A survey of triple graph grammar tools. In: Stevens, P., Terwilliger, J.F. (eds.) BX 2013, ECEASST, vol. 57. EASST (2013)
Johnson, M., Rosebrugh, R.D.: Unifying set-based, delta-based and edit-based lenses. In: Anjorin, A., Gibbons, J. (eds.) BX 2016, CEUR Workshop Proceedings, vol. 1571, pp. 1–13. CEUR-WS.org (2016)
Kappel, G., Langer, P., Retschitzegger, W., Schwinger, W., Wimmer, M.: Model transformation by-example: a survey of the first wave. In: Düsterhöft, A., Klettke, M., Schewe, K.-D. (eds.) Conceptual Modelling and Its Theoretical Foundations. LNCS, vol. 7260, pp. 197–215. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-28279-9_15
Lauder, M., Anjorin, A., Varró, G., Schürr, A.: Efficient model synchronization with precedence triple graph grammars. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) ICGT 2012. LNCS, vol. 7562, pp. 401–415. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-33654-6_27
Leblebici, E.: Towards a graph grammar-based approach to inter-model consistency checks with traceability support. In: Anjorin, A., Gibbons, J. (eds.) BX 2016, CEUR Workshop Proceedings, vol. 1571, pp. 35–39. CEUR-WS.org (2016)
Leblebici, E., Anjorin, A., Schürr, A., Hildebrandt, S., Rieke, J., Greenyer, J.: A comparison of incremental triple graph grammar tools. In: Hermann, F., Sauer, S. (eds.) GT-VMT 2014, ECEASST, vol. 67. EASST (2014)
Meertens, L.: Designing constraint maintainers for user interaction. Technical report (1998)
Pratt, T.W.: Pair grammars, graph languages and string-to-graph translations. J. Comput. Syst. Sci. 5(6), 560–595 (1971)
Radke, H., Arendt, T., Becker, J.S., Habel, A., Taentzer, G.: Translating essential OCL invariants to nested graph constraints focusing on set operations. In: Parisi-Presicce, F., Westfechtel, B. (eds.) ICGT 2015. LNCS, vol. 9151, pp. 155–170. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21145-9_10
Rose, L.M., Kolovos, D.S., Paige, R.F., Polack, F.A.C., Poulding, S.: Epsilon flock: a model migration language. SoSyM 13(2), 735–755 (2014)
Schürr, A.: Specification of graph translators with triple graph grammars. In: Mayr, E.W., Schmidt, G., Tinhofer, G. (eds.) WG 1994. LNCS, vol. 903, pp. 151–163. Springer, Heidelberg (1995). https://doi.org/10.1007/3-540-59071-4_45
Schürr, A., Klar, F.: 15 years of triple graph grammars. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214, pp. 411–425. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-87405-8_28
Stevens, P.: Towards an algebraic theory of bidirectional transformations. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214, pp. 1–17. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-87405-8_1
Strüber, D., Rubin, J., Chechik, M., Taentzer, G.: A variability-based approach to reusable and efficient model transformations. In: Egyed, A., Schaefer, I. (eds.) FASE 2015. LNCS, vol. 9033, pp. 283–298. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46675-9_19
Weber, J.H., Diemert, S., Price, M.: Using graph transformations for formalizing prescriptions and monitoring adherence. In: Parisi-Presicce, F., Westfechtel, B. (eds.) ICGT 2015. LNCS, vol. 9151, pp. 205–220. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21145-9_13
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this chapter
Cite this chapter
Anjorin, A. (2018). An Introduction to Triple Graph Grammars as an Implementation of the Delta-Lens Framework. In: Gibbons, J., Stevens, P. (eds) Bidirectional Transformations. Lecture Notes in Computer Science(), vol 9715. Springer, Cham. https://doi.org/10.1007/978-3-319-79108-1_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-79108-1_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-79107-4
Online ISBN: 978-3-319-79108-1
eBook Packages: Computer ScienceComputer Science (R0)