Visualization of Merge Conflicts with UML Profiles

Attention: open in a new window. PDFPrintE-mail

The urgent demand for optimistic version control support for software models induced an active research field within the modeling community. Recently, several approaches have been proposed addressing the task of detecting conflicts when merging two concurrently changed versions of a model. However, the holistic representation and supportive visualization of detected merge conflicts still remain an open problem.

Therefore, we leverage the dynamic extension power of UML profiles by introducing a dedicated conflict profile to visually assist users in resolving merge conflicts. As a result, users may resolve conflicts in the concrete graphical syntax conducting their familiar UML editors without tool extensions. In combination with the advanced filtering and coloring features of Enterprise Architect, we achieved an outright and intuitive visualization of changes and conflicts in UML models without implementing heavy-weighted plug-ins. The following image depicts a sceenshot of a profiled UML class diagram in Enterprise Architect.

 

Screenshot of a profiled UML model

 

The Change and Conflict Profile

The diagram below depicts the UML profile enabling to annotate changes and conflicts in any UML model. The profile consists of two parts:

Change Profile. The change profile provides stereotypes for each kind of change. The stereotypes for atomic changes, like adds, updates, and deletions may be applied to all concrete UML concepts. Thus, the stereotype AtomicChange extends the root metaclass Element of the UML metamodel. In contrast to atomic changes, composite changes involve several model elements. Therefore, we decided to explicitly introduce a UML Collaboration annotated with a  CompositeChange stereotype for each composite change. The collaboration links via UML Connectors to the involved model elements to which appropriate Add, Delete, and Update stereotypes are applied. Finally, for each change the responsible user is saved as meta information.

Conflict Profile. The conflict profile provides a stereotype with appropriate tagged values for three kinds of conflicts: For contradicting changes, the profile provides a Update/Update and Delete/Update stereotype. Both may be applied to any UML element. In contrast to contradicting changes, violations may involve several model elements. Hence, similar as for composite changes, for each violation a UML Collaboration annotated with the respective stereotype OperationContractViolation or PostMergeViolation is introduced. A collaboration refers to elements involved in the violation using UML Connectors. In case of operation contract violations, to add more semantics to these connectors, they are annotated with respective stereotypes for marking how the contract is violated by the model element.

 

The Change and Conflict Profile

 

Downloads

A trial-version of Enterprise Architect may be downloaded from http://www.sparxsystems.eu. Further, you can download and import the UML Profile consisting of the

  • Change Profile (changeProfile.xml) for annotating applied changes and the
  • Conflict Profile (conflictProfile.xml) for annotating conflicts.
Both xml-files within the profile archive can easily be imported into Enterprise Architect.