Advertisement

Software & Systems Modeling

, Volume 13, Issue 1, pp 301–321 | Cite as

GReTL: an extensible, operational, graph-based transformation language

  • Jürgen Ebert
  • Tassilo Horn
Theme Section Paper
  • 269 Downloads

Abstract

This article introduces the graph-based transformation language GReTL. GReTL is operational, and transformations are either specified in plain Java using the GReTL API or in a simple domain-specific language. GReTL follows the conception of incrementally constructing the target metamodel together with the target graph. When creating a new metamodel element, a set-based semantic expression is specified that describes the set of instances that have to be created in the target graph. This expression is defined as a query on the source graph. GReTL is a kernel language consisting of a minimal set of operations, but it is designed for being extensible. Custom higher-level operations can be built on top of the kernel operations easily. After a description of the foundations of GReTL, its most important elements are introduced along with a transformation example in the field of metamodel integration. Insights into the design of the GReTL API are given, and a convenience copy operation is implemented to demonstrate GReTL’s extensibility.

Keywords

Model transformation Graph transformation Metamodel merging 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bézivin J.: Model driven engineering: an emerging technical space. In: Lämmel, R., Saraiva, J.A., Visser, J. (eds) Generative and Transformational Techniques in Software Engineering. Lecture Notes in Computer Science, chap. 2., vol. 4143, pp. 36–64. Springer, Berlin (2006)Google Scholar
  2. Object Management Group: MDA Guide Version 1.0.1. (2003)Google Scholar
  3. Kleppe A.G., Warmer J., Bast W.: MDA Explained: The Model Driven Architecture: Practice and Promise. Addison-Wesley/Longman, Boston (2003)Google Scholar
  4. van Deursen A., Klint P., Visser J.: Domain-specific languages: an annotated bibliography. SIGPLAN Not. 35, 26–36 (2000)CrossRefGoogle Scholar
  5. Horn, T., Ebert, J.: The GReTL transformation language. In: Cabot and Visser [50], pp. 183–197Google Scholar
  6. Gamma E., Helm R., Johnson R., Vlissides J.: Design Patterns. Addison-Wesley, Boston (1995)Google Scholar
  7. Ebert, J., Riediger, V., Winter, A.: Graph technology in reverse engineering. The TGraph approach. In: 10th Workshop Software Reengineering (WSR 2008). GI Lecture Notes in Informatics, vol. 126. GI (2008)Google Scholar
  8. Kurtev, I., Bézivin, J., Aksit, M.: Technological spaces: an initial appraisal. In: CoopIS, DOA’2002 Federated Conferences, Industrial track (2002)Google Scholar
  9. Ebert, J., Bildhauer, D.: Reverse engineering using graph queries. In: Graph Transformations and Model Driven Engineering. LNCS, vol. 5765, Springer, Berlin (2010)Google Scholar
  10. Horn, T.: Program understanding: a reengineering case for the transformation tool contest. In: Van Gorp et al. [51]Google Scholar
  11. Horn, T.: Solving the TTC 2011 reengineering case with GReTL. In: Van Gorp et al. [51]Google Scholar
  12. Buchwald, S., Jakumeit, E.: Compiler optimization: a case for the transformation tool contest. In: Van Gorp et al. [51]Google Scholar
  13. Horn, T.: Solving the TTC 2011 compiler optimization case with GReTL. In: Van Gorp et al. [51]Google Scholar
  14. Horn, T.: SHARE demo related to the paper Solving the TTC 2011 Reengineering Case with GReTL. http://is.ieis.tue.nl/staff/pvgorp/share/?page=ConfigureNewSession&vdi=Ubuntu_10.04_TTC11_gretl-cases.vdi
  15. Horn, T.: SHARE demo related to the paper Solving the TTC 2011 Compiler Optimization Case with GReTL. http://is.ieis.tue.nl/staff/pvgorp/share/?page=ConfigureNewSession&vdi=Ubuntu_10.04_TTC11_gretl-cases.vdi
  16. Walter, T., Ebert, J.: Foundations of Graph-Based Modeling Languages. Tech. Rep., University of Koblenz-Landau, Institute for Software Technology (in press). http://www.uni-koblenz.de/~horn/foundations-WE11-draft.pdf
  17. Miksa, K., Kasztelnik, M., Sabine, P.: Case study design. Project Deliverable ICT216691/CMR/WP5-D2/D/RE/b1, MOST Project (2009)Google Scholar
  18. Object Management Group: Meta Object Facility (MOF) 2.0: Query/View/Transformation Specification v1.0. (2008)Google Scholar
  19. Greenyer J., Kindler E.: Comparing relational model transformation technologies: implementing Query/View/Transformation with Triple Graph Grammars. Softw. Syst. Model. 9, 21–46 (2010). doi: 10.1007/s10270-009-0121-8 CrossRefGoogle Scholar
  20. Amelunxen C., Königs A., Rötschke T., Schürr A.: MOFLON: a standard-compliant metamodeling framework with graph transformations. In: Rensink, A., Warmer, J. (eds) Model Driven Architecture—Foundations and Applications: Second European Conference. Lecture Notes in Computer Science (LNCS), vol. 4066, pp. 361–375. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  21. Rose, L.M., Kolovos, D.S., Paige, R.F., Polack, F.A.C.: Model Migration with Epsilon Flock. In: ICMT. Lecture Notes in Computer Science, vol. 6142, pp. 184–198. Springer, Berlin (2010)Google Scholar
  22. Herrmannsdoerfer M. : COPE—a workbench for the coupled evolution of metamodels and models. In: Malloy, B.A., Staab, S., Brand, M. (eds) SLE. Lecture Notes in Computer Science, vol. 6563, pp. 286–295. Springer, Berlin (2010)Google Scholar
  23. Taentzer, G., Ehrig, K., Guerra, E., de Lara, J., Lengyel, L., Levendovszky, T., Prange, U., Varró, D., Varró-Gyapay, S.: Model transformation by graph transformation: a comparative study. In: ACM/IEEE 8th International Conference on Model Driven Engineering Languages and Systems. Montego Bay, Jamaica (2005)Google Scholar
  24. Ehrig H., Ehrig K.: Overview of formal concepts for model transformations based on typed attributed graph transformation. Electron. Notes Theor. Comput. Sci. 152, 3–22 (2006)CrossRefGoogle Scholar
  25. Aksit, M., Rensink, A., Staijen, T.: A graph-transformation-based simulation approach for analysing aspect interference on shared join points. In: Proceedings of the 8th ACM International Conference on Aspect-Oriented Software Development, AOSD ’09, pp. 39–50, ACM, New York (2009)Google Scholar
  26. Gönczy L., Kovács M., Varró D.: Modeling and verification of reliable messaging by graph transformation systems. Electron. Notes Theor. Comput. Sci. 175, 37–50 (2007)CrossRefGoogle Scholar
  27. Ráth, I., Vago, D., Varró, D.: Design-time simulation of domain-specific models by incremental pattern matching. In: VL/HCC, pp. 219–222. IEEE (2008)Google Scholar
  28. Assmann U.: Graph rewrite systems for program optimization. ACM Trans. Program. Lang. Syst. 22, 583–637 (2000)CrossRefGoogle Scholar
  29. Schösser A., Geiß R.: Graph rewriting for hardware dependent program optimizations. In: Schürr, A., Nagl, M., Zündorf, A. (eds) Applications of Graph Transformations with Industrial Relevance, pp. 233–248. Springer, Berlin (2008)CrossRefGoogle Scholar
  30. 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: Applications, Languages, and Tools, vol. 3, pp. 487–550. World Scientific, Singapore (1999)CrossRefGoogle Scholar
  31. Fischer T., Niere J., Torunski L., Zündorf A.: Story Diagrams: a new graph rewrite language based on the unified modeling language and Java. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds) TAGT. Lecture Notes in Computer Science, vol. 1764, pp. 296–309. Springer, Berlin (1998)Google Scholar
  32. Varró, D., Balogh, A.: The model transformation language of the VIATRA2 framework. Sci. Comput. Program. 68(3), 214–234 (2007, special issue on Model Transformation)Google Scholar
  33. Börger E., Stärk R.F.: Abstract State Machines. A Method for High-Level System Design and Analysis. Springer, Berlin (2003)CrossRefzbMATHGoogle Scholar
  34. Jakumeit E., Buchwald S., Kroll M.: GrGen. NET. Int. J. Softw. Tools Technol. Transf. (STTT) 12, 263–271 (2010)CrossRefGoogle Scholar
  35. Ermel, C., Biermann, E., Schmidt, J., Warning, A.: Visual modeling of controlled EMF model transformation using HENSHIN. ECEASST, 32 (2010)Google Scholar
  36. 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) MoDELS (1). Lecture Notes in Computer Science, vol. 6394, pp. 121–135. Springer, UK (2010)Google Scholar
  37. Biermann E., Ehrig K., Ermel C., Köhler C., Taentzer G.: The EMF model transformation framework. In: Schürr, A., Nagl, M., Zündorf, A. (eds) AGTIVE. Lecture Notes in Computer Science, vol. 5088, pp. 566–567. Springer, Berlin (2007)Google Scholar
  38. Taentzer G.: AGG: a graph transformation environment for modeling and validation of software. In: Kanade T., Kittler J., Kleinberg J.M., Mattern F., Mitchell J.C., Naor M., Nierstrasz O., Pandu Rangan C., Steffen B. (eds.) Applications of Graph Transformations with Industrial Relevance. Lecture Notes in Computer Science, chap. 35, vol. 3062, pp. 446–453. Springer, Berlin (2004)Google Scholar
  39. Kastenberg H., Rensink A.: Model checking dynamic states in GROOVE. In: Valmari A. (ed.) SPIN. Lecture Notes in Computer Science, vol. 3925, pp. 299–305. Springer, Berlin (2006)Google Scholar
  40. de Lara J., Bardohl R., Ehrig H., Ehrig K., Prange U., Taentzer G.: Attributed graph transformation with node type inheritance. Theor. Comput. Sci. 376, 139–163 (2007)CrossRefzbMATHGoogle Scholar
  41. ATLAS Group: ATL: User Guide. http://wiki.eclipse.org/ATL/User_Guide (2011)
  42. Kolovos, D.S., Paige, R.F., Polack, F.A.: The epsilon transformation language. In: Proceedings of the 1st International Conference on Theory and Practice of Model Transformations, ICMT ’08, pp. 46–60. Springer, Berlin (2008)Google Scholar
  43. Object Management Group: Object Constraint Language, Version 2.2. (2010)Google Scholar
  44. Wimmer, M., Kappel, G., Kusel, A., Retschitzegger, W., Schönböck, J., Schwinger, W., Kolovos, D.S., Paige, R.F., Lauder, M., Schürr, A., Wagelaar, D.: A comparison of rule inheritance in model-to-model transformation languages. In: Cabot and Visser [50], pp. 31–46Google Scholar
  45. Object Management Group: Meta Object Facility (MOF) Core Specification, Version 2.4.1. (2011)Google Scholar
  46. Steinberg D., Budinsky F., Paternostro M., Merks E.: EMF: Eclipse Modeling Framework, 2nd edn. Addison-Wesley/Longman, Amsterdam (2009)Google Scholar
  47. The Eclipse Project: EMF Model Query. http://www.eclipse.org/modeling/emf/?project=query
  48. The Eclipse Project: EMF Model Query2. http://www.eclipse.org/modeling/emf/?project=query2
  49. Cabot, J., Visser, E. (eds): Proceedings of the 4th International Conference on Theory and Practice of Model Transformations, ICMT 2011, Zurich, Switzerland, June 27–28, 2011. Lecture Notes in Computer Science, vol. 6707. Springer, Berlin (2011)Google Scholar
  50. Van Gorp, P., Mazanek, S., Rose, L. (eds): Post-Proceedings of the TTC 2011: Fifth Transformation Tool Contest, Zürich, Switzerland, June 29–30 2011. EPTCS (2011)Google Scholar

Copyright information

© Springer-Verlag 2012

Authors and Affiliations

  1. 1.Institute for Software TechnologyUniversity Koblenz-LandauKoblenzGermany

Personalised recommendations