<<

Issues and Challenges in Model Versioning

Tutorial at iiWAS2009/MoMM2009 (Kuala Lumpur, Malaysia) 14.12.2009

Dipl.-Ing. Kerstin Altmanninger (Presenter)

Johannes Kepler University Linz, Austria Dipl.-Ing. Kerstin Altmanninger

Johannes Kepler University Linz Department of Telecooperation (TK) Altenberger Straße 69, 4040 Linz, Austria

Phone: +43 (0)70/2468-9262 Fax: +43 (0)70/2468-9829 Email: [email protected] WWW: http://www.tk.jku.at

Projects: . ModelCVS: A Semantic Infrastructure for Model-based Tool Integration . AMOR – Adaptable Model Versioning

PhD thesis: Models in Conflict – A Semantically Enhanced System for Model Artifacts

Issues and Challenges in Model Versioning 2/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Outline

. Introduction to Model-driven Engineering . Features of Version Control Systems • Top-level Features • 3-way Features . Challenges in Model Versioning • Existing Systems • Requirements • Issues . Discussion . AMOR Project . Literature

Issues and Challenges in Model Versioning 3/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Introduction to Model-driven Engineering

Issues and Challenges in Model Versioning 4/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Introduction to Model-driven Engineering

Problem #1: Problem Area vs. Solution Area

GAP Problem GAP . How do analyze models associate with code? . How does changes in the code affect the model? GAP . Are models consistent with the code? . … modeler

Traditional Development

GAP

GAP programmer GAP

Issues and Challenges in Model Versioning 5/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Introduction to Model-driven Engineering

Problem #2: Modeling as a Necessary Evil

. »When it comes down to it, the real point of software development is cutting code«

. »Diagrams are, after all, just pretty pictures«

. »No user is going to thank you for pretty pictures; what a user wants is software that executes«

[M. Fowler, ”UML Distilled”, 1st edition, Addison Wesley, 1997]

Issues and Challenges in Model Versioning 6/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Introduction to Model-driven Engineering

Solution: Model-driven Engineering (MDE)

Model-driven Engineering

Model-Driven Architecture Domain-Specific Modeling (MDA) (DSM)

Platform Independent Model (PIM) Model

a m a Platform Specific Model (PSM)

a m

Code Code

OMG, ArcStyler, OptimalJ, Executable MetaCase, Eclipse Modeling Framework, OSLO, UML, AndroMDA, … Software Factories, WebRatio, …

Issues and Challenges in Model Versioning 7/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Introduction to Model-driven Engineering

Effect #1: Evolution of Modeling

. Models as sketch • Communication of ideas/alternatives • Goal: Modeling

. Models as templates time • Documentation of design decisions • Goal: Implementation guide

. Models as programs • Generation of applications automatically • Goal: Models are source code and vice versa

Issues and Challenges in Model Versioning 8/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Introduction to Model-driven Engineering

Effect #2: Model as the Central Artifact

Static Analysis Dynamic Analysis

Documentation Rapid Prototyping Model

Refactorings/ Code Generation Transformations

Versioning Automatic Testing

Issues and Challenges in Model Versioning 9/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Introduction to Model-driven Engineering

Effect #3: Models are more than just Pictures

. Foundation: Formal language definition . Modeling languages: MOF, Ecore, …

. Automatic model processing (e.g., PIM -> PSM, refactoring) . Model transformation languages: QVT, ATL, …

. From the model to software . Code generation languages: JET, Xpand, …

. Persistent model storage and model exchange . Model serialization/deserialization: XMI

Issues and Challenges in Model Versioning 10/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems

Issues and Challenges in Model Versioning 11/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems Overview of Version Control Systems

. Part of Software Configuration Management . Basic components: • Repository • (Software) Artifacts => versions (revisions vs. variants) . Purpose: • Historical archiving and management of changes in (software) artifacts − retrieving old revisions − keeping track of changes repository

• Supports collaboration revisions & variants

Issues and Challenges in Model Versioning 12/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems Top-level Features

Version Control System

Collaboration Merge Repository Branching Architecture

Pessimistic Optimistic Raw Two-way Three-way Centralized Distributed Implicit Explicit

Comparison Conflict Detection Conflict Resolution Merge

Issues and Challenges in Model Versioning 13/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems

