State of the Art and Future Directions in Model Management Research Japan-Austria Joint Workshop on ICT, October 18-19, 2010 Gerti Kappel 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 Model Versioning Model Co-Evolution Rèsumè Content � Introduction Model-Driven Engineering and Model Management � � Model Management Use Case I: Model Versioning � Model Management Use Case II: Model Co-Evolution � Résumé 2
Introductio Model Versioning Model Co-Evolution Rèsumè n Content � Introduction Model-Driven Engineering and Model Management � � Model Management Use Case I: Model Versioning � Model Management Use Case II: Model Co-Evolution � Résumé 3
Model-Driven Engineering (MDE) Models, Models, Models, ... "Everything is a model" � Analysis Model � Transformation Model � Metamodel � Design Model � Weaving Model � Metametamodel � Diff Model � Test Model � Change Model � … Jean Bézivin. On the Unification Power of Models . Software and System Modeling 4(2), 4 pages 171-188, 2005.
Model-Driven Engineering (MDE) Models, Models, Models, ... System Model represents Mapping Feature A model is based on an original (=system) Reduction Feature A model only reflects a (relevant) selection of an original‘s properties Pragmatic Feature A model needs to be usable in place of an original with respect to some purpose Herbert Stachowiak. Allgemeine Modelltheorie . Springer, Wien, 1973. 5
Model-Driven Engineering (MDE) Building Block #1: Metamodeling Meta- Meta- defines Metamodel Language « instanceOf » g n i s u d e s s e r p x e defines Metamodel Language « instanceOf » g n i s u d e s s e r p x e represents Model System Thomas Kühne. Matters of (Meta-)Modeling . Software and System Modeling 5(4), 6 pages 369-385, 2006.
Model-Driven Engineering (MDE) Building Block #2: Model Transformations Transformatio Metamodel Metamodel n Specification « instanceOf » « instanceOf » executes Transformatio writes reads Model n Model Engine Krzysztof Czarnecki, Simon Helsen. Feature-based survey of model transformation approaches . 7 IBM Systems Journal 45(3), pages 621-646, 2006.
Model-Driven Engineering (MDE) Building Block #3: Model Management "Everything is a model" "No model is an island" � abstractionOf � sameAs � instanceOf � equivalentWith � generatedFrom � overlappingWith � refinementOf � … � crossCuttingWith 8
9 Model of "No model is an island" dependencies 0..* Model-Driven Engineering (MDE) Model Building Block #3: Model Management
Model Management Old wine in new bottles? � Origin: Data Engineering � Research issue for decades since integration of heterogeneous databases (1970) � Current Status: Model Management 2.0 P. Bernstein, S. Melnik. Model Management 2.0: Manipulating Richer Mappings . � Well-documented kinds of heterogeneities ACM SIGMOD 2007 Keynote, China, June 2007. � Global Model Management Operators � Diff, Merge, Match, Compose, ModelGen, TransGen, Inverse, … � Much progress, but still many challenges � Ongoing Work: Model Management 3.0 = Model Management 2.0 + Model Engineering � Raising the level of abstraction � Too many data models, formats, technologies, tools, … � Built on top of powerful model engineering technologies 10
Model Management Old wine in new bottles? Data Engineering Model Engineering M3 MOF No explicit formalism Relational XMLSchema M2 SysML UML DataModel DataModel anXMLSchema aSysML aRelational aUML M1 Model Model Model Model M0 o1 o1 o1 o1 Legend 11 Correspondences Transformation InstanceOf
Model Management in a Nutshell � Model Management 2.0 � Predefined set of generic operators � Act upon models and produce models � Limited set of model types � Models and Maps � Model management scripts � Composition of given model management operators 1. Extensions for Model Management 3.0 � Scripts are object-oriented programs � Models are typed based on their metamodels � Operators are tied to metamodels � Operators expect typed models as input and produce typed models as output Thomas Reiter, Kerstin Altmanninger, Werner Retschitzegger. Think Global, Act Local: Implementing Model Management with Domain-Specific Integration Languages . 12 Revised Selected Papers of Workshops and Symposia at MoDELS 2006, Springer LNCS 4363, pages 263-276, 2007.
Model Management Motivating example: Exogenous merge Ecore „Exogenous Merge“ Script A.mark(); Ecore A = … 1 1 B.mark(); Ecore B = … 1 A.mark(); merge merge merge Model a = … 2 2 2 B.mark(); Model b = … 1 1 1 1 A B 2 2 2 Ecore AB = A.merge(B); Ecore AB = A.merge(B); Ecore AB = A.merge(B); FullEquiv FullEquiv FullEquiv FullEquiv FullEquiv FullEquiv 3 3 3 FullEquiv map a = AB.FE_match(A ); FullEquiv w a FullEquiv w a = AB.Fe_match(A); = AB.Fe_match(A ); 3 3 3 3 3 3 3 AB* AB* 3 3 AB* AB* AB FullEquiv FullEquiv w b FullEquiv w b = AB.Fe_match(B); map b = AB.FE_match(B ); = AB.Fe_match(B ); 4 4 4 4 4 4 4 4 4 4 4 map 4 Transformation Transformation Transformation t a = w a .generate(); t a = t a = w a a .genTrafo(); .generate(); 6 6 6 Transformation Transformation Transformation t b = w b .generate(); t b = t b = w b .generate(); b .genTrafo (); 6 map 5 5 5 5 5 5 merge merge merge 5 5 5 5 5 AB a ' AB a? = a.t a (); AB a? = a.t a (); = a.t a (); 5 1 1 a a a a? a? a? b? b? b? b b b 1 a a a a' a? a? b? b? b' b b b 1 AB b ' AB b? = b.t b (); AB b? = b.t b (); = b.t b (); 6 6 6 AB ab ' = a ' .merge(b ' ); AB ab?= a ? .merge(b?); 6 AB ab? = a ? .merge(b?); ab? ab? ab? ab' ab? ab? 13
Introduction Model Versioning Model Co-Evolution Rèsumè Content � Introduction Modeling, Model-Driven Engineering, and Model Management � � Model Management Use Case I: Model Versioning � Model Management Use Case II: Model Co-Evolution � Résumé 14
Model Management Use Case I: Model Versioning Motivation � Some definitions of Software Engineering (SE) � SE is defined as the multi-person construction of multi-version software – David Lorge Parnas � SE deals with the building of software systems that are so large or so complex that they are built by teams of engineers – Carlo Ghezzi, Mehdi Jazayeri, and Dino Mandrioli � Implication for Model Engineering: Models must be built in teams! Precise Conflict Detection Supportive Conflict Resolution 15
16 The Model Versioning Process Revised A A A A A C A A A C A A A A C
17 Person getName() Example 1: Contradicting Change Person Person
18 Employee Person � Employee Person Person Example 2: Equivalent Change Employee Person
Example 2: Equivalent Change Harder than we thought!? UML Metamodel V1 UML Metamodel V2 Metamodel Class name:String 0..* Class superClasses superClass 1..* 1..1 subClasses name:String o1, o2 | o1.id = o2.id Generalization o1 ∈ Class, o2 ∈ Class | o1.name = o2.name c1:Class c1:Class c1:Class c1:Class name=“Person“ name=“Person“ Model (AS) name=“Person“ name=“Person“ g1:Generalization g2:Generalization c2:Class c2:Class c3:Class c3:Class name=“Employee“ name=“Employee“ name=“Employee“ name=“Employee“ Sally Harry Sally Harry Person Person Person Person Model (CS) Person Person Employee Employee � Employee Employee � Employee Employee 19
20 Engine 1 has * Engine Engine Car Example 3: Syntactic Inconsistency 1 has has * Engine Car Car has 1 Car
The AMOR Approach Overview www.modelversioning.org Adaptable Versioning Framework Precise Conflict Detection Supportive Conflict Resolution Gerti Kappel et al. Adaptable Model Versioning in Action . In Proc. of Modellierung 2010, GI, LNI 161, pages 221-236, 2010. 21
Versioning Example State-based and generic merging V0 hang_up lift DialTon Idle e dial hang_up Dialing dial V0’ V0’’ cancel Active lift lift Idle DialTon DialTon Idle e e hang_up dial dial cancel Dialing cancel Dialing dial dial Connect valid V1 22
Versioning Example State-based and generic merging V0 hang_up lift DialTon Idle e dial hang_up Dialing dial V0’ V0’’ cancel Active lift lift Idle DialTon DialTon Idle e Update / Update e hang_up dial dial cancel Dialing hang_up cancel Dialing dial dial Connect valid Delete / Update V1 Active lift Idle DialTon e cancel dial � cancel Dialing dial Connect 23 valid
Versioning Example State-based and generic merging V0 hang_up lift DialTon Refactoring: Atomic changes: Idle e - Introduce Composite State - Addition “Connect” dial - Rename of “hang_up”s hang_up Dialing dial V0’ V0’’ cancel Active lift lift Idle DialTon DialTon Idle e Update / Update e hang_up dial dial cancel Dialing hang_up cancel Dialing dial dial Connect valid Delete / Update V1 Active lift Idle DialTon e cancel dial � cancel Dialing dial Connect 24 valid
Recommend
More recommend