Adaptable Model Versioning using Model Transformation By Demonstration
Upcoming SlideShare
Loading in...5
×
 

Adaptable Model Versioning using Model Transformation By Demonstration

on

  • 478 views

Model-driven engineering (MDE) is evermore adopted in academia and industry. In MDE, software models constitute the central artifacts in the software engineering process. ...

Model-driven engineering (MDE) is evermore adopted in academia and industry. In MDE, software models constitute the central artifacts in the software engineering process.

Developing a large software system entails the need for a large number of collaborating developers. Unfortunately, collaborative development of models is currently not sufficiently supported. Traditional versioning systems for code fail for models, because they neglect the graph-based nature of models.

A few dedicated model versioning approaches have been proposed. However, these approaches suffer from four major deficiencies. First, they either support only one modeling language or, if they are generic, they do not consider important specifics of a modeling language. Second, they do not allow the specification of composite operations such as refactorings and thus, third, they neglect the importance of respecting the original intention behind composite operations for detecting conflicts and constructing a merged model. Fourth, the types of detectable conflicts is insufficient and not extensible by users.

To tackle these deficiencies, we present an adaptable model versioning framework, which offers out-of-the-box support for all modeling languages, but also allows to be adapted for for specific modeling languages. For easily specifying language-specific composite operations, we propose a novel technique called model transformation by demonstration. These operation specifications constitute the adaptation artifacts for enabling the detection of applications of specified composite operations. Furthermore, we introduce techniques for detecting additional types of conflicts caused by concurrently applied composite operations as well as for revealing potentially unfavorable merge results.

Statistics

Views