• Collaboration • Merge Pessimistic Versioning • Repository Architecture • Branching

1 repository 2 repository 3 repository 4 repository V V VV’ VV’ checkout lock lock checkout unlock lock V V’ V’ V’ V’

Bart Lisa Bart Lisa Bart Lisa Bart Lisa

. Lock-modify-unlock paradigm

. Disadvantages: • Prohibits parallel working • Administration overhead • False sense of security

Issues and Challenges in Model Versioning 14/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems

• Collaboration • Merge Optimistic Versioning • Repository Architecture • Branching

1 repository 2 repository 3 repository 4 repository V VV” VV” VV”

checkout checkout commit commit

V V V’ V” V’ V” V’ V* V”

Bart Lisa Bart Lisa Bart Lisa Bart update Lisa

5 repository . Copy-modify-merge paradigm V VV* . Advantage: commit • Saves time V* V” . Disadvantage: Bart Lisa • Result depends on quality of the merge

Issues and Challenges in Model Versioning 15/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems

• Collaboration • Merge Raw vs. Two-way vs. Three-way • Repository Architecture • Branching

(a) Raw (b) Two-way (c) Three-way

V V V change’ change’’ change’ change’’ change’ change’’

diff’ diff’’ V’ V’’ V’ V’’ V’ V’’ change’’ conflicts & equivalences inconsistencies

V* V* V*

Issues and Challenges in Model Versioning 16/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems

• Collaboration • Merge Centralized vs. Distributed • Repository Architecture • Branching

. Centralized • Users access a master repository via a client • Edited working copies must be committed before they can be propagated to other VCS users • Version history is only available in the master repository

. Distributed • Each user has an own repository • Repositories can be synchronized optionally with others • Version history is distributed on the different repositories

Issues and Challenges in Model Versioning 17/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems

• Collaboration • Merge Branching Variants • Repository Architecture • Branching

. Implicit/Explicit . Used due to different intentions • Version Management − software product releases • Variant Management − software product variants − common core • Decentralized Version Control Systems • Resolution Support − storage of the intermediate versions before a merge − to retrieve information about differences, conflicts and resolution patterns

Issues and Challenges in Model Versioning 18/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems 3-way Merge Features

diff’ V C diff” A A A C A A A A C A A A C A Comparison A A A A A C A A A A A A

V’ V”

Conflict Detection Report

Conflict V’ V” Resolution

V* Merge

Issues and Challenges in Model Versioning 19/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems Comparison Phase

Comparison

Basis Representation Differences

Match Granularity

State Change Line Tree Graph Generic Specific Specific Atomic Atomic Composite

UUID Heuristics Fixed Configurable

Issues and Challenges in Model Versioning 20/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Basis • Match • Representation State vs. Change • Granularity • Differences

State-based Change-based

ADD 1 8 1 1 8 1

2 3 4 2 4 2 3 4 2 UPD 4

5 6 7 5 6 7 5 6 7 5 6 7

. Input: . Input: • Two versions of an artifact • Two versions of an artifact • Change protocol (log file) . Advantage: . Advantage: • Independent of a development environment / • Composite operations available editor . Disadvantage: . Disadvantage: • Bounded to an development environment / • Matching techniques needed editor . Conflict detection is computed on the resulting . Conflict detection is computed on the difference sets logged changes

Issues and Challenges in Model Versioning 21/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Basis • Match • Representation UUIDs vs. Heuristics • Granularity • Differences

. Matching approaches particular important for state-based versioning . Needed to identify the artifact’s elements occurring in both versions

. Universally Unique Identifiers (UUIDs) • All elements in an artifact need to provide an UUID • Newly created elements must be assigned with an UUID • UUIDs must not be modified until the deletion of the element • Two elements occurring in different versions with the same UUID are considered as identical • Advantages: − easiest approach to realize a matching − elements can still be matched, although they have been changed fundamentally − unique matching • Disadvantage: − Assignment of UUIDs needed

Issues and Challenges in Model Versioning 22/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Basis • Match • Representation UUIDs vs. Heuristics • Granularity • Differences

. Heuristics • May be based on structural similarities of two artifact versions • Often use metrics from information theory • Advantage: − flexible • Disadvantage: − matching might not be unique − performance may be an issue

. UUIDs and Heuristics can be combined!

