Your SlideShare is downloading. ×
  • Like
Library of Coupled Operators
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Library of Coupled Operators

  • 438 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
438
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
3
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. An Extensive Catalog of Operators for the Coupled Evolution of Metamodels and Models Markus Herrmannsdoerfer Sander Vermolen Guido Wachsmuth
  • 2. An Extensive Catalog of Operators for the Coupled Evolution of Metamodels and Models Markus Herrmannsdoerfer Sander Vermolen Guido Wachsmuth
  • 3. MetaModel Conformance Model 3
  • 4. MetaModel Evolve MetaModel' Conformance Model 4
  • 5. MetaModel Evolve MetaModel' Conformance Conformance Model Migrate Model' Coupled Evolution 5
  • 6. MetaModel Evolve MetaModel' Conformance Conformance Model Migrate Model' Coupled Operator Coupled Evolution 6
  • 7. Evolve Evolve Evolve Evolve Migrate Migrate Migrate Migrate Coupled Operator Coupled Operator Coupled Operator Coupled Operator Coupled Evolution 7
  • 8. Library of Coupled Operators add rem push att att type 8
  • 9. Library of Coupled Operators add rem push att att type 9
  • 10. Library of Coupled Operators add re m push att att type 10
  • 11. Library of Coupled Operators Wachsmuth, G.: Metamodel adaptation and model co-adaptation. In: ECOOP ’07. LNCS, vol. 4609, pp. 600–624. Springer (2007) -- modelware -- 11
  • 12. Library of Coupled Operators Cicchetti, A., Ruscio, D.D., Eramo, R., Pierantonio, A.: Automating co- evolution in model-driven engineering. In: EDOC ’08: 12th International Enterprise Distributed Object Computing Conference. IEEE (2008) -- modelware -- 12
  • 13. Library of Coupled Operators Banerjee, J., Kim, W., Kim, H.J., Korth, H.F.: Semantics and implementation of schema evolution in object-oriented databases. SIGMOD Rec. 16(3), 311–322 (1987) -- dataware -- 13
  • 14. Library of Coupled Operators Pons, A., Keller, R.: Schema evolution in object databases by catalogs. In: IDEAS ’97: International Database Engineering and Applications Symposium. pp. 368 – 376 (1997) -- dataware -- 14
  • 15. Library of Coupled Operators Becker, S., Goldschmidt, T., Gruschko, B., Koziolek, H.: A process model and classification scheme for semi-automatic meta-model evolution. In: Proc. 1st Workshop MDD, SOA und IT-Management (MSI’07). pp. 35–46. GiTO-Verlag (2007) Burger, E., Gruschko, B.: A Change Metamodel for the Evolution of MOF-Based Metamodels. In: Modellierung 2010. GI-LNI, vol. P-161 (2010) Breche, P.: Advanced primitives for changing schemas of object databases. In: CAiSE ’96. LNCS, vol. 1080, pp. 476–495. Springer (1996) Claypool, K.T., Rundensteiner, E.A., Heineman, G.T.: ROVER: A framework for the evolution of relationships. In: ER ’00. LNCS, vol. 1920, pp. 893–917. Springer (2000) Fowler, M.: Refactoring: improving the design of existing code. Addison-Wesley Longman Publishing Co., Inc. (1999) Dig, D., Johnson, R.: How do APIs evolve? a story of refactoring. J. Softw. Maint. Evol. 18 (2), 83–107 (2006) -- APIware -- 15
  • 16. Library of Coupled Operators Rebuild over and over Based on few cases Small & Incomplete 16
  • 17. Library of Coupled Operators Practical Completeness Usability by Size Classification Categorization 17
  • 18. Sources - Literature Modelware (3) Dataware (4) APIware (2) 18
  • 19. Sources - Case Studies FLUID TAF-Gen BMW Studies PCM GMF Unicase Quamoco Bugzilla Researchr Yellowgrass 19
  • 20. CLASSES OF COUPLED OPERATORS
  • 21. Language Preservation Meta Model Model Model Model Model Model 21
  • 22. Language Preservation Meta Model Meta Model' Model' Model Model' Model Model' Model Model' Model Model' Model 22
  • 23. Language Preservation Meta Model Meta Model' Refactoring Model' Model Model' Model Model' Model Model' Model Bijective 23
  • 24. Language Preservation Meta Model Meta Model' Constructor Model' Model Model' Model Model' Model Model' Model Injective 24
  • 25. Language Preservation Meta Model Meta Model' Destructor Model' Model Model' Model Model' Model Model' Model Surjective 25
  • 26. Model Preservation • Model Preserving • Safely Model Migrating • Unsafely Model Migrating 26
  • 27. Bidirectionality Safe Inverse Unsafe Inverse 27
  • 28. LIBRARY OF COUPLED OPERATORS
  • 29. http://yellowgrass.org Tag tags Taggable 0 ... * name : String Issue number : Int title : String submitted : Date project Project 1 ... 1 name : String (id) reporter url : URL 0 ... 1 member User 1 ... * name : String email : Email (id) password : Secret 29
  • 30. Tag tags Taggable 0 ... * name : String Issue number : Int title : String submitted : Date project Project 1 ... 1 Comment name : String (id) reporter text : String url : URL 0 ... 1 submitted : Date member author User 1 ... * 1 ... 1 name : String email : Email (id) password : Secret 30
  • 31. Tag tags Taggable 0 ... * name : String Issue number : Int title : String submitted : Date project comments Project 1 ... 1 0 ... * Comment name : String (id) reporter text : String url : URL 0 ... 1 submitted : Date member author User 1 ... * 1 ... 1 name : String email : Email (id) password : Secret 31
  • 32. Structural Primitives 8 Class. MM OODB OOC [12] COPE Acoda # Operator Name L M I [24] [2] [6] [1] [3] [19] [7] [10] [8] F T [13] [14] U Q B R Y 1 Create Package r p 2s x x x 2 Delete Package r p 1s x x 3 Create Class c p 4s x x x x x x x x x x x x x 4 Delete Class d u 3u x x x x x x x x x x x x 5 Create Attribute c s 7s x x x x x x x x x x x x x 6 Create Reference c s 7s x x x x x x x x x x x x x 7 Delete Feature d u 5/6u x x x x x x x x x x x x 8 Create Oppos. Ref. d u 9u x x x x x x x x 9 Delete Oppos. Ref. c p 8s x x x x 10 Create Data Type r p 11s x 11 Delete Data Type r p 10s x x 12 Create Enum r p 13s x x x x x x 13 Delete Enum r p 11s x x 14 Create Literal c p 15s x x 15 Merge Literal d u 14u x x Creation of non-mandatory metamodel elements (packages, classes, optional fea- tures, enumerations, literals and data types) is model-preserving. Creation of mandatory features is safely model-migrating. It requires initialization of slots 32
  • 33. Structural Primitives Creation - non-mandatory model preserving Creation - mandatory Restricted Deletion safely model migrating Deletion unsafely model migrating 33
  • 34. Tag tags Taggable 0 ... * name : String Issue number : Int title : String submitted : Date project Project 1 ... 1 name : String (id) reporter url : URL 0 ... 1 member User 1 ... * name : String (id) email : Email (id) password : Secret @BobJohnson 34
  • 35. Tag tags Taggable 0 ... * name : String Issue number : Int title : String submitted : Date project Project 1 ... 1 name : String (id) reporter url : URL 0 ... 1 member User 1 ... * name : String (id) email : Email (id) password : Secret Release 0.23 35
  • 36. deletes a literal and replaces its occurrences in a model by another literal. Merg- ing a literal provides a safe inverse to Create Literal. 5.2 Non-Structural Primitives Non-structural Primitives Non-structural primitive operators modify a single, existing metamodel element, i.e. change properties of a metamodel element. All non-structural operators take the affected metamodel element, their subject, as parameter. Class. MM OODB OOC [12] COPE Acoda # Operator Name L M I [24] [2] [6] [1] [3] [19] [7] [10] [8] F T [13] [14] U Q B R Y 1 Rename r s 1s x x x x x x x x x x x x x x x 2 Change Package r s 2s x x x x x 3 Make Class Abstract d u 4u x x x x 4 Drop Class Abstract c p 3s x x x 5 Add Super Type c p 6s x x x x x x x x x 6 Remove Super Type d u 5u x x x x x x x 7 Make Attr. Identifier d u 8u x x x 8 Drop Attr. Identifier c p 7s x x x 9 Make Ref. Comp. d u 10u x x x x x x 10 Switch Ref. Comp. c s 9s x x x x x x 11 Make Ref. Opposite d u 12u x x x x x 12 Drop Ref. Opposite c p 11s x x x x Change Package can be applied to both package and type. Additionally, the value-changing operators Rename, Change Package and Change Attribute Type are parameterized by a new value. Make Class Abstract requires a subclass pa- rameter indicating to which class objects need to be migrated. Switch Reference 36
  • 37. Tag tags Taggable 0 ... * name : String Issue number : Int title : String submitted : Date project Project 1 ... 1 name : String (id) reporter comments url : URL 0 ... 1 0 ... * member User Comment 1 ... * name : String email : Email (id) author text : String password : Secret 1 ... 1 submitted : Date 37
  • 38. Tag tags Taggable 0 ... * name : String Issue Event number : Int title : String submitted : Date submitted : Date project Project 1 ... 1 name : String (id) reporter comments url : URL 0 ... 1 0 ... * member User Comment 1 ... * name : String email : Email (id) author text : String password : Secret 1 ... 1 submitted : Date 38
  • 39. Inheritance 12 Class. MM OODB OOC [12] COPE Acoda # Operator Name L M I [24] [2] [6] [1] [3] [19] [7] [10] [8] F T [13] [14] U Q B R Y 1 Pull up Feature c p 2s x x x x x x x x 2 Push down Feature d u 1u x x x x x x 3 Extract Super Class c p 4s x x x x x x x x x x x x 4 Inline Super Class d u 3u x x x x x x x x x 5 Fold Super Class c s 6s x x 6 Unfold Super Class d u 5u x x 7 Extract Sub Class c s 8s x x x x x 8 Inline Sub Class d u 7u x x x x Pull up Feature is a constructor which moves a feature that occurs in all sub- classes of a class to the class itself. For migration, slots for the pulled up feature are added to objects of the class and filled with default values. The corresponding destructor Push down Feature moves a feature from a class to all its subclasses. While objects of the subclasses stay unaltered, slots for the original feature must 39
  • 40. Tag tags Taggable 0 ... * name : String Issue Event number : Int title : String submitted : Date submitted : Date project Project 1 ... 1 name : String (id) reporter url : URL 0 ... 1 comments 0 ... * member User Comment 1 ... * name : String email : Email (id) author text : String password : Secret 1 ... 1 40
  • 41. Tag tags Taggable 0 ... * name : String Issue Event number : Int title : String comments submitted : Date submitted : Date 0 ... * project Project 1 ... 1 name : String (id) reporter url : URL 0 ... 1 member User Comment 1 ... * name : String email : Email (id) author text : String password : Secret 1 ... 1 41
  • 42. 5.3 Specialization / Generalization Operators Specialization / Generalization Specializing a metamodel element reduces the set of possible models, whereas generalizing expands the set of possible models. Generalization and specialization can be applied to features and super type declarations. All specialization and generalization operators take two parameters: a subject and a generalization or specialization target. The first is a metamodel element and the latter is a class or a multiplicity (lower and upper bound). Class. MM OODB OOC [12] COPE Acoda # Operator Name L M I [24] [2] [6] [1] [3] [19] [7] [10] [8] F T [13] [14] U Q B R Y 1 Generalize Attribute c p 2s x x x x x x x x x x x 2 Specialize Attribute d u 1u x x x x x x x 3 Generalize Reference c p 4s x x x x x x x x x 4 Specialize Reference d u 3u x x x x x x x x 5 Specialize Comp. Ref. d u 3u x x x 6 General. Super Type d u 7u x x x 7 Specialize Super Type c s 6s x x x x x x x Generalization of features does not only generalize the feature itself, but also generalizes the metamodel as a whole. Feature generalizations are thus model- preserving constructors. Generalizing a super type declaration may require re- moval of feature slots and is only unsafely model-migrating. Feature specializa- tion is a safe inverse of feature generalization. Due to the unsafe nature of the 42
  • 43. Delegation 13 5.5 Delegation Operators Delegation operators move metamodel elements along compositions or ordinary references. Most of the time, they come as pairs of corresponding refactorings being safely inverse to each other. Class. MM OODB OOC [12] COPE Acoda # Operator Name L M I [24] [2] [6] [1] [3] [19] [7] [10] [8] F T [13] [14] U Q B R Y 1 Extract Class r s 2s x x x x x x x x x x x x 2 Inline Class r s 1s x x x x x x x x 3 Fold Class r s 4s x x x 4 Unfold Class r s 3s 5 Move Feat. over Ref. c s 6s x x x x x x x x x 6 Collect Feat. over Ref. d u 5u x x Extract Class moves features to a new delegate class and adds a composite reference to the new class together with an opposite reference. During migration, an object of the delegate class is created for each object of the original class, slots for the moved features are moved to the new delegate object, and a link 43 to the delegate object is created. The corresponding Inline Class removes a
  • 44. Feature along Reference is an unsafe inverse. 5.6 Replacement Operators Replacement Replacement operators replace one metamodeling construct by another, equiva- lent construct. Thus replacement operators typically are refactorings and safely model-migrating. With the exception of the last two operators, an operator to replace the first construct by a second always comes with a safe inverse to replace the second by the first, and vice versa. Class. MM OODB OOC [12] COPE Acoda # Operator Name L M I [24] [2] [6] [1] [3] [19] [7] [10] [8] F T [13] [14] U Q B R Y 1 Subclasses to Enum. r s 2s x 2 Enum. to Subclasses r s 1s x x 3 Reference to Class r s 4s x x x 4 Class to Reference r s 3s x x 5 Inheritance to Deleg. r s 6s x x x x x 6 Deleg. to Inheritance r s 5s x x 7 Reference to Identifier c s 8s x 8 Identifier to Reference d u 7u x x x x To be more flexible, empty subclasses of a class can be replaced by an attribute which has an enumeration as type, and vice versa. Subclasses to Enumeration deletes all subclasses of the class and creates the attribute in the class as well 44 as the enumeration with a literal for each subclass. In a model, objects of a
  • 45. thus being an exception in the group of replacement operators. Merge / Split 5.7 Merge / Split Operators Merge operators merge several metamodel elements of the same type into a sin- gle element, whereas split operators split a metamodel element into several ele- ments of the same type. Consequently, merge operators typically are destructors and split operators constructors. In general, each merge operator has an inverse split operator. Split operators are more difficult to define, as they may require metamodel-specific information about how to split values. There are different merge and split operators for the different metamodeling constructs. Class. MM OODB OOC [12] COPE Acoda # Operator Name L M I [24] [2] [6] [1] [3] [19] [7] [10] [8] F T [13] [14] U Q B R Y 1 Merge Features d u x x x 2 Split Ref. by Type r s 1s x 3 Merge Classes d u 4u x x x x x x 4 Split Class c p 3s 5 Merge Enumerations d u x Merge Features merges a number of features defined in the same class into a single feature. In the metamodel, the source features are deleted and the target feature is required to be general enough—through its type and multiplicity— so that the values of the other features can be fully moved to it in a model. Depending on the type of feature that is merged, a repeated application of45
  • 46. A META PERSPECTIVE
  • 47. Completeness MetaModel Evolve MetaModel' Conformance Conformance Model Migrate Model' 47
  • 48. Completeness MetaModel Evolve MetaModel' Conformance Conformance Model Migrate Model' 48
  • 49. Completeness MetaModel Evolve MetaModel' Conformance Conformance Model Migrate Model' Practical Completeness Operator Override 49
  • 50. MetaModeling Formalism Package name : String types subPackages 0 ... * 0 ... * Type EMOF - like type superTypes 0 ... * name : String Instantiatable Class PrimitiveType isAbstract : Bool Feature features 0 ... * DataType Enumeration API for access name : String upperBound : Int literals 0 ... * CMOF lowerBound : Int Literal name : String Attribute Reference isIdentifier : Bool isComposite : Bool 50
  • 51. Tool Support Categories Classification Bidirectionality 51
  • 52. Other Applications Qualitative comparison Outside domain 52
  • 53. To Conclude Catalog 61 operators Literature & Case Studies Model-instantiatable EMOF Coupled Evolution tools 53
  • 54. QUESTIONS
  • 55. 55
  • 56. Terminology Relations Refactoring / Constructor Model Preserving / Safely Model-Migrating Destructor Un-Safely Model-Migrating Non-Breaking Model Preserving Breaking Resolvable Safely / Unsafely Model Migrating Breaking Non-Resolvable - 56
  • 57. Difference vs. Operators Operator Trace vs. Difference Model 57