Total Views
478
Views on SlideShare
478
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Adaptable Model Versioning using Model Transformation By Demonstration Adaptable Model Versioning using Model Transformation By Demonstration Presentation Transcript

    • Adaptable Model Versioning usingModel Transformation By DemonstrationPhD DefenseVienna, 21st of December 2011 Philip Langer Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna, Austria phone: +43 (1) 58801-18804 (secretary), fax: +43 (1) 58801-18896 office@big.tuwien.ac.at, www.big.tuwien.ac.at
    • Introduction Context Adaptable Model Versioning 2
    • Introduction Adaptable Model Versioning Managing the evolution of software artifacts performed by a distributed team. Vo Vr1 Merge Process Developer 1 Check Out Check In Repository Vm Check Out Check In Developer 2 Vo Vr2 t0 t1 t2 t3 3
    • Introduction Adaptable Model Versioning Software models in the context of model-driven engineering. Vo Vr1 Merge Process Developer 1 Check Out Check In Repository Vm Check Out Check In Developer 2 Vo Vr2 t0 t1 t2 t3 4
    • Introduction Adaptable Model Versioning Impedance Mismatch 5
    • Introduction Adaptable Model Versioning Deficiencies of existing model versioning systems  Modeling editor/language-specific vs. imprecise versioning  Tightly bound to a specific modeling editor or modeling language  Generic and unaware of the specifics of modeling languages  Specification of composite operations (e.g., refactorings)  Currently very challenging task  Requires specific knowledge which untrained users don’t have  Absence of information on applied composite operations  Operation recording  inherently puts restrictions on the modeling editor  Model differencing  no support for detecting composite operations  Insufficient conflict detection  Composite operations are not considered  Important types of conflicts and warnings are neglected P. Brosch, G. Kappel, P. Langer, M. Seidl, K. Wieland, and M. Wimmer. “The Past, Present, and Future of Model 6 Versioning”, in Emerging Technologies for the Evolution and Maintenance of Software Models. IGI Global, 2011.
    • Introduction Adaptable Model Versioning Generic but adaptable model versioning  Supporting all EMF*-based modeling languages  Adaptation points to incorporate language specifics  Advantages of generic and language-specific versioning systems AMOR project  Funded by FFG FIT-IT Semantic Systems  Gerti Kappel, Martina Seidl, Manuel Wimmer, Petra Brosch, Horst Kargl, Philip Langer, Werner Retschitzegger, Wieland Schwinger, and Konrad Wieland * Eclipse Modeling Framework (EMF) 7
    • Introduction Adaptable Model Versioning AMOR merge process Vr1 Conflict Detection Conflict Detection Conflict-tolerant Operation-based State-based Resolution Vm Operation Detection Vo Merge Vr2 P. Brosch, G. Kappel, M. Seidl, K. Wieland, M. Wimmer, H. Kargl, and P. Langer. “Adaptable Model Versioning in 8 Action”. In Modellierung’2010, volume 161 of LNI, pages 221–236. GI, 2010.
    • Introduction Vo Vr2 Vr1  Focus of this dissertation Operation Detection Operation-based Conflict Detection Conflict-tolerant Merge State-based Conflict Detection Resolution Adaptable Model Versioning Vm9
    • Motivating ExamplesViolated Preconditions of Composite Operations Add state “Active”, Move states Introduce into “Active”, Composite fold transition State “hangup” dial Rename Rename “hangup” “hangup” 10
    • Motivating ExamplesViolated Preconditions of Composite Operations Introduce Composite State The preconditions of the refactoring “Introduce Composite State” are violated! dial Rename “hangup” 11
    • Contributions at a Glance Adaptable Model Versioning using Model Transformation By Demonstration Adaptation Artifacts Match Operation Signifier Validation Rules Specifications Specifications Rules C1 Adaptable Model Versioning Framework C2 C4 C2 Composite Operation Specification “Model Transformation By Demonstration” Vr1 Conflict Detection Conflict Detection Conflict-tolerant Operation-based C3 Operation Detection State-based Resolution Operation Vm Detection Vo Merge C4 Conflict and Warning Detection C3 C4 C4 Vr2 C1 Adaptable Model Versioning Framework Existing technology has been reused. 12
    • C2 Model Transformation By Demonstration  Composite operation specification 1 Initial 2 Working Create initial model Copy initial model Modeling model model Revised 3 model Perform updates 5 4 State-based Imply conditions Configuration & Generation comparison Conditions [implied] Diff model 6 Edit conditions Conditions 7 Generate Operation Operation [revised] Specification Specification Legend automatic manual P. Brosch, P. Langer, M. Seidl, K. Wieland, M. Wimmer, G. Kappel, W. Retschitzegger, and W. Schwinger. “An Example 13 Is Worth a Thousand Words: Composite Operation Modeling By-Example”. In Proceedings of the International Conference on Model Driven Engineering Languages and Systems (MoDELS’09), LNCS. Springer, 2009.
    • C2 Model Transformation By Demonstration  Composite operation specification 1 Initial 2 Working Create initial model Copy initial model Modeling model model Revised 3 model Perform updates 5 4 State-based Imply conditions Configuration & Generation comparison Conditions [implied] Diff model 6 Edit conditions Conditions 7 Generate Operation Operation [revised] Specification Specification Legend automatic manual 14
    • C2 Model Transformation By Demonstration  Composite operation specification 1 Initial 2 Working Create initial model Copy initial model Modeling model model Revised 3 model Perform updates 5 4 State-based Imply conditions Configuration & Generation comparison Conditions [implied] Diff model 6 Edit conditions Conditions 7 Generate Operation Operation [revised] Specification Specification Legend automatic manual 15
    • C2 Model Transformation By Demonstration  Composite operation specification 1 Initial 2 Working Create initial model Copy initial model Modeling model model Revised 3 model Perform updates 5 4 State-based Imply conditions Configuration & Generation comparison Conditions [implied] Diff model 6 Edit conditions Conditions 7 Generate Operation Operation [revised] Specification Specification Legend automatic manual 16
    • C2 Model Transformation By Demonstration  Composite operation specification 1 Initial 2 Working Create initial model Copy initial model Modeling model model Revised 3 model Perform updates 5 4 State-based Imply conditions Configuration & Generation comparison Conditions [implied] Diff model 6 Edit conditions Conditions 7 Generate Operation Operation [revised] Specification Specification Legend automatic manual 17
    • C2 Model Transformation By Demonstration  Composite operation specification 1 Initial 2 Working Create initial model Copy initial model Modeling model model Revised 3 model Perform updates 5 4 State-based Imply conditions Configuration & Generation comparison Conditions [implied] Diff model 6 Edit conditions Conditions 7 Generate Operation Operation [revised] Specification Specification Legend automatic manual 18
    • C2 Model Transformation By Demonstration  Composite operation specification 1 Initial 2 Working Create initial model Copy initial model Modeling model model Revised 3 model Perform updates 5 4 State-based Imply conditions Configuration & Generation comparison Conditions [implied] Diff model 6 Edit conditions Conditions 7 Generate Operation Operation [revised] Specification Specification Legend automatic manual 19
    • C2 Model Transformation By Demonstration  Besides being executable… Adaptation Artifacts Match Operation Signifier Validation Rules Specifications Specifications Rules C2 C4 Vr1 Conflict Detection Conflict Detection Conflict-tolerant Operation-based State-based Resolution Operation Vm Detection Vo Merge C3 C4 C4 Vr2 Adaptable Model Versioning Framework 20
    • C3 Operation Detection  Operation detection process 1. UUID-based matching 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection 21
    • C3 Operation Detection  Operation detection process 1. UUID-based matching 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 22
    • C3 Operation Detection  Operation detection process 1. UUID-based matching 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 23
    • C3 Operation Detection  Operation detection process 1. UUID-based matching 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 24
    • C3 Operation Detection  Operation detection process Diff 1. UUID-based matching Model 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection No difference Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 25
    • C3 Operation Detection  Operation detection process Diff 1. UUID-based matching Model ! 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection ! Transition target changed! Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 26
    • C3 Operation Detection  Operation detection process Diff 1. UUID-based matching Model !! 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection ! Transition source changed! Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 27
    • C3 Operation Detection  Operation detection process Diff 1. UUID-based matching Model !! + 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection + State Active has been added! Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 28
    • C3 Operation Detection  Operation detection process Diff 1. UUID-based matching Model !! + + + 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 29
    • C3 Operation Detection  Operation detection process Diff 1. UUID-based matching Model !! + - + + 2. Rule-based matching 3. Atomic operation detection 4. Composite operation detection - Transition hangup has been deleted! Vo Vr1 lift lift Idle Idle DialTone Active hangup hangup DialTone dial dial Dialing hangup Dialing 30
    • C3 Operation Detection  Composite operation detection process Diff Input Operation Operation Operation Diff Model Model Specification Specification Operation Specification Specifications !! + - ++ «foreach» «foreach» Diff Model Preprocessing Derive Precondition Derive Postcondition Binding Binding Input Operation Operation Operation Signature Specification Specification Signature Precondition Postcondition Binding Binding Preselection Evaluate Binding Evaluate Binding [no diff match] [diff matches] [invalid] [valid] [invalid] [valid] Valid Operation Operation Potential Operation Precondition Operation Operation Specification Specification Occurrence Operation Specification Specification Binding Occurrence 1 2 3 Refactoring Diff Refactoring Operation Occurrence Occurrence Occurrence Model P. Langer, K. Wieland, and P. Brosch. Specification, Execution, and Detection of !! + 31 + - + Refactorings for Software Models. In Proceedings of the WiP Session @ PPPJ’10, 2010.
    • C4 Conflict Detection Input Adaptation Artifacts Diff Match Operation Signifier Validation Model1 Rules Specifications Specifications Rules C4 !! + - + + Vr1 Conflict Detection Conflict Detection Diff Conflict-tolerant Operation-based State-based Resolution Operation Vm Detection Model2 Vo Merge ! + + C4 C4 Vr2 Adaptable Model Versioning Framework 32
    • C4 Conflict Detection  Operation-based conflict detection 1. Atomic operation conflict detection 2. Composite operation conflict detection 3. Signifier warning detection 33
    • C4 Conflict Detection  Operation-based conflict detection 1. Atomic operation conflict detection 2. Composite operation conflict detection 3. Signifier warning detection 34
    • C4 Conflict Detection  Atomic operation conflict detection  Nine conflict patterns for EMF-based models  Delete-use conflict du : DeleteUse delete use do : DeleteObject o : Object fo : FeatureOperation object value {self.oclIsTypeOf(InsertFeatureValue) or self.oclIsTypeOf(FeatureUpdate)}  Update-update conflict uu : UpdateUpdate update1 affected feature Object fo1 : FeatureOperation f : Feature o : Object {upperBound = 1 and fo1.value <> fo2.value} fo2 : FeatureOperation feature affected Object update2  … G. Taentzer, C. Ermel, P. Langer, and M. Wimmer. “A Fundamental Approach to Model Versioning Based on Graph Modifications”. Submitted to Software and System Modeling. Springer, 2011. 35
    • C4 Conflict Detection  Operation-based conflict detection 1. Atomic operation conflict detection 2. Composite operation conflict detection 3. Signifier warning detection 36
    • C4 Conflict Detection  Composite operation conflict detection For each composite operation application, check whether it is applicable at the opposite side Vo Diff Model1 !! + - + + Vr1 Vr2 !! + + + 37
    • C4 Conflict Detection  Composite operation conflict detection  Revisiting the motivating example Vr1 lift Idle Active Vo Introduce hangup Composite DialTone lift Idle State dial DialTone dial hangup Dialing dial Dialing hangup Vr2 lift Idle DialTone abort dial dial Dialing hangup 38
    • C4 Conflict Detection  Composite operation conflict detection Diff  Revisiting the motivating example Vr1 Model1 lift Idle !! + - + + Active Vo Introduce hangup Original Composite DialTone match Idle lift State dial SingleState_0 DialTone dial Transition_0 hangup Dialing SingleState_1 dial Transition_1 Precondition of Dialing SingleState_2 hangup composite Transition_2 Vr2 operation is lift violated! Idle SingleState_0 DialTone Transition_0 abort SingleState_1 dial Transition_1.name = Transition_2.name dial Transition_1 SingleState_2 Dialing hangup Transition_2 39
    • C4 Conflict Detection  Composite operation warning detection For each composite operation application, check whether its match size increased at the opposite side Vo Diff Model1 !! + - + + Vr1 Vr2 !! + + + 40
    • C4 Conflict Detection  Composite operation warning detection Add state “Active”, Move states into “Active”, Introduce fold transition Composite “hangup” State dial Add state Add state “Connecting” “Connecting” 41
    • C4 Conflict Detection Your composite  Composite operation warning detection operation should incorporate opposite operations! Introduce Introduce Composite Composite State State dial Add state Add state “Connecting” “Connecting” 42
    • C4 Conflict Detection  Composite operation warning detection Vr1 lift Idle Active Vo Introduce hangup Composite DialTone lift Idle State dial DialTone dial hangup Dialing dial Dialing hangup Vr2 lift Idle DialTone hangup dial dial Dialing hangup end_dialing 43 hangup Connecting
    • C4 Conflict Detection  Composite operation warning detection Diff Vr1 Model1 lift Idle !! + - + + Active Vo Introduce hangup Original Composite DialTone match Idle lift State dial SingleState_0 DialTone dial Transition_0 hangup Dialing SingleState_1 dial Transition_1 Composite Dialing SingleState_2 hangup operation Transition_2 Vr2 is applicable! lift Idle SingleState_0 DialTone Transition_0 hangup SingleState_1 dial dial Transition_1 SingleState_2 Dialing hangup Transition_2 end_dialing 44 hangup Connecting
    • C4 Conflict Detection  Composite operation warning detection Diff Vr1 Model1 lift Idle !! + - + + Active Vo Introduce hangup Original Composite DialTone match Idle lift State dial SingleState_0 DialTone dial Transition_0 hangup Dialing SingleState_1 dial Transition_1 Your composite SingleState_2 hangup Dialing operation should Vr2 include the state Transition_2 “Connecting”! lift Idle SingleState_0 DialTone Transition_0 hangup SingleState_1 dial dial Transition_1 SingleState_2 Dialing hangup Transition_2 end_dialing 45 hangup Connecting
    • C4 Conflict Detection  Operation-based conflict detection 1. Atomic operation conflict detection 2. Composite operation conflict detection 3. Signifier warning detection 46
    • C4 Conflict Detection  Signifier warning detection Change target Change target of r1 of r1 Change source Change source of r1 of r1 47
    • C4 Conflict Detection  Signifier warning detection The superior meaning of r1 has been con- currently changed! Change target Redefinition of r1 of r1 Change source Redefinition of r1 of r1 48
    • C4 Conflict Detection  Signifier warning detection  Signifier  Combination of properties of a model element type  Convey the “superior meaning” of a model element  e.g., the meaning of a reference is mainly conveyed by its name, source, and target  Signifier specifications (using ECL*) rule ReferenceSignifier match l : Left!EReference with r : Right!EReference { compare : l.name = r.name and l.source.isMatched(r.source) and l.target.isMatched(r.target) } * Epsilon Comparison Language (ECL), www.eclipse.org/gmt/epsilon 49
    • C4 Conflict Detection  Signifier warning detection rule ReferenceSignifier match l : Left!EReference with r : Right!EReference { compare : l.name = r.name and l.source.isMatched(r.source) and l.target.isMatched(r.target) } Vr1 Match Trigger Vo Vr2 Match Trigger 50
    • C4 Conflict Detection  Signifier warning detection rule ReferenceSignifier match l : Left!EReference with r : Right!EReference { compare : l.name = r.name and l.source.isMatched(r.source) and l.target.isMatched(r.target) } Vr1 Match Trigger Vo Concurrent Compare signifier of r1::Vo with r1::Vr1 signifier change signifier change of reference “r1”! Compare signifier of r1::Vo with r1::Vr2  signifier change You might want to duplicate “r1”? Vr2 Match Trigger 51
    • C4 Conflict Detection Adaptation Artifacts Match Operation Signifier Validation Rules Specifications Specifications Rules C4 Vr1 Conflict Detection Conflict Detection Conflict-tolerant Operation-based State-based Resolution Operation Vm Vo Detection Merge C4 Vr2 Adaptable Model Versioning Framework cf. PhD thesis by Konrad Wieland cf. PhD thesis by Petra Brosch 52
    • Evaluation Adaptable Model Versioning FrameworkC1 Model Transformation By DemonstrationC2 Operation DetectionC3 Conflict DetectionC4 53
    • Evaluation Model Transformation By Demonstration (MTBD)C2  Overall research question  Is it easier to use our MTBD tool than EMF Tiger*?  Study design  57 students (who have no experience in model transformation)  Specification of two composite operations with both tools  Questionnaire  Results  88 % preferred using our MTBD tool  74 % indicated that our MTBD tool is easy to use  Students needed nearly twice as much time using EMF Tiger  However, 53 % stated that configuring the conditions is hard * EMF Tiger: EMF-based graph transformation tool, user.cs.tu-berlin.de/~emftrans 54
    • Evaluation Operation DetectionC3  Overall research question  How accurate is our tool for detecting applications of composite operations?  Study design  Applying our tool to the evolution of GMF*  141 composite operation applications  342 atomic operation applications  Results  98 % precision  “How many detected composite operations have actually been correct?”  70 % recall  “How many applied composite operations have been correctly detected?”  Recall decreases with a growing number of concurrent composite operations  Composite operation sequences * Graphical Modeling Framework (GMF), www.eclipse.org/modeling/gmf 55
    • Evaluation Conflict DetectionC4  Overall research questions  How accurate is our tool for detecting atomic conflicts?  Can the same accuracy be achieved as operation tracking approaches?  Study design  Automatically executable benchmark  23 carefully selected versioning scenarios  12 of these scenarios include conflicting atomic operations  Benchmark applied to our tool, EMF Compare*, and EMFStore**  Results  Our tool: 100 % precision and recall  EMF Compare: 67 % precision and 17 % recall  EMFStore: 100 % precision and recall * EMF Compare, http://www.eclipse.org/emf/compare ** EMFStore, www.eclipse.org/emfstore/ 56
    • Limitations and Future Work Adaptable Model Versioning FrameworkC1  Are the provided adaptation points adequate and sufficient?  Empirical case study required! Model Transformation By DemonstrationC2  Configuring conditions still very challenging  Further automation of the specification process  Multiple demonstrations Operation DetectionC3  Overlapping sequences of operations Conflict DetectionC4  Deriving the conflicting opposite operation that caused a (composite operation’s pre-)condition to be invalid  Semantic inconsistencies 57
    • Thank you for your attention! Dissertation available  www.big.tuwien.ac.at/teaching/theses/70 Open source implementations  EMF Modeling Operations  www.modelversioning.org/emf-modeling-operations  AMOR Conflict Detection  code.google.com/a/eclipselabs.org/p/amor-conflict-detection 58