Skip to main content
Erschienen in: Software and Systems Modeling 2/2014

01.05.2014 | Theme Section Paper

Merging of EMF models

Formal foundations

verfasst von: Bernhard Westfechtel

Erschienen in: Software and Systems Modeling | Ausgabe 2/2014

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Inadequate version control for models significantly impedes the application of model-driven software development. In particular, sophisticated support for merging model versions is urgently needed. In this paper, we present a formal approach to both two- and three-way merging of models in the EMF framework. The approach may be applied to instances of arbitrary Ecore models. We specify context-free as well as context-sensitive rules for model merging which both detect and resolve merge conflicts. Based on these rules, a merge algorithm is developed which produces a consistent model from consistent input models. The merge algorithm does neither assume unique object identifiers, nor does it require change logs. In contrast, it relies on matchings among the input models which identify common elements (state-based approach). The requirements imposed on these matchings are reduced to a minimum, e.g., there are no restrictions on the relative positions of matched elements. Altogether, the merge algorithm is widely applicable, preserves consistency, and offers advanced features, such as merging of ordered collections in the presence of arbitrary moves and handling of context-sensitive conflicts which are hard to detect and to resolve.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Fußnoten
1
\(\bot \) denotes an undefined result.
 
3
For some set \(S\), \(SET(S)\) denotes the set of sets over \(S\).
 
4
We use the notation \(o_2 \in fv(o_1)\) also for single-valued features.
 
5
An undirected edge is a set \(\{e_1, e_2\}\). In the conditions below, we will write \(e_1 \leftrightarrow e_2\) as a shorthand for \(\{e_1, e_2\} \in M\).
 
6
\(O_b\), \(O_1\), and \(O_2\) denote the object sets of the input versions \(b\), \(a_1\), and \(a_2\), respectively.
 
7
We reuse the predicates \(n-way(o, cf)\) introduced for the merging of single-valued features. Furthermore, \(b \in \mathbb B \).
 
8
A directed graph is a pair \(g = (V, E)\), where \(V\) is a finite set of nodes and \(E \subseteq V \times V\) is a set of directed edges.
 
9
In the conditions below, \(v \rightarrow v^{\prime }\) and \(v \xrightarrow {+} v^{\prime }\) stand for \((v, v^{\prime }) \in E\) and \((v, v^{\prime }) \in E^+\), respectively; \(^+\) denotes transitive closure.
 
10
This predicate may be defined on the merged model graph by checking the visibilities of elements reachable from the root of the superimposed trees.
 
11
\(\xrightarrow {c^*}\) denotes the reflective and transitive closure over containment links.
 
12
We assume that the target type of the reference \(xr_1\) is \(C_4\) and \(C_4\) does not conform to \(C_5\).
 