Issues and Challenges in Model Versioning 23/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Basis • Match • Representation Line vs. Tree vs. Graph • Granularity • Differences

Line-based Tree-based Graph-based

. Any kind of artifacts . HTML, XML file . Model artifacts . Latex document . Program source code

1 1 1 2 3 2 3 4 2 3 4 4 5 5 6 7 5 6 7

Issues and Challenges in Model Versioning 24/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Basis • Match • Representation Fixed vs. Configurable Granularity • Granularity • Differences

. Also known as version granularity, delta granularity or unit of conflicts . Can be applied on any granularity level

LATEX Java

Article Application

Section 1 Section 2 Section 3 Class 1 Class 2

… Paragraph 1 Paragraph 2 … Field 1 Field 2 Function 1 Procedure 1

Sentence 1 Sentence 2 … Input 1 Input 2 Body Output …

… Word 1 Word 2 Word 3

Char 1 Char 2 Char 3 … …

Issues and Challenges in Model Versioning 25/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Basis • Match • Representation Outcome of the Comparison Phase • Granularity • Differences

Resulting set of difference can be classified according to two orthogonal dimensions . Dependency on an underlying language . Divisibility of a change operation

A Generic • ADD Atomic • DEL • UPD

Specific • move Difference Atomic • rename • ... C Specific • convert to singleton Composite • extract superclass • ...

Issues and Challenges in Model Versioning 26/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems Conflict Detection Phase

. Textual

Conflict Detection

Conflicts Visualization Presentation . Graphical

Textual Graphical Grouping

Issues and Challenges in Model Versioning 27/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems Conflict Detection Phase

Conflicts

ADD DEL UPD Contradicting Same Intention Intention ADD n.a. n.a.

DEL n.a. − Text Syntax Semantics Semantics

UPD n.a.

Static Behavioral Linguistic Equivalence

Issues and Challenges in Model Versioning 28/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Text • Syntax Textual Conflict • Semantics • Equivalence

A" name="Version0"> xmi:id="_v0dpsJ7TEd67t-3wTeUA-A" name="Person"> name="birthday" aggregation="composite"> UML_METAMODELS/Ecore.metamodel.uml#EDate"/> name="lastName" aggregation="composite"/>

Issues and Challenges in Model Versioning 29/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Text • Syntax Syntactic Conflict • Semantics • Equivalence

. »Detected by a structural comparison of artifacts, which are represented either in a tree or graph reflecting the syntax of the artifact’s language.«

. »Syntactic conflicts are resulting from modifications, which produce a violation of the language’s syntax when merged.«

Customer Account

Customer * Account Customer

Issues and Challenges in Model Versioning 30/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Text • Syntax Semantic Conflicts • Semantics • Equivalence

. Some conflicts cannot be detected by a structural comparison due to • Semantic meaning of linguistic expressions • Syntactic different parts have been edited which may − violate language constraints or − the execution behavior if merged Semantic domain . Formal semantics are needed to detect such kinds of conflicts Semantic mapping . Formal semantics consists of three parts: • Syntax of a language Syntax • Semantic domain • Semantic mapping

Issues and Challenges in Model Versioning 31/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Text • Syntax Static Semantic Conflict • Semantics • Equivalence

. Occurs due to violation of language constraints . In modeling e.g., by violation of relationships, context conditions, consistency or violation of integrity

Researcher

Assistant Professor

getLecturer():Assistant getLecturer():Professor

Researcher Researcher

getLecturer():Researcher

Assistant Professor ProjectAss

Assistant Professor getLecturer():Assistant getLecturer():Professor

Issues and Challenges in Model Versioning 32/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Text • Syntax Behavioral Semantic Conflict • Semantics • Equivalence

CalcCharge . Occurs due to . E.g., concurrent Sequence concurrent changes of From1 0.1 changes on the data or Copy1 the execution behavior To1 charge control flow may yield to From1 0.03 Assign Copy1 behavioral side effects To1 tax

From1 charge+tax Copy1 To1 output ReplyOut

CalcCharge CalcCharge

Sequence Sequence From1 0.12 From1 0.1 Copy1 Copy1 To1 charge To1 charge From1 0.03 From1 0.04 Assign Copy1 Assign Copy1 To1 tax To1 tax

From1 charge+tax From1 charge+tax Copy1 Copy1 To1 output To1 output ReplyOut ReplyOut

