A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

21
A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand

Transcript of A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Page 1: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

A novel approach to modeling

Zvezdan Protić, Tom Verhoeff, Mark van den Brand

Page 2: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Preliminaries MDSE Models

A model is an abstraction of System Under Study (SUS) that can be used for reasoning about that SUS

Metamodels Syntactic carrier of models

Metametamodels

Page 3: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Popular Metametamodels having “layered” architecture

PAGE 3

MOF (UML) Ecore (Eclipse) GME (Generic Modeling Environment) metametamodel

Page 4: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Some reasons for a new approach In traditional modeling approaches a metametamodel is an

instance of itself Thus, conceptually, an <<instance-of>> relation can

have two interpretations But those interpretations are not clearly stated for traditional

metametamodels “A metamodel is simply the model of a model, and if that model is itself a metamodel,

then the metamodel is in fact a meta-metamodel.[4] Got it? If not, don't worry about it, as it's really just an academic issue anyway.” EMF Eclipse Modeling Framework (2nd Edition)

The relationship instantiation problem E.g. in MOF the instance of an <<association>> is a

<<link>> But link does not contain attributes of association, e.g. cardinalities,

unless it inherits from <<association>>, thus an instance of a link cannot be used as a link again

Page 5: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

<<instance-of>> problem of the layered architecture

PAGE 5

Page 6: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Our MetaMetaModel

PAGE 6

Page 7: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Example Metamodel

PAGE 7

State Transition

Label:String

From

To0..1

0..1

Page 8: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Example model (with relations to its metamodel)

PAGE 8

A B

SM1

Page 9: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Similarities to UML 2.4

Page 10: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Implementing a layered architecture in our approach

PAGE 10

MetaMetaModel

MetaModel2 Model2conforms-to

instance-of

instance-of

MetaModel3 Model3

ModelMetaModel

conforms-to

Transform (interpret)

conforms-to

Transform (interpret)

instance-of

instance-of

instance-of

instance-of

Page 11: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Why is our approach a plausible approach? Ethan K. Jackson, and Janos Sztipanovits: Formalizing the Structural Semantics of Domain-

specific Modeling Languages, Journal of Software and System Modeling, 2009 An algebraic approach to defining the syntax and structural semantics of domain specific

modeling languages (DSML) A DSLM is a pair of a domain and interpretations.

A domain is specified similar to a language as a tuple of: concepts that can be used to build models (Y), a set of all realizations of models (RY), and a set of constraints over RY Concepts, are described by using term algebras Constraints are described by using formulas of a logic Terms can be transformed into formulas The validity of a model is checked by making a deductive closure of an union of

constraint formulas and term formulas An interpretation is a transformation from a domain to a domain

Formally, an interpretation is a triple of source domain signature, a target domain signature, and the set of formulas in the same logic as the one used to specify constraints

A metametamodel is just another domain, that has, as concepts, all the concepts that can be used in other domains

This means it is very easy to change the metametamodel A metamodel is a model of a metametamodel, such that there is an interpretation that can

generate a domain based on that metamodel A metametamodel is meta-circular if it has a realization that when interpreted into a

domain, can be interpreted back into the metametamodel domain

Page 12: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Applications Model comparison Metamodel and Model co-evolution

Page 13: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Metamodel-independent model comparison A model comparison is the process of

determining differences between two models Model differences are represented by a

another (differences) model that conforms to a differences metamodel

The model repositories are bound to have large number of metamodels that models conform to Metamodel-dependent model comparison may not

suffice

Page 14: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Our approach to model comparison:metamodel of model differences

Page 15: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Metamodel independent metamodel and model co-evolution

MM1_v1 MM1_v2

M1 M1_v2

conforms-to

evolution

conforms-to

co-evolution

Page 16: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

A common approach to co-evolution

Page 17: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Why we propose SOT-s An example operation: Make Reference Composite What are some possible solutions:

Copy all referenced entities into the new containers? Move all referenced entities into the new containers? Assign all entities of the referenced type to containers of the

referees? Or let the user decide which entities should stay in old

containers, and which entities should move ?

Page 18: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Metamodel for metamodels

PAGE 18

Page 19: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

An example metamodel in “natural” and “transformed” representation

PAGE 19

Page 20: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Advantages of our approach All the atomic differences between

metamodels are known Thus, we can create one transformation that co-

evolves models By using SOT, the users that are co-evolving

models can easily adapt the transformation to a particular situation

Page 21: A novel approach to modeling Zvezdan Protić, Tom Verhoeff, Mark van den Brand.

Comments, Questions, Suggestions ?