310 likes | 425 Views
Tackling the Model Heterogeneity Problem. August, 2008. Gerti Kappel and Manuel Wimmer Vienna University of Technology {lastname}@big.tuwien.ac.at. Vienna University of Technology. www.big.tuwien.at. Business Informatics Group (BIG). Information Systems Group (IFS)
E N D
Tackling the Model Heterogeneity Problem August, 2008 Gerti Kappel and Manuel Wimmer Vienna University of Technology {lastname}@big.tuwien.ac.at Vienna University of Technology www.big.tuwien.at
Business Informatics Group (BIG) Information Systems Group (IFS) Department of Telecooperation (TK) ModelCVS Team Dr. Martina Seidl Dr. Manuel Wimmer DI Angelika Kusel Dr. Thomas Reiter Prof. Dr. Gerti Kappel Dr. Michael Strommer Mag. Horst Kargl Prof. Dr. Werner Retschitzegger Dr. Wieland Schwinger
Content • Problem • »CAR« Mapping Operators by Example • Deriving Executable Transformation Nets – »TROPIC« • Beyond »CAR« Mapping Operators • Outlook
ProblemModel Transformation Languages • Mappings are directly between source and target metamodel • Recurring structural heterogeneities are not dealt with appropriately • Impedance mismatch between existing mapping languages and execution engines • Resulting transformation code is a too big break in abstraction
M3 MOF/Ecore Meta-metamodel Level «instanceOf» «instanceOf» «instanceOf» M2 Mappings Source Metamodel Target Metamodel Metamodel Level «instanceOf» «instanceOf» ? M1 Transformations Source Model Target Model Model Level ProblemGoal and Approach • Goal • Provide a framework for translation between languages going beyond existing model transformation languages • Approach • Provide composable and reusable stateful mapping operators to resolve recurring complex heterogeneities (Class2Reference,…) (M2) • Derive executable transformations of models that reflects the mapping operators and allows for appropriate debugging (M1)
Content • Problem • »CAR« Mapping Operators by Example • Deriving Executable Transformation Nets – »TROPIC« • Beyond »CAR« Mapping Operators • Outlook
M3 MOF/Ecore Meta-metamodel Level «instanceOf» «instanceOf» «instanceOf» M2 Mappings Source Metamodel Target Metamodel Metamodel Level «instanceOf» «instanceOf» ? M1 Transformations Source Model Target Model Model Level »CAR« Mapping Operators by ExampleMetamodel Mappings
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt »CAR« Mapping Operators by ExampleMetamodel Mappings M3 MOF/Ecore Meta-metamodel Level «instanceOf» «instanceOf» «instanceOf» M2 Mappings SourceMetamodel Target Metamodel Metamodel Level «instanceOf» «instanceOf» ? M1 Transformations Source Model Target Model Model Level
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt »CAR« Mapping Operators by ExampleClass/Attribute/Reference (CAR) Mappings M3 MOF/Ecore Meta-metamodel Level «instanceOf» «instanceOf» «instanceOf» M2 Mappings SourceMetamodel Target Metamodel Metamodel Level «instanceOf» «instanceOf» ? M1 Transformations Source Model Target Model Model Level M. Wimmer, H. Kargl, M. Seidl, M. Strommer, T. Reiter: Integrating Ontologies with CAR-Mappings. 1st Int. Workshop on Semantic Technology Adoption in Business (STAB'07), Austria, May 2007
… Linker … Copier … Peeler superClasses * Class 1 isAbstract : Boolean type * * Reference Attribute CAR Mappings MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt »CAR« Mapping Operators by ExampleClass/Attribute/Reference (CAR) Mappings M3 MOF/Ecore Meta-metamodel Level For the core of OO metamodeling languages Explore structural heterogeneities in metamodeling Develop mapping operators for these heterogeneities Mappings «instanceOf» «instanceOf» «instanceOf» Core OO Modeling Concepts Possible Combinations & Interpretations M2 Mappings SourceMetamodel Target Metamodel Metamodel Level «instanceOf» «instanceOf» ? M1 Transformations Source Model Target Model Model Level M. Wimmer, H. Kargl, M. Seidl, M. Strommer, T. Reiter: Integrating Ontologies with CAR-Mappings. 1st Int. Workshop on Semantic Technology Adoption in Business (STAB'07), Austria, May 2007
MMb MMa Package name : String Package name : String * MappingOperator subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt »CAR« Mapping Operators by ExampleClass/Attribute/Reference (CAR) Mappings • Reusable mapping operators • Bridging common heterogeneities between instances of Ecore concepts (M3): EClass, EAttribute, EReference (CAR) • UML component diagrams as basic formalism (ports, black-box view, white-box view) M3 MOF/Ecore Meta-metamodel Level CAR Mappings Required Context «instanceOf» «instanceOf» «instanceOf» M2 Mappings SourceMetamodel Target Metamodel Metamodel Level TargetConcept SourceConcept Provided History «instanceOf» «instanceOf» ? M1 Transformations Source Model Target Model Model Level
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt »CAR« Mapping Operators by ExampleClass/Attribute/Reference (CAR) Mappings • Reusable mapping operators • Bridging common heterogeneities between instances of Ecore concepts (M3): EClass, EAttribute, EReference (CAR) • UML component diagrams as basic formalism (ports, black-box view, white-box view) M3 MOF/Ecore Meta-metamodel Level C2C CAR Mappings «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping WebML OO-H Model Metamodel Level «instanceOf» «instanceOf» M1 Transformations Source Model OO-H Model Model Level
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt »CAR« Mapping Operators by ExampleClass/Attribute/Reference (CAR) Mappings • Reusable mapping operators • Bridging common heterogeneities between instances of Ecore concepts (M3): EClass, EAttribute, EReference (CAR) • UML component diagrams as basic formalism (ports, black-box view, white-box view) M3 MOF/Ecore Meta-metamodel Level C2C CAR Mappings A2A C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping WebML OO-H Model Metamodel Level «instanceOf» «instanceOf» M1 Transformations Source Model OO-H Model Model Level
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt »CAR« Mapping Operators by ExampleClass/Attribute/Reference (CAR) Mappings • Reusable mapping operators • Bridging common heterogeneities between instances of Ecore concepts (M3): EClass, EAttribute, EReference (CAR) • UML component diagrams as basic formalism (ports, black-box view, white-box view) M3 MOF/Ecore Meta-metamodel Level C2C CAR Mappings A2A C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping WebML OO-H Model Metamodel Level R2R «instanceOf» «instanceOf» M1 Transformations Source Model OO-H Model Model Level
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt »CAR« Mapping Operators by ExampleClass/Attribute/Reference (CAR) Mappings • Reusable mapping operators • Bridging common heterogeneities between instances of Ecore concepts (M3): EClass, EAttribute, EReference (CAR) • UML component diagrams as basic formalism (ports, black-box view, white-box view) M3 MOF/Ecore Meta-metamodel Level C2C CAR Mappings A2A R2C C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping WebML OO-H Model Metamodel Level R2R «instanceOf» «instanceOf» M1 Transformations Source Model OO-H Model Model Level
»CAR« Mapping Operators by ExampleClass/Attribute/Reference (CAR) Mappings C2C CAR Mappings MMa MMb Package A2R Package A2A name : String name : String C2C A2A A2A R2C superClasses * subClasses Class Class C2C C2C C2C * name : String package : String * Generalization name : String * * superClasses 1 R2R {inv: true} Attribute * name : String 1..1 Attribute Multiplicity : kind isID=false name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt A2C IdAtt isID=true
Content • Problem • »CAR« Mapping Operators by Example • »TROPIC« Deriving Executable Transformation Nets • Beyond »CAR« Mapping Operators • Outlook
Source Places Transformation Logic Target Places Deriving Executable Transformation NetsTROPIC – Transformations on Petri Nets in Color "Transformations are processes" • Coloured Petri-nets as execution formalism (TROPIC) • Benefits • Uses a single, widely understood graphical formalism for representing all artifacts of a model transformation – metamodels, models, transformation logic • Provides a dedicated runtime model for model transformations which can be executed on a generic engine • Allows to give semantics to higher-level mapping operators, fostering modularity and composability • Combines declarative style (abstracts from control flow) andimperative style (statefulness) • Favors understanding of "what‘s going on" during a transformation and debugging • Coloured Petri-nets as execution formalism (TROPIC) • Representation of • metamodel (M2) as places on basis of M3-concepts EClass, EReference, EAttribute • model (M1) as tokens on basis of M2-concepts • mapping operator's semantics as transitions M3 MOF/Ecore Meta-metamodel Level «instanceOf» «instanceOf» «instanceOf» M2 Mappings Source Metamodel Target Metamodel Metamodel Level «instanceOf» «instanceOf» ? M1 Transformations Source Model Target Model Model Level TROPIC Transformation Net
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt User «superClasses» Admin Deriving Executable Transformation NetsExample Continued M3 MOF/Ecore Meta-metamodel Level C2C CAR Mappings A2A R2C C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping WebML OO-H Model Metamodel Level R2R «instanceOf» «instanceOf» Model M1 Transformations Source Model Target Model Model Level
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt Model User «superClasses» Admin Deriving Executable Transformation NetsExample Continued EClass EClass • Coloured Petri-nets as execution formalism (TROPIC) • Representation of • metamodel (M2) as places on basis of M3-concepts EClass, EReference, EAttribute • model (M1) as tokens on basis of M2-concepts • mapping operator's semantics as transitions EReference M3 EReference MOF/Ecore Meta-metamodel Level EAttribute C2C CAR Mappings A2A R2C TROPIC superClasses Class C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping Class WebML OO-H Model subClasses Metamodel Level R2R «instanceOf» «instanceOf» Attribute Generalization superClasses M1 Transformations WebML Model Target Model Model Level Coloured Petri-net
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt User «superClasses» Admin Deriving Executable Transformation NetsExample Continued • Coloured Petri-nets as execution formalism (TROPIC) • Representation of • metamodel (M2) as places on basis of M3-concepts EClass, EReference, EAttribute • model (M1) as tokens on basis of M2-concepts • mapping operator's semantics as transitions M3 MOF/Ecore Meta-metamodel Level C2C CAR Mappings A2A R2C TROPIC superClasses Class C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping Class WebML OO-H Model subClasses Metamodel Level R2R Class «instanceOf» «instanceOf» Attribute Generalization superClasses superClasses Model M1 TROPIC Transformations WebML Model OO-H Model Model Level Coloured Petri-net
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt User «superClasses» Admin Deriving Executable Transformation NetsExample Continued M3 MOF/Ecore Meta-metamodel Level C2C C2C CAR Mappings A2A R2C R2C TROPIC superClasses Class C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping Class WebML OO-H Model subClasses Metamodel Level R2R «instanceOf» «instanceOf» Attribute Generalization superClasses Model M1 TROPIC Transformations WebML Model Target Model Model Level Coloured Petri-net
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt User «superClasses» R2C Admin Deriving Executable Transformation NetsExample Continued M3 MOF/Ecore Meta-metamodel Level C2C C2C CAR Mappings A2A R2C TROPIC superClasses Class C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping Class WebML OO-H Model subClasses Metamodel Level R2R «instanceOf» «instanceOf» Attribute Generalization superClasses Model M1 TROPIC Transformations WebML Model Target Model Model Level Coloured Petri-net
MMb MMa Package name : String Package name : String * subClasses Class superClasses * Generalization * name : String * * Class superClasses 1 name : String package : String Attribute * name : String 1..1 Attribute Multiplicity : kind name : String isID : Boolean minCard : Integer maxCard : Integer minCard : Integer maxCard : Integer DesAtt IdAtt User «superClasses» R2C Admin Deriving Executable Transformation NetsExample Continued M3 MOF/Ecore Meta-metamodel Level C2C C2C CAR Mappings A2A R2C TROPIC superClasses Class C2C «instanceOf» «instanceOf» «instanceOf» M2 CAR Mapping Class WebML OO-H Model subClasses Metamodel Level R2R «instanceOf» «instanceOf» Attribute Generalization superClasses Model M1 TROPIC Transformations WebML Model Target Model Model Level Coloured Petri-net
Deriving Executable Transformation NetsTROPIC Language Elements – Transitions LHS RHS LHS RHS • Transition • manipulates tokens by removing and adding to places • Input condition needs to be satisfied • Output tokens are produced • Placement • Proxy for a place, used to define input and output conditions • Keeps switching logic localized in transition • Placements can be consuming by removing input tokens • Query Tokens • Stands for tokens to be bound to an input token • Query tokens have query colours to be bound as well • Query tokens check for the existence of a token • Negated Placements • Require the non-existence of a token to be satisfied • Arcs • Connect transitions to places and vice versa • Show the direction of information flow • Formalization • in terms of logical pre- and post-conditions declares that firing should only occur if there are no two equal two-colored tokens in B and C
Content • Problem • »CAR« Mapping Operators by Example • »TROPIC« Deriving Executable Transformation Nets • Beyond »CAR« Mappings • Outlook
Beyond »CAR« Mappings»Array2LinkedList« Example – Buffer/Linker/Inverter
Beyond »CAR« Mappings»Class2Relational« Example – Transitive Closure "Lifted" attributes C5 A2 Transitive Closure to "lift" attributes A1 C4 A0 A5 C2 C1 A2 A1 A0 C0 C2C Classifier type Table cond self.isPers name : String name : String cols Attribute C2C name : String cond isPrim : Bool Column Class Primitive attr type : String name : String isPers : Bool pkey par Path. top references Association attr_from_top Trans. Closure FKey fkeys res name : String src dest bot
Beyond »CAR« Mappings»Class2Relational« Example – Complete Mapping
Content • Problem • »CAR« Mapping Operators by Example • »TROPIC« Deriving Executable Transformation Nets • Beyond »CAR« Mappings • Outlook
How to Achieve Information Integration in the Large? Outlook • Understanding • How to discover relevant information? • How to use statistical properties of models? • Specification • How to automate the creation of mapping models? • How to prove properties such as deadlock, termination, etc.? • How to encapsulate mapping models in model management operators? • Execution • How to check equivalence/consistency between/within models? • How to test and debug mapping models/transformation nets? • How to achieve repair actions and incremental updates? • How to build performing transformations?