Literatur
1.
Zurück zum Zitat Alanen, M., Porres, I.: Difference and union of models. In: Stevens, P., Whittle, J., Booch, G. (eds.) UML 2003—The Unified Modeling Language, Modeling Languages and Applications, 6th International Conference. Lecture Notes in Computer Science, San Francisco, CA, vol. 2863, pp. 2–17. Springer, Berlin (2003) Alanen, M., Porres, I.: Difference and union of models. In: Stevens, P., Whittle, J., Booch, G. (eds.) UML 2003—The Unified Modeling Language, Modeling Languages and Applications, 6th International Conference. Lecture Notes in Computer Science, San Francisco, CA, vol. 2863, pp. 2–17. Springer, Berlin (2003)
2.
Zurück zum Zitat Altmanninger, K., Schwinger, W., Kotsis, G.: Semantics for accurate conflict detection in SMoVer: specification, detection and presentation by example. Int. J. Enterp. Inf. Syst. 6(1), 68–84 (2010)CrossRef Altmanninger, K., Schwinger, W., Kotsis, G.: Semantics for accurate conflict detection in SMoVer: specification, detection and presentation by example. Int. J. Enterp. Inf. Syst. 6(1), 68–84 (2010)CrossRef
3.
Zurück zum Zitat Altmanninger, K., Seidl, M., Wimmer, M.: A survey on model versioning approaches. Int. J. Web Inf. Syst. 5(3), 271–304 (2009) Altmanninger, K., Seidl, M., Wimmer, M.: A survey on model versioning approaches. Int. J. Web Inf. Syst. 5(3), 271–304 (2009)
4.
Zurück zum Zitat 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.) Proceedings of the Second European Conference on Model Driven Architecture—Foundations and Applications (ECMDA-FA 2006). Lecture Notes in Computer Science, Bilbao, Spain, vol. 4066. Springer, Berlin, pp. 361–375 (2006) 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.) Proceedings of the Second European Conference on Model Driven Architecture—Foundations and Applications (ECMDA-FA 2006). Lecture Notes in Computer Science, Bilbao, Spain, vol. 4066. Springer, Berlin, pp. 361–375 (2006)
5.
Zurück zum Zitat 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. Programm. 34(1), 1–54 (1999) 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. Programm. 34(1), 1–54 (1999)
6.
Zurück zum Zitat Bartelt, C.: Consistence preserving model merge in collaborative development processes. In: Ebert, J., Kelter, U., Systä, T. (eds.) Proceedings of the 2008 International Workshop on Comparison and Versioning of Software Models (CVSM 2008), Leipzig, Germany. ACM Press, New York, pp. 13–18 (2008) Bartelt, C.: Consistence preserving model merge in collaborative development processes. In: Ebert, J., Kelter, U., Systä, T. (eds.) Proceedings of the 2008 International Workshop on Comparison and Versioning of Software Models (CVSM 2008), Leipzig, Germany. ACM Press, New York, pp. 13–18 (2008)
7.
Zurück zum Zitat Boronat, A., Carsí, J.A., Ramos, I., Letelier, P.: Formal model merging applied to class diagram integration. Electron. Notes Theoret. Comput. Sci. 166, 5–26 (2007)CrossRef Boronat, A., Carsí, J.A., Ramos, I., Letelier, P.: Formal model merging applied to class diagram integration. Electron. Notes Theoret. Comput. Sci. 166, 5–26 (2007)CrossRef
8.
Zurück zum Zitat Brun, C., Pierantonio, A.: Model differences in the Eclipse Modelling Framework. UPGRADE IX(2), 29–34 (2008) Brun, C., Pierantonio, A.: Model differences in the Eclipse Modelling Framework. UPGRADE IX(2), 29–34 (2008)
9.
Zurück zum Zitat Cicchetti, A., Di Ruscio, D., Pierantonio, A.: Managing model conflicts in distributed development. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) Proceedings of the 11th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2008). Lecture Notes in Computer Science, Toulouse, France, vol. 5301, pp. 311–325. Springer, Berlin (2008) Cicchetti, A., Di Ruscio, D., Pierantonio, A.: Managing model conflicts in distributed development. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) Proceedings of the 11th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2008). Lecture Notes in Computer Science, Toulouse, France, vol. 5301, pp. 311–325. Springer, Berlin (2008)
10.
Zurück zum Zitat Collins-Sussman, B., Fitzpatrick, B.W., Pilato, C.M.: Version Control with Subversion. O’Reilly& Associates, Sebastopol (2004) Collins-Sussman, B., Fitzpatrick, B.W., Pilato, C.M.: Version Control with Subversion. O’Reilly& Associates, Sebastopol (2004)
11.
Zurück zum Zitat Conradi, R., Westfechtel, B.: Version models for software configuration management. ACM Comput. Surv. 30(2), 232–282 (1998)CrossRef Conradi, R., Westfechtel, B.: Version models for software configuration management. ACM Comput. Surv. 30(2), 232–282 (1998)CrossRef
12.
Zurück zum Zitat Deußer, R.: 3-Wege-Merge auf Instanzen MOF-konformer Metamodelle. Technical University of Darmstadt, Darmstadt, Germany, Master’s thesis (2008) Deußer, R.: 3-Wege-Merge auf Instanzen MOF-konformer Metamodelle. Technical University of Darmstadt, Darmstadt, Germany, Master’s thesis (2008)
13.
Zurück zum Zitat Ebert, J., Kelter, U., Systä, T. (eds.) Proceedings of the 2008 International Workshop on Comparison and Versioning of Software Models (CVSM 2008), Leipzig, Germany. ACM Press, New York (2008) Ebert, J., Kelter, U., Systä, T. (eds.) Proceedings of the 2008 International Workshop on Comparison and Versioning of Software Models (CVSM 2008), Leipzig, Germany. ACM Press, New York (2008)
14.
Zurück zum Zitat Ehrig, H., Ermel, C., Taentzer, G.: A formal resolution strategy for operation-based conflicts in model versioning using graph modifications. In: Giannakopoulo, D., Orejas, F. (eds.) FASE 2011—14th International Conference on Fundamental Approaches to Software Engineering. Lecture Notes in Computer Science, Saarbrücken, Germany, vol. 6603, pp. 202–216. Springer, Berlin (2011) Ehrig, H., Ermel, C., Taentzer, G.: A formal resolution strategy for operation-based conflicts in model versioning using graph modifications. In: Giannakopoulo, D., Orejas, F. (eds.) FASE 2011—14th International Conference on Fundamental Approaches to Software Engineering. Lecture Notes in Computer Science, Saarbrücken, Germany, vol. 6603, pp. 202–216. Springer, Berlin (2011)
15.
Zurück zum Zitat Engel, K.-D., Paige, R.F., Kolovos, D.S.: Using a model merging language for reconciling model versions. In: Rensink, A., Warmer, J. (eds.) Proceedings of the Second European Conference on Model Driven Architecture—Foundations and Applications (ECMDA-FA 2006). Lecture Notes in Computer Science, Bilbao, Spain, vol. 4066. Springer, Berlin, pp. 143–157 (2006) Engel, K.-D., Paige, R.F., Kolovos, D.S.: Using a model merging language for reconciling model versions. In: Rensink, A., Warmer, J. (eds.) Proceedings of the Second European Conference on Model Driven Architecture—Foundations and Applications (ECMDA-FA 2006). Lecture Notes in Computer Science, Bilbao, Spain, vol. 4066. Springer, Berlin, pp. 143–157 (2006)
16.
Zurück zum Zitat Förtsch, S., Westfechtel, B.: Differencing and merging of software diagrams—state of the art and challenges. In: Filipe, J., Helfert, M., Shishkov, B. (eds.) Proceedings of the Second International Conference on Software and Data Technologies (ICSOFT 2007), Barcelona, Spain, pp. 90–99. INSTICC Press, Valencia (2007) Förtsch, S., Westfechtel, B.: Differencing and merging of software diagrams—state of the art and challenges. In: Filipe, J., Helfert, M., Shishkov, B. (eds.) Proceedings of the Second International Conference on Software and Data Technologies (ICSOFT 2007), Barcelona, Spain, pp. 90–99. INSTICC Press, Valencia (2007)
17.
18.
Zurück zum Zitat Kelter, U., Wehren, J., Niere, J.: A generic difference algorithm for UML models. In: Liggesmeyer, P., Pohl, K., Goedicke, M. (eds.) Software Engineering 2005. Lecture Notes of Informatics, Essen, Germany, vol. P-64, pp. 105–116. Gesellschaft für Informatik (2005) Kelter, U., Wehren, J., Niere, J.: A generic difference algorithm for UML models. In: Liggesmeyer, P., Pohl, K., Goedicke, M. (eds.) Software Engineering 2005. Lecture Notes of Informatics, Essen, Germany, vol. P-64, pp. 105–116. Gesellschaft für Informatik (2005)
19.
Zurück zum Zitat Koegel, M., Hermannsdoerfer, M., von Wesendonk, O., Helming, J.: Operation-based conflict detection. In: Di Ruscio, D., Kolovos, D.S. (eds.) Proceedings of the 1st International Workshop on Model Comparison in Practice (IWMCP 2010), Malaga, Spain. ACM Press, New York, pp. 21–30 (2010) Koegel, M., Hermannsdoerfer, M., von Wesendonk, O., Helming, J.: Operation-based conflict detection. In: Di Ruscio, D., Kolovos, D.S. (eds.) Proceedings of the 1st International Workshop on Model Comparison in Practice (IWMCP 2010), Malaga, Spain. ACM Press, New York, pp. 21–30 (2010)
20.
Zurück zum Zitat Kögel, M.: Towards software configuration management for unified models. In: Ebert, J., Kelter, U., Systä, T. (eds.) Proceedings of the 2008 International Workshop on Comparison and Versioning of Software Models (CVSM 2008), Leipzig, Germany. ACM Press, New York, pp. 19–24 (2008) Kögel, M.: Towards software configuration management for unified models. In: Ebert, J., Kelter, U., Systä, T. (eds.) Proceedings of the 2008 International Workshop on Comparison and Versioning of Software Models (CVSM 2008), Leipzig, Germany. ACM Press, New York, pp. 19–24 (2008)
21.
Zurück zum Zitat Kolovos, D.S., Di Ruscio, D., Pierantonio, A., Paige, R.F.: Different models for model matching: an analysis of approaches to support model differencing. In: Proceedings of the 2nd Workshop on Comparison and Versioning of Software Models (CVSM 2009), pp. 1–6, Vancouver, BC, Canada. IEEE Computer Society Press (2009) Kolovos, D.S., Di Ruscio, D., Pierantonio, A., Paige, R.F.: Different models for model matching: an analysis of approaches to support model differencing. In: Proceedings of the 2nd Workshop on Comparison and Versioning of Software Models (CVSM 2009), pp. 1–6, Vancouver, BC, Canada. IEEE Computer Society Press (2009)
23.
Zurück zum Zitat Lindholm, T.: A three-way merge for XML documents. In: Munson, E.V., Vion-Dury, J.-Y. (eds.) Proceedings of the ACM Symposium on Document Engineering (DocEng 2004), pp. 1–10, Milwaukee, WI. ACM Press, New York (2004) Lindholm, T.: A three-way merge for XML documents. In: Munson, E.V., Vion-Dury, J.-Y. (eds.) Proceedings of the ACM Symposium on Document Engineering (DocEng 2004), pp. 1–10, Milwaukee, WI. ACM Press, New York (2004)
24.
Zurück zum Zitat Lippe, E., van Oosterom, N.: Operation-based merging. In: Proceedings of ACM SIGSOFT ’92: Fifth Symposium on Software Development Environments (SDE5), ACM SIGSOFT Software Engineering Notes 17(5), 78–87, Tyson’s Corner, Virginia (1992) Lippe, E., van Oosterom, N.: Operation-based merging. In: Proceedings of ACM SIGSOFT ’92: Fifth Symposium on Software Development Environments (SDE5), ACM SIGSOFT Software Engineering Notes 17(5), 78–87, Tyson’s Corner, Virginia (1992)
25.
Zurück zum Zitat Pottinger, R., Bernstein, P.A.: Merging models based on given correspondences. In: Freytag, J.C., Lockemann, P.C., Abiteboul, S., Carey, M.J., Selinger, P.G., Heuer, A. (eds.) Proceedings of the 29th International Conference on Very Large Data Bases (VLDB 2003), pp. 826–873, Berlin, Germany. Morgan Kaufmann, San Fransisco (2003) Pottinger, R., Bernstein, P.A.: Merging models based on given correspondences. In: Freytag, J.C., Lockemann, P.C., Abiteboul, S., Carey, M.J., Selinger, P.G., Heuer, A. (eds.) Proceedings of the 29th International Conference on Very Large Data Bases (VLDB 2003), pp. 826–873, Berlin, Germany. Morgan Kaufmann, San Fransisco (2003)
26.
Zurück zum Zitat Rönnau, S., Borghoff, U.M.: XCC: Change control of XML documents. Computer Science Research and Development 27(2), 95–111 (2012) Rönnau, S., Borghoff, U.M.: XCC: Change control of XML documents. Computer Science Research and Development 27(2), 95–111 (2012)
27.
Zurück zum Zitat Rossini, A., Rutle, A., Lamo, Y., Wolter, U.: A formalisation of the copy-modify-merge approach to version control in MDE. J. Logic Algebraic Program. 79(7), 636–658 (2010)CrossRefMATHMathSciNet Rossini, A., Rutle, A., Lamo, Y., Wolter, U.: A formalisation of the copy-modify-merge approach to version control in MDE. J. Logic Algebraic Program. 79(7), 636–658 (2010)CrossRefMATHMathSciNet
28.
Zurück zum Zitat Rutle, A., Rossini, A., Lamo, Y., Wolter, U.: A category-theoretical approach to the formalisation of version control in MDE. In: Chechik, M., Wirsing, M. (eds.) Proceedings of the 12th International Conference on Fundamental Approaches to Software Engineering (FASE 2009). Lecture Notes in Computer Science, vol. 5503, pp. 64–78, York, UK. Springer, Berlin (2009) Rutle, A., Rossini, A., Lamo, Y., Wolter, U.: A category-theoretical approach to the formalisation of version control in MDE. In: Chechik, M., Wirsing, M. (eds.) Proceedings of the 12th International Conference on Fundamental Approaches to Software Engineering (FASE 2009). Lecture Notes in Computer Science, vol. 5503, pp. 64–78, York, UK. Springer, Berlin (2009)
29.
Zurück zum Zitat Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: EMF Eclipse Modeling Framework. The Eclipse Series. Addison-Wesley, Upper Saddle River (2009) Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: EMF Eclipse Modeling Framework. The Eclipse Series. Addison-Wesley, Upper Saddle River (2009)
30.
Zurück zum Zitat Taentzer, G., Ermel, C., Langer, P., Wimmer, M.: Conflict detection for model versioning based on graph modifications. In: Ehrig, H., Rensink, A., Rozenberg, G., Schürr, A. (eds.) ICGT 2010—Graph Transformations, 5th International Conference. Lecture Notes in Computer Science, vol. 6372, pp. 171–186. Enschede, The Netherlands (2010) Taentzer, G., Ermel, C., Langer, P., Wimmer, M.: Conflict detection for model versioning based on graph modifications. In: Ehrig, H., Rensink, A., Rozenberg, G., Schürr, A. (eds.) ICGT 2010—Graph Transformations, 5th International Conference. Lecture Notes in Computer Science, vol. 6372, pp. 171–186. Enschede, The Netherlands (2010)
31.
Zurück zum Zitat van Rysselberghe, F., Demeyer, S.: Evaluating clone detection techniques from a refactoring perspective. In: Proceedings of the 19th International Conference on Automated Software Engineering (ASE 2004), pp. 336–339, Linz, Austria. IEEE Computer Society Press, New York (2004) van Rysselberghe, F., Demeyer, S.: Evaluating clone detection techniques from a refactoring perspective. In: Proceedings of the 19th International Conference on Automated Software Engineering (ASE 2004), pp. 336–339, Linz, Austria. IEEE Computer Society Press, New York (2004)
32.
Zurück zum Zitat Vesperman, J.: Essential CVS. O’Reilly, Sebastopol (2006) Vesperman, J.: Essential CVS. O’Reilly, Sebastopol (2006)
33.
Zurück zum Zitat Westfechtel, B.: Structure-oriented merging of revisions of software documents. In: Feiler, P.H. (ed.) Proceedings of the 3rd International Workshop on Software Configuration Management (SCM-3), pp. 68–79, Trondheim, Norway. ACM Press, New York (1991) Westfechtel, B.: Structure-oriented merging of revisions of software documents. In: Feiler, P.H. (ed.) Proceedings of the 3rd International Workshop on Software Configuration Management (SCM-3), pp. 68–79, Trondheim, Norway. ACM Press, New York (1991)
34.
Zurück zum Zitat Westfechtel, B.: A formal approach to three-way merging of EMF models. In Di Ruscio, D., Kolovos, D.S. (eds.) Proceedings of the 1st International Workshop on Model Comparison in Practice (IWMCP 2010), Malaga, Spain. ACM Press, New York, pp. 31–41 (2010) Westfechtel, B.: A formal approach to three-way merging of EMF models. In Di Ruscio, D., Kolovos, D.S. (eds.) Proceedings of the 1st International Workshop on Model Comparison in Practice (IWMCP 2010), Malaga, Spain. ACM Press, New York, pp. 31–41 (2010)
35.
Zurück zum Zitat Xing, Z., Stroulia, E.: Refactoring detection based on UMLDiff change-facts queries. In: Proceedings of the 13th Working Conference on Reverse Engineering (WCRE 2006), pp. 263–274, Benevento, Italy. IEEE Computer Society Press, New York (2006) Xing, Z., Stroulia, E.: Refactoring detection based on UMLDiff change-facts queries. In: Proceedings of the 13th Working Conference on Reverse Engineering (WCRE 2006), pp. 263–274, Benevento, Italy. IEEE Computer Society Press, New York (2006)
Metadaten
Titel
Merging of EMF models
Formal foundations
verfasst von
Bernhard Westfechtel
Publikationsdatum
01.05.2014
Verlag
Springer Berlin Heidelberg
Erschienen in
Software and Systems Modeling / Ausgabe 2/2014
Print ISSN: 1619-1366
Elektronische ISSN: 1619-1374
DOI
https://doi.org/10.1007/s10270-012-0279-3

Weitere Artikel der Ausgabe 2/2014

Software and Systems Modeling 2/2014 Zur Ausgabe