Issues and Challenges in Model Versioning 33/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Text • Syntax Linguistic Semantic Conflict • Semantics • Equivalence

Occurs e.g., if two VCS users edit the same artifact with the same intentions but utilized different literal designations.

Person

mother 2 child Person Person parent father child child

Issues and Challenges in Model Versioning 34/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems • Text • Syntax Conflict due to Equivalence • Semantics • Equivalence

May occur due to utilization of . semantically equivalent concepts . refactorings

Idea Implementation Documentation

Realization Implementation Implementation Idea Idea Documentation Documentation

Issues and Challenges in Model Versioning 35/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Features of Version Control Systems Conflict Resolution Phase

Conflict Resolution

Automatization Conflict Recommendations Dependencies

Semi-automatic Automatic Order

Support for semi-automatic resolution . Dependency analysis to identify resolution orders . Resolution patterns/policies

Issues and Challenges in Model Versioning 36/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning

Issues and Challenges in Model Versioning 37/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Existing Systems

Audodesk Vault Alienbrain Vesta OpenCVS GNU arch

Subversion CVS Aldon FirePublish AllChange SVK LibreSource FileHamster CollabNet Bazaar Aegis ArX AllFusion Harvest CVSNT DVCS Evolution EVS ClearCase BitKeeper

Issues and Challenges in Model Versioning 38/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Survey Result about available Model VCSs

Issues and Challenges in Model Versioning 39/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Overall Challenges

. General • Mismatch in representation • Bounded to modeling environment • Inflexible in modeling language • Too generic • Various serialization variants • Disregard of dependencies between artifacts . Comparison Phase • Non-configurable . Conflict Detection • Erroneous conflict detection − Missing interpretation of semantics of artifacts − Missing information about edit operations in state-based systems • Unsatisfactory conflict visualization . Unsupportive Conflict Resolution . Inconsistent Merged Model Versions

Issues and Challenges in Model Versioning 40/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Why not using Subversion with diff? (1/2)

Issues and Challenges in Model Versioning 41/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Why not using Subversion with Unix diff? (2/2)

Mismatch in representation!

Issues and Challenges in Model Versioning 42/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Specific vs. Generic VCSs for Model Artifacts

. How can a standalone VCS for model artifacts be realized without depending on the traces EMF Compare of changes on the artifact, performed by modelers? . How can a VCS for model artifacts be realized without Unicase Odyssey-VCS depending on a concrete IBM Rational modeling language? Software Architect . How can such a system be generic but provides accurate supported modeling languages conflict detection and supportive supported modeling environments conflict resolution support?

Issues and Challenges in Model Versioning 43/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Serialization Variants

. For standalone VCSs the versions of model artifacts need to be exchanged between the modeling environment and the VCS . Modeler may use different modeling environments to edit model artifacts from the repository . Problems: . Modeling environments may export different XMI variants (those XMI representations of a model artifact may vary considerably) . Modeling environments may utilize divergent metamodels of a modeling language (e.g., various UML implementations exist) . Summing up those cannot be utilized in the VCS right away . Solution: Adapters to import different XMI representations are indispensable

Issues and Challenges in Model Versioning 44/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Dependencies between Artifacts

. Artifacts in a repository may depend on each other (may have communalities) . If e.g., a class is renamed in a UML class diagram this has an effect on the UML Sequence Diagram instantiating this class

Issues and Challenges in Model Versioning 45/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Comparison Phase

Comparison . On which granularity level should the comparison be performed?

. For generic VCSs the granularity level should be configurable for specific languages and by VCS users. How Conflict can this be realized? Detection . How can composite operations (like refactorings) be detected in state-based systems? Conflict Resolution . Which information is needed for the following phases conflict detection and resolution?

Merge

Issues and Challenges in Model Versioning 46/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Conflict Detection Phase

Comparison . How can accurate conflict detection be achieved? . avoid falsely indicated conflicts . find undetected conflicts

Conflict . How can conflicts be presented? Detection . What should be presented to the user? . Tentative merge Conflict (apply only non-conflicting changes) Resolution . Left change, right change, resolution patterns

Merge

Issues and Challenges in Model Versioning 47/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Conflict Resolution Phase

Comparison . Which influence has the resolution order, in which conflicts are resolved, to the overall effort to combine two versions?

