A graph-based algorithm for three-way merging of ordered collections in EMF models

Version control for models is not yet supported in an adequate way. In this paper, we address three-way merging of model versions. Based on a common base version b, two alternative versions a1 and a2 were developed by copying and modifying the base version. To reconcile these changes, a merged version m is to be created as a common successor of a1 and a2. We present a graph algorithm to solve an important subproblem which occurs in three-way model merging: merging of (linearly) ordered collections. To create the merged version, a generalized topological sort is performed. Conflicts occur if the order of elements cannot be deduced automatically; these conflicts are resolved either interactively or by default rules. We have implemented the merge algorithm in our tool BTMerge, which performs a consistency-preserving merge of versions of EMF models being instances of arbitrary Ecore models. By taking arbitrary move operations into account, the algorithm considerably goes beyond the functionality of contemporary merge tools which are based on common subsequences and thus cannot adequately handle move operations.

[1]  Bernhard Westfechtel,et al.  Model-based tool support for consistent three-way merging of EMF models , 2013, ACME@ECOOP.

[2]  Frank Budinsky,et al.  EMF: Eclipse Modeling Framework 2.0 , 2009 .

[3]  Markus Völter,et al.  Model-Driven Software Development: Technology, Engineering, Management , 2006 .

[4]  Gabriele Taentzer,et al.  A fundamental approach to model versioning based on graph modifications: from theory to implementation , 2012, Software & Systems Modeling.

[5]  Markus Herrmannsdoerfer,et al.  Operation-based conflict detection , 2010, IWMCP '10.

[6]  Tancred Lindholm,et al.  A three-way merge for XML documents , 2004, DocEng '04.

[7]  Tom Verhoeff,et al.  Generic tool for visualization of model differences , 2010, IWMCP '10.

[8]  Felix Schwägerl,et al.  Tool Support for the Evaluation of Matching Algorithms in the Eclipse Modeling Framework , 2013, MODELSWARD.

[9]  Udo Kelter,et al.  A Generic Difference Algorithm for UML Models , 2005, Software Engineering.

[10]  Paul Heckel,et al.  A technique for isolating differences between files , 1978, CACM.

[11]  Gabriele Anderst-Kotsis,et al.  Semantics for Accurate Conflict Detection in SMoVer: Specification, Detection and Presentation by Example , 2010, Int. J. Enterp. Inf. Syst..

[12]  Bernhard Westfechtel A formal approach to three-way merging of EMF models , 2010, IWMCP '10.

[13]  Michael Pilato Version Control with Subversion , 2004 .

[14]  Klaus Pohl,et al.  Software Product Line Engineering - Foundations, Principles, and Techniques , 2005 .

[15]  Walter F. Tichy,et al.  Rcs — a system for version control , 1985, Softw. Pract. Exp..

[16]  Manuel Wimmer,et al.  A survey on model versioning approaches , 2009, Int. J. Web Inf. Syst..

[17]  Jordi Cabot,et al.  MoDisco: A model driven reverse engineering framework , 2014, Inf. Softw. Technol..

[18]  Jennifer Vesperman Essential CVS , 2003 .

[19]  Thomas G. Szymanski,et al.  A fast algorithm for computing longest common subsequences , 1977, CACM.

[20]  Cédric Brun Obeo,et al.  MODEL DIFFERENCES IN THE ECLIPSE MODELING FRAMEWORK , 2008 .

[21]  Bernhard Westfechtel,et al.  A graph-based algorithm for three-way merging of ordered collections in EMF models , 2014, MODELSWARD 2014.

[22]  Udo Kelter,et al.  Versioning of Ordered Model Element Sets , 2014, Softwaretechnik-Trends.

[23]  Walter F. Tichy,et al.  The string-to-string correction problem with block moves , 1984, TOCS.

[24]  Bernhard Westfechtel Merging of EMF models , 2012, Software & Systems Modeling.

[25]  Eleni Stroulia,et al.  UMLDiff: an algorithm for object-oriented design differencing , 2005, ASE.

[26]  Ivan Porres,et al.  Difference and Union of Models , 2003, UML.

[27]  S. Khanna,et al.  AF ormal Investigation ofDiff3 , 2007 .

[28]  John C. Grundy,et al.  A generic approach to supporting diagram differencing and merging for collaborative design , 2005, ASE '05.

[29]  Frank Budinsky,et al.  Eclipse Modeling Framework , 2003 .

[30]  Bernhard Westfechtel,et al.  Differencing and Merging of Software Diagrams - State of the Art and Challenges , 2007, ICSOFT.

[31]  Robert Sedgewick,et al.  Algorithms in Java, Part 5: Graph Algorithms , 2003 .

[32]  Sanjeev Khanna,et al.  A Formal Investigation of , 2007, FSTTCS.