Abstract
Despite good results in several industrial projects, model-driven engineering (MDE) has not been widely adopted in industry. Although MDE has existed for more than a decade now, the lack of tool support is still one of the major problems, according to studies by Staron and Mohaghegi (Staron, in: Model driven engineering languages and systems, Springer, Berlin, 2006; Mohagheghi et al. in Empir Softw Eng 18(1):89–116, 2013). Internal languages offer a solution to this problem for model transformations, which are a key part of MDE. Developers can use existing tools of host languages to create model transformations in a familiar environment. These internal languages, however, typically lack key features such as change propagation or bidirectional transformations. In our opinion, one reason is that existing formalisms for these properties are not well suited for textual languages. In this paper, we present a new formalism describing incremental, bidirectional model synchronizations using synchronization blocks. We prove the ability of this formalism to detect and repair inconsistencies and show its hippocraticness. We use this formalism to create a single internal model transformation language for unidirectional and bidirectional model transformations with optional change propagation. In total, we currently provide 18 operation modes based on a single specification. At the same time, the language may reuse tool support for C#. We validate the applicability of our language using a synthetic example with a transformation from finite state machines to Petri nets where we achieved speedups of up to multiple orders of magnitude compared to classical batch transformations.
Similar content being viewed by others
Notes
This does not mean that internal DSLs superior per se. One has to be very careful when designing an internal DSL to gain the benefits of the host language integration while still preserving the advantages of a model transformation language such as a (presumably) better understandability. The latter can be more easily accounted for in a dedicated, i.e., external, language.
VIATRA Query (formerly named EMF-IncQuery) does support change propagation and is implemented as an internal DSL in Xtend, but does not support bidirectional transformations.
Also referred to as model-at-a-time, as opposed to object-at-a-time.
Due to the slight difference in the semantics for ordered and unordered collections, one could also separate the two of them in different methods. Our counter-arguments are that this increases the size of the API. Furthermore, it is often not clear statically if a collection is ordered.
This may be acceptable because the—let us call such a thing for the moment a semi-lens—can be specified much more generic in this way. An example of such a construct is given in Sect. 6.
We do not support dynamic creation of isomorphisms, the isomorphisms must be given at compile time.
If this concept was added in only one of the metamodels, the information simply would not be propagated but no additional synchronization would be required.
We have not yet used synchronization rule templates in practical use cases, yet. We suspect that they are harder to create than transformation rule templates because there is fewer support for abstract incrementalizable lenses than for regular abstract methods.
We ignored the linebreak in the Listing, because editors usually allow 85 characters in a single line.
We believe that a partial propagation is also possible in TGGs but requires many more rules.
Perhaps, the type for places is abstract, in that case, the synchronization would indeed have to be changed to specify a default place type for this case.
This includes 14 blank lines and 28 lines with only braces.
Up to propagation of partial changes as discussed above.
This includes 41 blank lines and 47 lines with only braces.
For example, deleting an element from an ordered list is a O(n) operation.
Although our formalization uses state-based lenses for simplicity, the implementation actually works delta-based, which is important for multi-valued synchronization blocks.
https://github.com/ekmett/lens, accessed 19/06/2017.
References
Acar, U.A.: Self-adjusting computation. Ph.D. thesis, Citeseer (2005)
Acar, U.A., Ahmed, A., Blume, M.: Imperative self-adjusting computation. In: ACM SIGPLAN Notices, vol. 43, pp. 309–322. ACM (2008)
Anjorin, A., Lauder, M., Patzina, S., Schürr, A.: emoflon: Leveraging emf and professional case tools. In: 3. Workshop Methodische Entwicklung von Modellierungswerkzeugen (MEMWe2011), Lecture Notes in Informatics (2011)
Barringer, H., Havelund, K.: TraceContract: A Scala DSL for Trace Analysis. Springer, Berlin (2011)
Becker, S., Koziolek, H., Reussner, R.: The Palladio component model for model-driven performance prediction. J. Syst. Softw. 82, 3–22 (2009). doi:10.1016/j.jss.2008.03.066
Bergmann, G.: Translating OCL to graph patterns. In: Model-Driven Engineering Languages and Systems, pp. 670–686. Springer (2014)
Bergmann, G., Ráth, I., Varró, G., Varró, D.: Change-driven model transformations. Softw. Syst. Model. 11(3), 431–461 (2012). doi:10.1007/s10270-011-0197-9
Burckhardt, S., Leijen, D., Sadowski, C., Yi, J., Ball, T.: Two for the price of one: a model for parallel and incremental computation. In: ACM SIGPLAN Notices, vol. 46, pp. 427–444. ACM (2011)
Carlsson, M.: Monads for incremental computing. ACM SIGPLAN Not. 37(9), 26–35 (2002)
Chen, Y., Dunfield, J., Hammer, M.A., Acar, U.A.: Implicit self-adjusting computation for purely functional programs. J. Funct. Program. 24(01), 56–112 (2014)
Crole, R.L.: Categories for Types. Cambridge University Press, Cambridge (1993)
Cuadrado, J.S., Molina, J.G., Tortosa, M.M.: Rubytl: a practical, extensible transformation language. In: Model Driven Architecture—Foundations and Applications, pp. 158–172. Springer, Berlin (2006)
Diskin, Z.: Model synchronization: mappings, tiles, and categories. In: Generative and Transformational Techniques in Software Engineering III—International Summer School, GTTSE 2009, Braga, Portugal, 6–11 July 2009. Revised papers, pp. 92–165 (2009). doi:10.1007/978-3-642-18023-1_3
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). doi:10.5381/jot.2011.10.1.a6
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.) Model Driven Engineering Languages and Systems, Lecture Notes in Computer Science, vol. 6981, pp. 304–318. Springer, Berlin (2011). doi:10.1007/978-3-642-24485-8_22
Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bi-directional tree transformations: a linguistic approach to the view update problem. SIGPLAN Not. 40(1), 233–246 (2005). doi:10.1145/1047659.1040325
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. (2007). doi:10.1145/1232420.1232424
Fowler, M.: Domain-Specific Languages. Addison-Wesley Professional, Boston (2010)
Fowler, M., Parsons, R.: Domain Specific Languages, 1st edn. Addison-Wesley, Reading (2010)
George, L., Wider, A., Scheidgen, M.: Type-Safe model transformation languages as internal DSLs in Scala. In: Theory and Practice of Model Transformations, pp. 160–175. Springer, Berlin (2012)
Giese, H., Hildebrandt, S.: Efficient Model Synchronization of Large-Scale Models, 28. Universitätsverlag Potsdam, Potsdam (2009)
Giese, H., Wagner, R.: Incremental model synchronization with triple graph grammars. In: Model Driven Engineering Languages and Systems, pp. 543–557. Springer, Berlin (2006)
Giese, H., Wagner, R.: Incremental model synchronization with triple graph grammars. In: Nierstrasz, O., Whittle, J., Harel, D., Reggio, G. (eds.) Model Driven Engineering Languages and Systems, Lecture Notes in Computer Science, vol. 4199, pp. 543–557. Springer, Berlin (2006)
Giese, H., Wagner, R.: From model transformation to incremental bidirectional model synchronization. Softw. Syst. Model. 8(1), 21–43 (2009)
Hammer, M.A., Acar, U.A., Chen, Y.: Ceal: a c-based language for self-adjusting computation. In: ACM Sigplan Notices, vol. 44, pp. 25–37. ACM (2009)
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.) Fundamental Approaches to Software Engineering, Lecture Notes in Computer Science, vol. 7212, pp. 178–193. Springer, Berlin (2012)
Hidaka, S., Tisi, M., Cabot, J., Hu, Z.: Feature-based classification of bidirectional transformation approaches. Softw. Syst. Model. (2015). doi:10.1007/s10270-014-0450-0
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. Electron. Commun. EASST 57 (2013). doi:10.14279/tuj.eceasst.57.865
Hinkel, G.: An approach to maintainable model transformations using an internal DSL. Master’s thesis, Karlsruhe Institute of Technology (2013)
Hinkel, G.: An NMF solution to the Java refactoring case. In: Rose, L., Horn, T., Krikava, F. (eds.) Proceedings of the 8th Transformation Tool Contest, a Part of the Software Technologies: Applications and Foundations (STAF 2015) federation of conferences, CEUR Workshop Proceedings, vol. 1524, pp. 95–99. CEUR-WS.org (2015)
Hinkel, G.: Change propagation in an internal model transformation language. In: Kolovos, D., Wimmer, M. (eds.) Theory and Practice of Model Transformations: 8th International Conference, ICMT 2015, Held as Part of STAF 2015, L’Aquila, Italy, 20–21 July 2015. Proceedings, pp. 3–17. Springer, Cham (2015). doi:10.1007/978-3-319-21155-8_1
Hinkel, G.: NMF: A modeling framework for the .NET platform. Technical report, Karlsruhe Institute of Technology, Karlsruhe (2016). http://nbn-resolving.org/urn:nbn:de:swb:90-537082
Hinkel, G., Goldschmidt, T.: Tool support for model transformations: on solutions using internal languages. In: Modellierung 2016 (2016)
Hinkel, G., Goldschmidt, T., Burger, E., Reussner, R.: Using internal domain-specific languages to inherit tool support and modularity for model transformations. Softw. Syst. Model. (2017). doi:10.1007/s10270-017-0578-9
Hinkel, G., Goldschmidt, T., Happe, L.: An NMF solution for the flowgraphs case at the TTC 2013. In: Proceedings Sixth Transformation Tool Contest, TTC 2013, Budapest, Hungary, 19–20 June 2013, pp. 37–42 (2013). doi:10.4204/EPTCS.135.5
Hinkel, G., Goldschmidt, T., Happe, L.: An NMF solution for the Petri nets to state charts case study at the TTC 2013. In: Proceedings Sixth Transformation Tool Contest, TTC 2013, Budapest, Hungary, 19–20 June, 2013, pp. 95–100 (2013). doi:10.4204/EPTCS.135.12
Hinkel, G., Groenda, H., Vannucci, L., Denninger, O., Cauli, N., Ulbrich, S.: A domain-specific language (DSL) for integrating neuronal networks in robot control. In: 2015 Joint MORSE/VAO Workshop on Model-Driven Robot Software Engineering and View-based Software-Engineering (2015)
Hinkel, G., Happe, L.: Using component frameworks for model transformations by an internal DSL. In: Proceedings of the 1st International Workshop on Model-Driven Engineering for Component-Based Software Systems Co-located with ACM/IEEE 17th International Conference on Model Driven Engineering Languages & Systems (MoDELS 2014), CEUR Workshop Proceedings, vol. 1281, pp. 6–15. CEUR-WS.org (2014)
Hinkel, G., Happe, L.: An NMF solution to the TTC train benchmark case. In: Rose, L., Horn, T., Krikava, F. (eds.) Proceedings of the 8th Transformation Tool Contest, a Part of the Software Technologies: Applications and Foundations (STAF 2015) Federation of Conferences, CEUR Workshop Proceedings, vol. 1524, pp. 142–146. CEUR-WS.org (2015)
Hofmann, M., Pierce, B., Wagner, D.: Edit lenses. In: Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’12, pp. 495–508. ACM, New York (2012). doi:10.1145/2103656.2103715
Horn, T.: Model querying with FunnyQT. In: Theory and Practice of Model Transformations, pp. 56–57. Springer, Berlin (2013)
Johnson, M., Rosebrugh, R.D.: Unifying set-based, delta-based and edit-based lenses. In: Proceedings of the 5th International Workshop on Bidirectional Transformations, Bx 2016, Co-located with The European Joint Conferences on Theory and Practice of Software, ETAPS 2016, Eindhoven, The Netherlands, 8 Apr 2016, pp. 1–13 (2016). http://ceur-ws.org/Vol-1571/paper_13.pdf
Jouault, F., Kurtev, I.: Transforming models with ATL. In: Satellite Events at the MoDELS 2005 Conference, pp. 128–138. Springer, Berlin (2006)
Jouault, F., Tisi, M.: Towards incremental execution of ATL transformations. In: Theory and Practice of Model Transformations: ICMT 2010, pp. 123–137. Springer, Berlin (2010)
Ko, H.S., Zan, T., Hu, Z.: Bigul: A formally verified core language for putback-based bidirectional programming. In: Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM ’16, pp. 61–72. ACM, New York (2016). doi:10.1145/2847538.2847544
Kramer, M.E.: Specification languages for preserving consistency between models of different languages. Ph.D. thesis, Karlsruhe Institute of Technology (KIT), Karlsruhe (2017). doi:10.5445/IR/1000069284. http://nbn-resolving.org/urn:nbn:de:swb:90-692845
Křikava, F., Collet, P., France, R.B.: Sigma: Scala internal domain-specific languages for model manipulations. In: Model-Driven Engineering Languages and Systems, pp. 569–585. Springer, Berlin (2014)
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.) Graph Transformations, Lecture Notes in Computer Science, vol. 7562, pp. 401–415. Springer, Berlin (2012). doi:10.1007/978-3-642-33654-6_27
Lawvere, F.W., Rosebrugh, R.: Sets for Mathematics. Cambridge University Press, Cambridge (2003)
Leblebici, E., Anjorin, A., Schürr, A., Hildebrandt, S., Rieke, J., Greenyer, J.: A comparison of incremental triple graph grammar tools. Electron. Commun. EASST 67 (2014). doi:10.14279/tuj.eceasst.67.939
Meyerovich, L.A., Rabkin, A.S.: Empirical analysis of programming language adoption. In: Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, pp. 1–18. ACM (2013)
Mohagheghi, P., Gilani, W., Stefanescu, A., Fernandez, M.A.: An empirical study of the state of the practice and acceptance of model-driven engineering in four industrial cases. Empir. Softw. Eng. 18(1), 89–116 (2013)
Nickel, U., Niere, J., Zündorf, A.: The FUJABA environment. In: Proceedings of the 22Nd International Conference on Software Engineering, ICSE ’00, pp. 742–745. ACM, New York (2000). doi:10.1145/337180.337620
Object Management Group: Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification (2011). http://www.omg.org/spec/QVT/1.1/PDF/
Object Management Group (OMG): Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification (ptc/07-07-07) (2007). http://www.omg.org/docs/ptc/07-07-07.pdf
Schürr, A.: Specification of graph translators with triple graph grammars. In: Graph-Theoretic Concepts in Computer Science, pp. 151–163. Springer, Berlin (1994)
Sendall, S., Kozaczynski, W.: Model transformation the heart and soul of model-driven software development. Technical report (2003)
Staron, M.: Adopting model driven software development in industry—a case study at two companies. In: Model Driven Engineering Languages and Systems, pp. 57–72. Springer, Berlin (2006)
Stevens, P.: A landscape of bidirectional model transformations. In: Lämmel, R., Visser, J., Saraiva, J.A. (eds.) Generative and Transformational Techniques in Software Engineering II, Lecture Notes in Computer Science, vol. 5235, pp. 408–424. Springer, Berlin (2008). doi:10.1007/978-3-540-88643-3_10
Stevens, P.: Bidirectional model transformations in qvt: semantic issues and open questions. Softw. Syst. Model. 9(1), 7–20 (2010). doi:10.1007/s10270-008-0109-9
Ujhelyi, Z., Bergmann, G., Hegedús, Á., Horváth, Á., Izsó, B., Ráth, I., Szatmári, Z., Varró, D.: EMF-IncQuery: an integrated development environment for live model queries. Sci. Comput. Program. 98(Part 1), 80–99 (2015). doi:10.1016/j.scico.2014.01.004
Wagelaar, D., Van Der Straeten, R., Deridder, D.: Module superimposition: a composition technique for rule-based model transformation languages. Softw. Syst. Model. 9(3), 285–309 (2010)
Wider, A.: Implementing a bidirectional model transformation language as an internal DSL in scala. In: Proceedings of the Workshops of the EDBT/ICDT 2014 Joint Conference, CEUR Workshop Proceedings, vol. 1133, pp. 63–70. CEUR (2014). http://ceur-ws.org/Vol-1133/paper-10.pdf
Zündorf, A., George, T., Lindel, S., Norbisrath, U.: Story driven modeling library (SDMLib): an inline DSL for modeling and model transformations, the Petrinet-Statechart case. EPTCS (2013)
Acknowledgements
We would like to thank the anonymous reviewers that helped us to shape the paper as it is of today. Furthermore, we would like to thank Anthony Anjorin, who has helped us with the eMoflon-implementation of the example finite state machines to Petri nets synchronization.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Prof. Alfonso Pierantonio, Jasmin Blanchette, Francis Bordeleau, Nikolai Kosmatov, Gabi Taentzer, and Manuel Wimmer.
Rights and permissions
About this article
Cite this article
Hinkel, G., Burger, E. Change propagation and bidirectionality in internal transformation DSLs. Softw Syst Model 18, 249–278 (2019). https://doi.org/10.1007/s10270-017-0617-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-017-0617-6