Software & Systems Modeling

, Volume 14, Issue 1, pp 241–269 | Cite as

Model synchronization based on triple graph grammars: correctness, completeness and invertibility

  • Frank HermannEmail author
  • Hartmut Ehrig
  • Fernando Orejas
  • Krzysztof Czarnecki
  • Zinovy Diskin
  • Yingfei XiongEmail author
  • Susann Gottmann
  • Thomas Engel
Special Section Paper


Triple graph grammars (TGGs) have been used successfully to analyze correctness and completeness of bidirectional model transformations, but a corresponding formal approach to model synchronization has been missing. This paper closes this gap by providing a formal synchronization framework with bidirectional update propagation operations. They are generated from a given TGG, which specifies the language of all consistently integrated source and target models. As our main result, we show that the generated synchronization framework is correct and complete, provided that forward and backward propagation operations are deterministic. Correctness essentially means that the propagation operations preserve and establish consistency while completeness ensures that the operations are defined for all possible inputs. Moreover, we analyze the conditions under which the operations are inverse to each other. All constructions and results are motivated and explained by a running example, which leads to a case study, using concrete visual syntax and abstract syntax notation based on typed attributed graphs.


Model synchronization Correctness Bidirectional model transformation Triple graph grammars 



This work was partially supported by: (1) the Ontario Research Fond’s Research Excellence Project on Model-Integrated Software Service Engineering; (2) the National Natural Science Foundation of China under Grant No. 61202071 and No. 61121063.; (3) the CICYT project (ref. TIN2007-66523) and by the AGAUR grant to the research group ALBCOM (ref. 00516) and; (4) the Fonds National de la Recherche, Luxembourg (3968135).


  1. 1.
    Arendt, T., Biermann, E., Jurack, S., Krause, C., Taentzer, G.: Henshin: Advanced concepts and tools for in-place EMF model transformations. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) Proc. of the ACM/IEEE 13th Intern. Conf. on Model Driven Engineering Languages and Systems (MoDELS’10). LNCS, vol. 6394, pp. 121–135. Springer, Berlin (2010)Google Scholar
  2. 2.
    Barbosa, D.M., Cretin, J., Foster, N., Greenberg, M., Pierce, B.C.: Matching lenses: alignment and view update. SIGPLAN Not. 45(9), 193–204 (Sep 2010) ( Scholar
  3. 3.
    Becker, S., Nagl, M., Westfechtel, B.: Incremental and interactive integrator tools for design product consistency. In: Nagl, M., Marquardt, W. (eds.) Collaborative and Distributed Chemical Engineering. From Understanding to Substantial Design Process Support, LNCS, vol. 4970, pp. 224–267. Springer, Berlin (2008) (
  4. 4.
    Buneman, P., Fernandez, M., Suciu, D.: UnQL: A query language and algebra for semistructured data based on structural recursion. VLDB J. 9(1), 76–110 (2000)CrossRefGoogle Scholar
  5. 5.
    Czarnecki, K., Foster, J., Hu, Z., Lämmel, R., Schürr, A., Terwilliger, J.: Bidirectional Transformations: A Cross-Discipline Perspective. In: Proc. ICMT’09. LNCS, vol. 5563, pp. 260–283. Springer, Berlin (2009)Google Scholar
  6. 6.
    Diskin, Z., Xiong, Y., Czarnecki, K.: From state- to delta-based bidirectional model transformations: The asymmetric case. J. Object Technol. 10(6), 1–25 (2011)Google Scholar
  7. 7.
    Diskin, Z.: Algebraic Models for bidirectional model synchronization. In: Czarnecki, K., Ober, I., Bruel, J.M., Uhl, A., Völter, M. (eds.) Model Driven Engineering Languages and Systems, Lecture Notes in Computer Science, vol. 5301, pp. 21–36. Springer, Berlin (2008) (
  8. 8.
    Diskin, Z.: Model synchronization: Mappings, tiles, and categories. In: Generative and Transformational Techniques in Software Engineering III, LNCS, vol. 6491, pp. 92–165. Springer, Berlin (2011)Google Scholar
  9. 9.
    Diskin, Z., Xiong, Y., Czarnecki, K., Ehrig, H., Hermann, F., Orejas, F.: From State- to Delta-based Bidirectional Model Transformations: The Symmetric Case. In: Proc. MODELS 2011. Springer, Berlin (2011)Google Scholar
  10. 10.
    Ehrig, H., Ehrig, K., Hermann, F.: From Model Transformation to Model Integration based on the Algebraic Approach to Triple Graph Grammars. EC-EASST 10 (2008)Google Scholar
  11. 11.
    Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Springer, EATCS Monographs in Theor. Comp. Science (2006)Google Scholar
  12. 12.
    Ehrig, H., Ermel, C., Hermann, F., Prange, U.: On-the-fly construction, correctness and completeness of model transformations based on triple graph grammars. In: Proc. MODELS’09. LNCS, vol. 5795, pp. 241–255. Springer, Berlin (2009)Google Scholar
  13. 13.
    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) (May 2007) (
  14. 14.
    Giese, H., Hildebrandt, S.: Efficient Model Synchronization of Large-Scale Models. Tech. Rep. 28, Hasso Plattner Institute at the University of Potsdam (2009)Google Scholar
  15. 15.
    Giese, H., Wagner, R.: From model transformation to incremental bidirectional model synchronization. Softw. Syst. Model. 8(1), 21–43 (2009)CrossRefGoogle Scholar
  16. 16.
    Giese, H., Hildebrandt, S., Lambers, L.: Toward bridging the gap between formal semantics and implementation of triple graph grammars. Tech. Rep. 37, Hasso Plattner Institute at the University of Potsdam (2010)Google Scholar
  17. 17.
    Golas, U., Ehrig, H., Habel, A.: Multi-amalgamation in adhesive categories. In: Proceedings of Intern. Conf. on Graph Transformation ( ICGT’ 10) (2010) (
  18. 18.
    Golas, U., Ehrig, H., Hermann, F.: Formal Specification of Model Transformations by Triple Graph Grammars with Application Conditions. EC-EASST 39 (2011)Google Scholar
  19. 19.
    Greenyer, J., Kindler, E.: Comparing relational model transformation technologies: Implementing query/view/transformation with triple graph grammars. Softw. Syst. Model. (SoSyM) 9(1), 21–46 (2010)CrossRefGoogle Scholar
  20. 20.
    Greenyer, J., Pook, S., Rieke, J.: Preventing information loss in incremental model synchronization by reusing elements. In: Proc. ECMFA 2011. LNCS, vol. 6698, pp. 144–159. Springer, Berlin (2011)Google Scholar
  21. 21.
    Hermann, F., Ehrig, H., Ermel, C., Orejas, F.: Concurrent model synchronization with conflict resolution based on triple graph grammars. In: de Lara, J., Zisman, A. (eds.) Proc. Fundamental Aspects of Software Engineering (FASE’12). LNCS, vol. 7212, pp. 178–193. Springer, Berlin (2012)Google Scholar
  22. 22.
    Hermann, F., Ehrig, H., Golas, U., Orejas, F.: Efficient analysis and execution of correct and complete model transformations based on triple graph grammars. In: Proc. MDI’10 (2010)Google Scholar
  23. 23.
    Hermann, F., Ehrig, H., Orejas, F., Czarnecki, K., Diskin, Z., Xiong, Y.: Correctness of model synchronization based on triple graph grammars. In: Proc. Int. Conf. on Model Driven Engineering Languages and Systems (MoDELS’11). LNCS, vol. 6981. Springer, Berlin (2011)Google Scholar
  24. 24.
    Hermann, F., Ehrig, H., Orejas, F., Czarnecki, K., Diskin, Z., Xiong, Y.: Correctness of Model Synchronization Based on Triple Graph Grammars—Extended Version. Tech. Rep. TR 2011–07, TU Berlin, Fak. IV (2011)Google Scholar
  25. 25.
    Hermann, F., Ehrig, H., Orejas, F., Golas, U.: Formal analysis of functional behaviour of model transformations based on triple graph grammars. In: Proc. ICGT’10. LNCS, vol. 6372, pp. 155–170. Springer, Berlin (2010)Google Scholar
  26. 26.
    Hidaka, S., Hu, Z., Inaba, K., Kato, H., Matsuda, K., Nakano, K.: Bidirectionalizing graph transformations. In: 15th ACM SIGPLAN International Conference on Functional Programming (ICFP 2010). pp. 205–216 (2010)Google Scholar
  27. 27.
    Hofmann, M., Pierce, B., Wagner, D.: Symmetric lenses. SIGPLAN Not. 46(1), 371–384 (Jan 2011) ( Scholar
  28. 28.
    Hofmann, M., Pierce, B., Wagner, D.: Edit lenses. SIGPLAN Not. 47(1), 495–508 (Jan 2012) ( Scholar
  29. 29.
    Kindler, E., Wagner, R.: Triple graph grammars: Concepts, extensions, implementations, and application scenarios. Tech. Rep. TR-ri-07-284, Department of Computer Science, University of Paderborn, Germany (2007)Google Scholar
  30. 30.
    Klar, F., Lauder, M., Königs, A., Schürr, A.: Extended triple graph grammars with efficient and compatible graph translators. In: Graph Transformations and Model Driven Enginering, LNCS, vol. 5765, pp. 141–174. Springer, Berlin (2010)Google Scholar
  31. 31.
    Object Management Group: Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification. Version 1.0 formal/08-04-03. ( (2008)
  32. 32.
    Ottersten, B., Engel, T.: SPELL: Satellite communication’s ‘lingua franca’. In: Interdisciplinary Centre for Security, Reliability and Trust. Annual Report 2011. pp. 14–15. scienceRELATIONS, Dortmund, Germany (2012) (
  33. 33.
    Schürr, A.: Specification of graph translators with triple graph grammars. In: Proc. WG’94. LNCS, vol. 903, pp. 151–163. Springer, Heidelberg (1994)Google Scholar
  34. 34.
    Schürr, A., Winter, A., Zündorf, A.: The PROGRES approach: Language and environment. In: Ehrig, H., Engels, G., Kreowski, H.J., Rozenberg, G. (eds.) Handbook of Graph Grammars and Computing by Graph Transformation, Volume 2: Applications, Languages and Tools. p. 487550. World Scientific (1999)Google Scholar
  35. 35.
    Schürr, A., Klar, F.: 15 years of triple graph grammars. In: Proc. ICGT’08. LNCS, vol. 5214, pp. 411–425 (2008)Google Scholar
  36. 36.
    Stevens, P.: Bidirectional model transformations in QVT: Semantic issues and open questions. Softw. Syst. Model. 9, 7–20 (2010)CrossRefGoogle Scholar
  37. 37.
    TFS-Group, TU Berlin: AGG (2011) (

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Frank Hermann
    • 1
    Email author
  • Hartmut Ehrig
    • 2
  • Fernando Orejas
    • 3
  • Krzysztof Czarnecki
    • 4
  • Zinovy Diskin
    • 4
  • Yingfei Xiong
    • 5
    • 6
    Email author
  • Susann Gottmann
    • 1
  • Thomas Engel
    • 1
  1. 1.Interdisciplinary Center for Security, Reliability and TrustUniversité du LuxembourgLuxembourgLuxembourg
  2. 2.Institut für Softwaretechnik und Theoretische InformatikTechnische Universität BerlinBerlinGermany
  3. 3.Departament de Llenguatges i Sistemes InformàticsUniversitat Politècnica de CatalunyaBarcelonaSpain
  4. 4.Generative Software Development LabUniversity of WaterlooWaterlooCanada
  5. 5.Key Laboratory of High Confidence Software Technologies (Peking University)Ministry of EducationBeijingChina
  6. 6.Institute of Software, School of Electronics Engineering and Computer SciencePeking UniversityBeijingChina

Personalised recommendations