. How can a VCS user be assisted in the resolution of conflicts by the system? Conflict Detection . Can recurring conflict resolution activities by users be prevented?

Conflict . If VCSs can learn from conflict resolution activities, how Resolution can rules be applied on similar conflicting situations?

Merge

Issues and Challenges in Model Versioning 48/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Challenges in Model Versioning Merge Phase

Comparison . How can it be ensured that only valid models are saved in the repository?

. How can it be prevented that information gets lost after the merge of two artifacts? Conflict Detection

Conflict Resolution

Merge

Issues and Challenges in Model Versioning 49/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Discussion

Issues and Challenges in Model Versioning 50/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Discussion Questions

. Are there more challenges and issues?

. What are your expectations on Version Control Systems for models?

. Do we really need Version Control Systems dedicated for model artifacts?

. Versioning habits?

. …

Issues and Challenges in Model Versioning 51/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Discussion

Questionnaire http://www.modelversioning.org

Issues and Challenges in Model Versioning 52/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project

Issues and Challenges in Model Versioning 53/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Research Objectives

. General • Mismatch in representation • Bounded to modeling environment • Inflexible in modeling language • Too generic • Various serialization variants • Disregard of dependencies between artifacts . Comparison Phase • Non-configurable . Conflict Detection (CD) • Erroneous conflict detection − Missing interpretation of semantics of artifacts − Missing information about edit operations in state-based systems • Unsatisfactory conflict visualization . Unsupportive Conflict Resolution (CR) . Inconsistent Merged Model Versions

Issues and Challenges in Model Versioning 54/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Partners

. AMOR: Adaptable Model Versioning . FFG FIT-IT Semantic Systems Project . Duration: Feb. 2009 – Jan. 2011

Industrial Partner:

Academic Partners:

Business Informatics Group (BIG) Institut für Software Technik und Interaktive Systeme

Arbeitsgruppe Information Systems (IFS) Institut für Bioinformatik Institut für Telekooperation (TK)

Issues and Challenges in Model Versioning 55/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project

Conceptual Architecture of AMOR language independent

graph- based modeling environment independent

adaptive

Issues and Challenges in Model Versioning 56/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Configurable Comparison – Motivation

Advantages: . Configurable for specific user desires . Configurable for specific modeling languages

Issues and Challenges in Model Versioning 57/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Configurable Comparison

. By inspecting the structural features, namely • the attributes and • references of a model element one can determine whether the model element as a whole has been updated

. Particularly four different strategies for the detection of structural changes in a graph that are of interest for conflict detection can be identified

• Attribute update (ATT) • Reference update (REFS) • Role update (ROL) • Referenced element update (REF)

• By setting of those strategies on model elements and properties configurable comparison can be achieved

Issues and Challenges in Model Versioning 58/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Architecture of Semantic Conflict Detection

Modeling Language Equivalent Static of of Concepts Semantics

Behavioral Abstract Syntax Semantic Aspects Semantics Conceptual defines Semantic View defines M3 (Ecore) Definitions conforms to conforms to

View Definition (Variable) Modeling (Variable) Metamodel

Realization Metamodel

Language Specification Transformation

conforms to conforms to Syntactic Semantic View Views Model Vsyn Model Vsem Model Model V'syn Model V"syn Model V" Versions Versions Model V'sem sem

Conflict Conflict Comparison Comparison Detection Conflict Detection Resolution Phases Basic VCS Basic VCS Model V*syn Merge Semantic Enhancement

Issues and Challenges in Model Versioning 59/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Example of Semantic Conflict Detection

Issues and Challenges in Model Versioning 60/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Operation Recorder – Motivation

. Detection of composite operations and refactorings enables… • More accurate conflict detection • Smart conflict resolution . Composite operations in modeling environments (accomplished by experts)  Fixed, pre-defined composite operations . Hardly possible to predefine all relevant composite operations  Highly valuable to enable “usual modelers” to specify composite operations . Modelers have domain knowledge  But, usually no knowledge on model transformation techniques

Issues and Challenges in Model Versioning 61/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Operation Recorder EMF Compare EMF Ecore based EMF Ecore based models models

EMF Ecore based Any Editor models

EMF Ecore based Extended OCL models

Issues and Challenges in Model Versioning 62/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Supportive Conflict Resolution

. Goal • Accelerate conflict resolution • Minimize errors

. Proposed Solution • Infer general resolution strategies from accumulated historical data • Provide enhanced resolution support for repetitive conflict situations • Apply collaborative merge in order to capture all user intentions

Issues and Challenges in Model Versioning 63/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Architecture for Conflict Resolution

64 Issues and Challenges in Model Versioning 64/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Conflict Resolution: Motivation Example

V

V‘ V‘‘

V* (Merged Version) ScientificStaff

Teaching Research Researcher Assistant lectures  Professor Assistant Junior Professor

Issues and Challenges in Model Versioning 65/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project

... but sometimes this will not be enough

... then Lisa and Bart must resolve the conflict together

Issues and Challenges in Model Versioning 66/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Why Collaborative Conflict Resolution?

Origin (V0) has Car Engine S/N: Y013467 Hybrid Diesel

Lisa‘s working copy (V1) Bart‘s working copy 1 ... has * has 1 Car Engine Car Engine

Merged (V2) * 1 has Car Engine

 Automatic resolution is not possible here!

Issues and Challenges in Model Versioning 67/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Why Collaborative Conflict Resolution?

Lisa‘s working copy (V1‘) Bart‘s working copy (V1‘‘) 1 has * has 1 Car Engine Car Engine

Merged (V2) 1 1 has * 1 Car Engine EngineType

 Higher semantics  Better quality

Issues and Challenges in Model Versioning 68/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Collaborative Conflict Resolver

1 2

4 5 3

Issues and Challenges in Model Versioning 69/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Summary: AMOR Workflow (1/2)

V’ V Comparison V”

Semantic View Semantic View Semantic View Definition Definitions Specification Repository Conflict Operation Detection Operation Operations Repository Specification

Issues and Challenges in Model Versioning 70/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger AMOR Project Summary: AMOR Workflow (2/2)

single Semi- automatic Recom- Resolution Resolution mendations Lookup Manual Resolution Conflict Resolution Resolution Pattern Pattern Storage collaborative Semi- automatic Resolution Resolution Reasoning Manual Merge V* Resolution Resolution

Issues and Challenges in Model Versioning 71/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Literature

Issues and Challenges in Model Versioning 72/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Literature Model Driven Development

. Books . K. Czarnecki, U.W. Eisenecker: Generative Programming: Methods, Tools, and Applications. Addison-Wesley, 2000 . D.S. Frankel: Model Driven Architecture – Applying MDA to Enterprise Computing. Wiley, 2003 . J. Greenfield, K. Short: Software Factories. Wiley, 2004 . S.J. Mellor, M.J. Balcer: Executable UML: a foundation for model-driven architecture. Addison-Wesley, 2002 . IEEE Computer, Special Issue on Model Driven Engineering. February 2006 . Cover Feature: Model Driven Engineering by Douglas Schmidt, Vanderbilt University

. Websites . www.codegeneration.net/ . www.metacase.com . www.planetmde.org . www.omg.org/mda/ . www.modelware-ist.org

Issues and Challenges in Model Versioning 73/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Literature Versioning (1/2)

. Articles . Altmanninger, K., Seidl, M. and Wimmer, M., “A Survey on Model Versioning Approaches”, International Journal of Web Information Systems (IJWIS), Vol. 5 No. 3, 2009 . Conradi, R. and Westfechtel, B., “Towards a uniform version model for software configuration management”, Software Configuration Management, Springer, 1997 . Mens, T. “A state-of-the-art survey on software merging”, IEEE Transactions on Software Engineering, Vol. 28 No. 5, 2002 . Estublier, J., Leblang, D., van der Hoek, A., Conradi, R., Clemm, G., Tichy, W. F. and Wiborg-Weber, D., “Impact of software engineering research on the practice of software configuration management”, ACM Transactions on Software Engineering and Methodology, Vol. 14 No. 4, 2005

Issues and Challenges in Model Versioning 74/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Literature Versioning (2/2)

. Conference & Workshop Papers . Alanen, M. and Porres, I.: Difference and Union of Models. In UML 2003 – The Unified Modeling Language, Springer, 2003. . Altmanninger, K.: Models in Conflict – Towards a Semantically Enhanced Version Control System for Models. In Models in Software Engineering; Workshops and Symposia at MoDELS 2007, Springer, 2008. . Cicchetti, A., Ruscio, D. D. and Pierantonio, A.: A Metamodel Independent Approach to Difference Representation. In Journal of Object Technology, Vol. 6 No. 9, 2007. . Kögel, M.: Towards Software Configuration Management for Unified Models. In Proceedings of the International Workshop on Comparison and Versioning of Software Models (CVSM), Leipzig, Germany, ACM, 2007. . Murta, L., Corrêa, C., Jo a. G. P. and Werner, C.: Towards Odyssey-VCS 2: Improvements over a UML-based Version Control System. In Proceedings of the International Workshop on Comparison and Versioning of Software Models (CVSM) in conjunction with the International Conference on Software Engineering, Leipzig, Germany, ACM, 2008. . Oda, T. and Saeki, M.: Meta-modeling based Version Control System for Software Diagrams. In IEICE Transactions on Information and Systems, Vol. E89-D No. 4, 2006. . Schneider, C., Zündorf, A. and Niere, J.: CoObRA – A small step for development tools to collaborative environments. In Proceedings of the Workshop on Directions in Software Engineering Environments in conjunction with the 26th International Conference on Software Engineering (ICSE), 2004.

Issues and Challenges in Model Versioning 75/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Literature AMOR Project

. Altmanninger, K., Kappel, G., Kusel, A., Retschitzegger, W., Schwinger, W., Seidl, M. and Wimmer, M.: AMOR – towards adaptable model versioning. In 1st International Workshop on Model Co-Evolution and Consistency Management (MCCM) in conjunction with the 11th International Conference on Model Driven Engineering Languages and Systems (MODELS), 2008. . Brosch, P.: Improving conflict resolution in model versioning systems. In Proceedings of the Doctoral Symposium at the 31st International Conference on Software Engineering (ICSE), Companion Volume, pp. 355–358, 2009. . Brosch, P., Langer, P., Seidl, M. and Wimmer, M.: Towards end-user adaptable model versioning: The by-example operation recorder. In Proceedings of the International Workshop on Comparison and Versioning of Software Models (CVSM) in conjunction with the 31st International Conference on Software Engineering (ICSE), IEEE Computer Society, pp. 55–60, 2009. . Altmanninger, K., Seidl, M. and Wimmer, M.: A survey on model versioning approaches. In International Journal of Web Information Systems (IJWIS), vol. 5, no. 3, pp. 271-304, 2009. . Brosch, P., Langer, P., Seidl, M. and Wimmer, M.: We can work it out: Collaborative Conflict Resolution in Model Versioning. Accepted for the European Conference on Computer Supported Cooperative Work, 2009. . Brosch, P., Langer, P., Seidl, M., Wieland, K. and Wimmer, M.: Mining of Model Repositories for Decision Support in Model Versioning. Accepted for the Second Model-Driven Tool & Process Integration Workshop, 2009. . Brosch, P., Langer, P., Seidl, M., Wieland, K., Wimmer, M., Kappel, G., Retschitzegger, W. and Schwinger, W.: An Example is Worth a Thousand Words: Composite Operation Modeling By-Example. In Proceedings of the 12th International Conference on Model Driven Engineering Languages and Systems, Denver, Colorado, USA, October 4-9, 2009. . Wieland, K.: Advanced Conflict Resolution Support for Model Versioning Systems. In Proceedings of the Doctoral Symposium at the 12th International Conference on Model Driven Engineering Languages and Systems (MODELS), Denver, Colorado, USA, October 2009. . Altmanninger, K., Brosch, P., Kappel, G., Langer, P., Seidl, M., Wieland, K. and Wimmer, M.: Why Model Versioning is Needed!? An Experience Report. In Proceedings of the Models and Evolution Workshop, joint MODELS Workshop on Model-Driven Software Evolution (MoDSE) and Model Co-Evolution and Consistency Management (MCCM) at the 12th International Conference on Model Driven Engineering Languages and Systems (MoDELS), Denver, CO, USA, October 2009.

Issues and Challenges in Model Versioning 76/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger Thank you for your attention!

http://smover.tk.uni-linz.ac.at

http://www.modelversioning.org

Issues and Challenges in Model Versioning 77/77 Tutorial@iiWAS2009/MoMM2009 Dipl.-Ing. Kerstin Altmanninger