SlideShare a Scribd company logo
1 of 44
On the Combination of
Domain Specific
Modeling Languages
Antonio Vallecillo
GISUM/Atenea Research Group
ECMFA, Paris, June 2010
Domain Specific Modeling Languages
A DSML permits describing (and reasoning about) a view of a
system using a language close to the domain experts and
with the right size and level of abstraction
A system specification is made from many views, each one
using its own DSML (vocabulary, rules, notation, style,…)
Yet they need to be related and consistent…
…they all describe the same system!
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 2
[Picture borrowed
from J. Bézivin]
Viewpoint specifications
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 3
System
Owner
Programmer
End-user
Maintainer
Tester
Multiple aspects
of a system
Different
stakeholders’
views
Start Shift Accelerate Brake
Engine Transmission Transaxle
Control
Input
Power
Equations
Vehicle
Dynamics
Functional/Behavioral Model
Structural/Component Model
Performance Model
Mass
Properties
ModelStructural
Model
Safety
Model
Other Engineering
Analysis Models
Cost
Model
System Model
What is (in a) DSML?
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 4
[Picture borrowed
from E. Rivera]
Metamodels and models
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 5
Combining DSMLs: Issues to address
How to combine the independent views?
How to build a “combined” language?
Combined Metamodel with the Abstract Syntax?
Combined Concrete Syntax?
Combined Semantics?
How the combined language relates back to the
original ones (and to their related tools)?
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 6
In this work
We discuss different scenarios of use, and different
mechanisms for DSML combination; the advantages
they introduce, as well as their limitations
We propose a general proposal for combining DSMLs
that subsumes them, based on the concept of
unification and its realization using model-driven
techniques
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 7
Some remarks
The combined (or unified) language might not be
“domain specific” any more
It is usually to complex and cumbersome for user
consumption and usability (understandability,
operability, learnability, attractiveness,…)
Tools should be responsible for constructing it
The user work with the individual views
Tools build the model and extract information from it
[At the end of the day a model is nothing but an artefact
built to answer questions about a system under study!]
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 8
An running example
Adapted from Peter Linington’s “Black cats and coloured birds
– What do viewpoint correspondences do?” [WODPEC 2007]
Four viewpoints of a system, each one focusing on a different
aspect
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 9
Creatures viewpoint
Various kinds of creatures
They breed true and are not cannibals
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 10
[Many thanks to Martin Gogolla for suggesting the OCL expressions for this example]
Habitats viewpoint
Inhabitants live in a habitat
There are different kinds of habitats
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 11
Colours
ColouredThings have a colour
An operation establishes the rule for mingling two
Colours
A colour clashes with other strongly contrasted colours
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 12
Travelling around
A Position indicates where a Thing is in a moment in time
A Movement transports together a set of things (which are
in the same place) from one location to another using a
sequence of moves
A Move establishes a valid path between two positions
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 13
Three main issues to be addressed
How to relate the elements from the different views?
How to integrate the models of the views into a
common workable model?
How to extract information (and other views) from the
common model
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 14
Viewpoint relation
Synthesis
Analysis
Correspondences
Simple correspondences establish the relationships
between elements in different viewpoints
Creatures.Creature <-> Habitats.Inhabitant
Creatures.Creature <-> Colours.ColouredThing
Habitats.Inhabitant <-> Movement.Thing
Habitats.Habitat <-> Colours.ColouredThing
Correspondences do not form part of any viewpoint
Constraints on Correspondences:
We do not want to have red cats or blue woodlands
The colour of an inhabitant cannot clash with the colour
of its habitat!
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 15
Correspondences
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 16
Existing approaches for VP synthesis
Metamodel inheritance
Metamodel extension
Language embedding
Metamodel merge
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 17
Model inheritance [7,10]
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 18
Model Extension [6]
The combined metamodel contains the “duplicate-free
union” of the metamodels being combined
The user defines the elements that should be “unified”
based on the correspondences between them
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 19
Combined model
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 20
Language embedding [8,9]
UML, Skala, Haskell, Maude… are typical host languages
The embedded language(s) can use the syntax of the
host language, its module system, associated tools, …
The embedding is defined in terms of a mapping that
defines how elements of the embedded language are
represented in terms of constucts of the host language
Embedding can be used to provide (translational)
semantics to a language
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 21
Language embedding
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 22
That was easy and painless,
wasn’t it?
But… Does it always work?
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 23
Problems of language embedding
It means re-definining the embedded languages
E.g. MSCs and statecharts in UML 1
This hinders the use of their native associated tools
The concrete syntax is completely distorted
Semantics adaptations are frequent
E.g. MSCs and statecharts in UML
The relations between the view elements gets blurred
The host metamodel is complex
It does not have mechanisms for expressing correspondences
Users lose the conciseness and simplicity of DSMLs and
are forced to use a complex language
Combination of embedded languages is not properly
defined (e.g., SysML+MARTE?)
Users soon start making use of elements of the host language
outside their viewpoint languages!
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 24
Other option: (Meta)model merge
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 25
Model Merge [5,7]
An algorithm for merging models based on
correspondences defined between them
The merge is again the duplicate-free union of the
model elements
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 26
Problems of metamodel merge
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 27
It might work…
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 28
More problems of metamodel merge
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 29
Another problem
How to merge these two metamodels?
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 30
And what about this?
How to merge BPMN and UML activities models?
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 31
And what about this?
The situation is not that simple, though…
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 32
or and
A DSML combination approach
based on Model Unification
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 33
Model Unification
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 34
Some comments
Inspired in the original notion of Viewpoint Unification [15]
The form of unification depends on the DSMLs to be combined
The kind of projections depend on the relationship between
the DSMLs and the unified language
Refinement; abstraction; equivalence; implementation; …
Viewpoint consistency is checked using the projections and
the fact that they have to respect the correspondences
Model unification subsumes all previous approaches
The unified model can be developed using model inheritance,
extension or merge – whenever possible
The unified model corresponds to the “least developed
unification” of [5]
Projections are the inverse of mapping functions
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 35
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 36
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 37
module t4;
create OUT : Movements
from IN : MG ;
…
rule inh2thing {
from i : MG!Inhabitant
to t : Movements!Thing
}
…
Does this always work?
Sometimes it is not possible (inconsistent views)
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 38
1 1
1 1
Does this always work? (II)
Sometimes there are several choices: No unique
unified metamodel
Continuous refines discrete, or discrete refines continuous
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 39
Viewpoint analysis
From the unified metamodel and the set of projections:
The projections are mappings that provide the bridges
between the unified metamodel and the views
Viewpoint analysis is automatic if projections are
defined in terms of model transformations
E.g., we have defined ATL model transformations to
implement the projections for the Zoological example
New views can be defined by projections (model
transformations) from the unified metamodel
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 40
Further issues
What happens with the concrete syntax?
In our proposal users do not need to deal with the unified
language…
Otherwise,
Do you super-impose icons? :-O
Do you invent yet another notation? :-(
…
What happens with the semantics?
This is tough in most approaches…
In an unification context, the semantics of the individual
viewpoints and of the unified metamodel are preserved
Projections act as semantic bridges that relate the
semantics
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 41
A typical application scenario
A user is confronted with two DSMLs to combine
The user defines the correspondences
Model weaving techniques can be useful here
Can model extension or model merge algorithms work?
If so, apply the algorithms described in [5] or [6]
The projections are just the inverse of their mappings functions
Otherwise, define a new combined language
By language embedding (if none of the issues mentioned above
represent a problem for you)
Projections are the inverse of the mappings
By defining a new metamodel
Projections are defined by the user (as model transformations!)
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 42
Conclusions
We have discussed the different mechanisms available
for DSML combination, their advantages and limitations
We propose a general framework for combining DSMLs
that subsumes them, based on the concept of
unification and its realization using model-driven
techniques
We are applying our work in the context of Multi-
Viewpoint approaches such as MDWE or RM-ODP
ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 43
Thanks!
Acknowledgements:
44ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs"

More Related Content

Similar to On the Combination of Domain Specific Modeling Languages

Approaches to software model inconsistency management
Approaches to software model inconsistency managementApproaches to software model inconsistency management
Approaches to software model inconsistency managementTom Mens
 
A Tool-Supported Approach for Omniscient Debugging and Concurrent Execution o...
A Tool-Supported Approach for Omniscient Debugging and Concurrent Execution o...A Tool-Supported Approach for Omniscient Debugging and Concurrent Execution o...
A Tool-Supported Approach for Omniscient Debugging and Concurrent Execution o...Benoit Combemale
 
Collaborative Model-Driven Software Engineering: a Classification Framework a...
Collaborative Model-Driven Software Engineering: a Classification Framework a...Collaborative Model-Driven Software Engineering: a Classification Framework a...
Collaborative Model-Driven Software Engineering: a Classification Framework a...Ivano Malavolta
 
Kiss at oopsla 09
Kiss at oopsla 09Kiss at oopsla 09
Kiss at oopsla 09ClarkTony
 
What is needed for managing co-evolution in MDE?
What is needed for managing co-evolution in MDE?What is needed for managing co-evolution in MDE?
What is needed for managing co-evolution in MDE?Alfonso Pierantonio
 
A Tool-Supported Approach for Concurrent Execution of Heterogeneous Models (E...
A Tool-Supported Approach for Concurrent Execution of Heterogeneous Models (E...A Tool-Supported Approach for Concurrent Execution of Heterogeneous Models (E...
A Tool-Supported Approach for Concurrent Execution of Heterogeneous Models (E...Benoit Combemale
 
Agent-based modeling and simulation tutorial - EASSS 2009 - Giuseppe Vizzari
Agent-based modeling and simulation tutorial - EASSS 2009 - Giuseppe VizzariAgent-based modeling and simulation tutorial - EASSS 2009 - Giuseppe Vizzari
Agent-based modeling and simulation tutorial - EASSS 2009 - Giuseppe VizzariGiuseppe Vizzari
 
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...Marc Pantel
 
Wondeland Of Modelling
Wondeland Of ModellingWondeland Of Modelling
Wondeland Of ModellingKaniska Mandal
 
Meta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applicationsMeta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applicationsSaïd Assar
 
RuleML2015: Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
RuleML2015:  Semantics of Notation3 Logic: A Solution for Implicit Quantifica...RuleML2015:  Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
RuleML2015: Semantics of Notation3 Logic: A Solution for Implicit Quantifica...RuleML
 
X Som Graduation Presentation
X Som   Graduation PresentationX Som   Graduation Presentation
X Som Graduation PresentationGiorgio Orsi
 
The Missing Link. A Vocabulary Mapping Effort in Economics NKOS Workshop 2015
The Missing Link. A Vocabulary Mapping Effort in Economics NKOS Workshop 2015The Missing Link. A Vocabulary Mapping Effort in Economics NKOS Workshop 2015
The Missing Link. A Vocabulary Mapping Effort in Economics NKOS Workshop 2015Andreas Oskar Kempf
 
Non determinism and bidirectional model transformations
Non determinism and bidirectional model transformationsNon determinism and bidirectional model transformations
Non determinism and bidirectional model transformationsAlfonso Pierantonio
 
Model versioning in context of living
Model versioning in context of livingModel versioning in context of living
Model versioning in context of livingijseajournal
 
On the Use of Component-Based Principles and Practices for Architecting Cyber...
On the Use of Component-Based Principles and Practices for Architecting Cyber...On the Use of Component-Based Principles and Practices for Architecting Cyber...
On the Use of Component-Based Principles and Practices for Architecting Cyber...University of l'aquila
 
On the Use of Component-Based Principles and Practices for Architecting Cyber...
On the Use of Component-Based Principles and Practices for Architecting Cyber...On the Use of Component-Based Principles and Practices for Architecting Cyber...
On the Use of Component-Based Principles and Practices for Architecting Cyber...Henry Muccini
 

Similar to On the Combination of Domain Specific Modeling Languages (20)

Approaches to software model inconsistency management
Approaches to software model inconsistency managementApproaches to software model inconsistency management
Approaches to software model inconsistency management
 
Oss2015
Oss2015Oss2015
Oss2015
 
A Tool-Supported Approach for Omniscient Debugging and Concurrent Execution o...
A Tool-Supported Approach for Omniscient Debugging and Concurrent Execution o...A Tool-Supported Approach for Omniscient Debugging and Concurrent Execution o...
A Tool-Supported Approach for Omniscient Debugging and Concurrent Execution o...
 
Collaborative Model-Driven Software Engineering: a Classification Framework a...
Collaborative Model-Driven Software Engineering: a Classification Framework a...Collaborative Model-Driven Software Engineering: a Classification Framework a...
Collaborative Model-Driven Software Engineering: a Classification Framework a...
 
Kiss at oopsla 09
Kiss at oopsla 09Kiss at oopsla 09
Kiss at oopsla 09
 
What is needed for managing co-evolution in MDE?
What is needed for managing co-evolution in MDE?What is needed for managing co-evolution in MDE?
What is needed for managing co-evolution in MDE?
 
A Tool-Supported Approach for Concurrent Execution of Heterogeneous Models (E...
A Tool-Supported Approach for Concurrent Execution of Heterogeneous Models (E...A Tool-Supported Approach for Concurrent Execution of Heterogeneous Models (E...
A Tool-Supported Approach for Concurrent Execution of Heterogeneous Models (E...
 
Agent-based modeling and simulation tutorial - EASSS 2009 - Giuseppe Vizzari
Agent-based modeling and simulation tutorial - EASSS 2009 - Giuseppe VizzariAgent-based modeling and simulation tutorial - EASSS 2009 - Giuseppe Vizzari
Agent-based modeling and simulation tutorial - EASSS 2009 - Giuseppe Vizzari
 
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
 
Wondeland Of Modelling
Wondeland Of ModellingWondeland Of Modelling
Wondeland Of Modelling
 
Meta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applicationsMeta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applications
 
24 Reasons Why Variability Models Are Not Yet Universal (24RWVMANYU)
24 Reasons Why Variability Models Are Not Yet Universal (24RWVMANYU)24 Reasons Why Variability Models Are Not Yet Universal (24RWVMANYU)
24 Reasons Why Variability Models Are Not Yet Universal (24RWVMANYU)
 
RuleML2015: Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
RuleML2015:  Semantics of Notation3 Logic: A Solution for Implicit Quantifica...RuleML2015:  Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
RuleML2015: Semantics of Notation3 Logic: A Solution for Implicit Quantifica...
 
X Som Graduation Presentation
X Som   Graduation PresentationX Som   Graduation Presentation
X Som Graduation Presentation
 
The Missing Link. A Vocabulary Mapping Effort in Economics NKOS Workshop 2015
The Missing Link. A Vocabulary Mapping Effort in Economics NKOS Workshop 2015The Missing Link. A Vocabulary Mapping Effort in Economics NKOS Workshop 2015
The Missing Link. A Vocabulary Mapping Effort in Economics NKOS Workshop 2015
 
Non determinism and bidirectional model transformations
Non determinism and bidirectional model transformationsNon determinism and bidirectional model transformations
Non determinism and bidirectional model transformations
 
Model versioning in context of living
Model versioning in context of livingModel versioning in context of living
Model versioning in context of living
 
UML01
UML01UML01
UML01
 
On the Use of Component-Based Principles and Practices for Architecting Cyber...
On the Use of Component-Based Principles and Practices for Architecting Cyber...On the Use of Component-Based Principles and Practices for Architecting Cyber...
On the Use of Component-Based Principles and Practices for Architecting Cyber...
 
On the Use of Component-Based Principles and Practices for Architecting Cyber...
On the Use of Component-Based Principles and Practices for Architecting Cyber...On the Use of Component-Based Principles and Practices for Architecting Cyber...
On the Use of Component-Based Principles and Practices for Architecting Cyber...
 

More from Antonio Vallecillo

Modeling Objects with Uncertain Behaviors
Modeling Objects with Uncertain BehaviorsModeling Objects with Uncertain Behaviors
Modeling Objects with Uncertain BehaviorsAntonio Vallecillo
 
Introducing Subjective Knowledge Graphs
Introducing Subjective Knowledge GraphsIntroducing Subjective Knowledge Graphs
Introducing Subjective Knowledge GraphsAntonio Vallecillo
 
Using UML and OCL Models to realize High-Level Digital Twins
Using UML and OCL Models to realize High-Level Digital TwinsUsing UML and OCL Models to realize High-Level Digital Twins
Using UML and OCL Models to realize High-Level Digital TwinsAntonio Vallecillo
 
Modeling behavioral deontic constraints using UML and OCL
Modeling behavioral deontic constraints using UML and OCLModeling behavioral deontic constraints using UML and OCL
Modeling behavioral deontic constraints using UML and OCLAntonio Vallecillo
 
Modeling and Evaluating Quality in the Presence of Uncertainty
Modeling and Evaluating Quality in the Presence of UncertaintyModeling and Evaluating Quality in the Presence of Uncertainty
Modeling and Evaluating Quality in the Presence of UncertaintyAntonio Vallecillo
 
Research Evaluation - The current situation in Spain
Research Evaluation - The current situation in SpainResearch Evaluation - The current situation in Spain
Research Evaluation - The current situation in SpainAntonio Vallecillo
 
Belief Uncertainty in Software Models
Belief Uncertainty in Software ModelsBelief Uncertainty in Software Models
Belief Uncertainty in Software ModelsAntonio Vallecillo
 
Adding Random Operations to OCL
Adding Random Operations to OCLAdding Random Operations to OCL
Adding Random Operations to OCLAntonio Vallecillo
 
Extending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured InformationExtending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured InformationAntonio Vallecillo
 
Towards a Body of Knowledge for Model-Based Software Engineering
Towards a Body of Knowledge for Model-Based Software EngineeringTowards a Body of Knowledge for Model-Based Software Engineering
Towards a Body of Knowledge for Model-Based Software EngineeringAntonio Vallecillo
 
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...Antonio Vallecillo
 
Improving Naming and Grouping in UML
Improving Naming and Grouping in UMLImproving Naming and Grouping in UML
Improving Naming and Grouping in UMLAntonio Vallecillo
 

More from Antonio Vallecillo (12)

Modeling Objects with Uncertain Behaviors
Modeling Objects with Uncertain BehaviorsModeling Objects with Uncertain Behaviors
Modeling Objects with Uncertain Behaviors
 
Introducing Subjective Knowledge Graphs
Introducing Subjective Knowledge GraphsIntroducing Subjective Knowledge Graphs
Introducing Subjective Knowledge Graphs
 
Using UML and OCL Models to realize High-Level Digital Twins
Using UML and OCL Models to realize High-Level Digital TwinsUsing UML and OCL Models to realize High-Level Digital Twins
Using UML and OCL Models to realize High-Level Digital Twins
 
Modeling behavioral deontic constraints using UML and OCL
Modeling behavioral deontic constraints using UML and OCLModeling behavioral deontic constraints using UML and OCL
Modeling behavioral deontic constraints using UML and OCL
 
Modeling and Evaluating Quality in the Presence of Uncertainty
Modeling and Evaluating Quality in the Presence of UncertaintyModeling and Evaluating Quality in the Presence of Uncertainty
Modeling and Evaluating Quality in the Presence of Uncertainty
 
Research Evaluation - The current situation in Spain
Research Evaluation - The current situation in SpainResearch Evaluation - The current situation in Spain
Research Evaluation - The current situation in Spain
 
Belief Uncertainty in Software Models
Belief Uncertainty in Software ModelsBelief Uncertainty in Software Models
Belief Uncertainty in Software Models
 
Adding Random Operations to OCL
Adding Random Operations to OCLAdding Random Operations to OCL
Adding Random Operations to OCL
 
Extending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured InformationExtending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured Information
 
Towards a Body of Knowledge for Model-Based Software Engineering
Towards a Body of Knowledge for Model-Based Software EngineeringTowards a Body of Knowledge for Model-Based Software Engineering
Towards a Body of Knowledge for Model-Based Software Engineering
 
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
 
Improving Naming and Grouping in UML
Improving Naming and Grouping in UMLImproving Naming and Grouping in UML
Improving Naming and Grouping in UML
 

On the Combination of Domain Specific Modeling Languages

  • 1. On the Combination of Domain Specific Modeling Languages Antonio Vallecillo GISUM/Atenea Research Group ECMFA, Paris, June 2010
  • 2. Domain Specific Modeling Languages A DSML permits describing (and reasoning about) a view of a system using a language close to the domain experts and with the right size and level of abstraction A system specification is made from many views, each one using its own DSML (vocabulary, rules, notation, style,…) Yet they need to be related and consistent… …they all describe the same system! ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 2 [Picture borrowed from J. Bézivin]
  • 3. Viewpoint specifications ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 3 System Owner Programmer End-user Maintainer Tester Multiple aspects of a system Different stakeholders’ views Start Shift Accelerate Brake Engine Transmission Transaxle Control Input Power Equations Vehicle Dynamics Functional/Behavioral Model Structural/Component Model Performance Model Mass Properties ModelStructural Model Safety Model Other Engineering Analysis Models Cost Model System Model
  • 4. What is (in a) DSML? ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 4 [Picture borrowed from E. Rivera]
  • 5. Metamodels and models ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 5
  • 6. Combining DSMLs: Issues to address How to combine the independent views? How to build a “combined” language? Combined Metamodel with the Abstract Syntax? Combined Concrete Syntax? Combined Semantics? How the combined language relates back to the original ones (and to their related tools)? ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 6
  • 7. In this work We discuss different scenarios of use, and different mechanisms for DSML combination; the advantages they introduce, as well as their limitations We propose a general proposal for combining DSMLs that subsumes them, based on the concept of unification and its realization using model-driven techniques ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 7
  • 8. Some remarks The combined (or unified) language might not be “domain specific” any more It is usually to complex and cumbersome for user consumption and usability (understandability, operability, learnability, attractiveness,…) Tools should be responsible for constructing it The user work with the individual views Tools build the model and extract information from it [At the end of the day a model is nothing but an artefact built to answer questions about a system under study!] ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 8
  • 9. An running example Adapted from Peter Linington’s “Black cats and coloured birds – What do viewpoint correspondences do?” [WODPEC 2007] Four viewpoints of a system, each one focusing on a different aspect ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 9
  • 10. Creatures viewpoint Various kinds of creatures They breed true and are not cannibals ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 10 [Many thanks to Martin Gogolla for suggesting the OCL expressions for this example]
  • 11. Habitats viewpoint Inhabitants live in a habitat There are different kinds of habitats ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 11
  • 12. Colours ColouredThings have a colour An operation establishes the rule for mingling two Colours A colour clashes with other strongly contrasted colours ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 12
  • 13. Travelling around A Position indicates where a Thing is in a moment in time A Movement transports together a set of things (which are in the same place) from one location to another using a sequence of moves A Move establishes a valid path between two positions ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 13
  • 14. Three main issues to be addressed How to relate the elements from the different views? How to integrate the models of the views into a common workable model? How to extract information (and other views) from the common model ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 14 Viewpoint relation Synthesis Analysis
  • 15. Correspondences Simple correspondences establish the relationships between elements in different viewpoints Creatures.Creature <-> Habitats.Inhabitant Creatures.Creature <-> Colours.ColouredThing Habitats.Inhabitant <-> Movement.Thing Habitats.Habitat <-> Colours.ColouredThing Correspondences do not form part of any viewpoint Constraints on Correspondences: We do not want to have red cats or blue woodlands The colour of an inhabitant cannot clash with the colour of its habitat! ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 15
  • 16. Correspondences ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 16
  • 17. Existing approaches for VP synthesis Metamodel inheritance Metamodel extension Language embedding Metamodel merge ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 17
  • 18. Model inheritance [7,10] ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 18
  • 19. Model Extension [6] The combined metamodel contains the “duplicate-free union” of the metamodels being combined The user defines the elements that should be “unified” based on the correspondences between them ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 19
  • 20. Combined model ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 20
  • 21. Language embedding [8,9] UML, Skala, Haskell, Maude… are typical host languages The embedded language(s) can use the syntax of the host language, its module system, associated tools, … The embedding is defined in terms of a mapping that defines how elements of the embedded language are represented in terms of constucts of the host language Embedding can be used to provide (translational) semantics to a language ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 21
  • 22. Language embedding ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 22
  • 23. That was easy and painless, wasn’t it? But… Does it always work? ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 23
  • 24. Problems of language embedding It means re-definining the embedded languages E.g. MSCs and statecharts in UML 1 This hinders the use of their native associated tools The concrete syntax is completely distorted Semantics adaptations are frequent E.g. MSCs and statecharts in UML The relations between the view elements gets blurred The host metamodel is complex It does not have mechanisms for expressing correspondences Users lose the conciseness and simplicity of DSMLs and are forced to use a complex language Combination of embedded languages is not properly defined (e.g., SysML+MARTE?) Users soon start making use of elements of the host language outside their viewpoint languages! ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 24
  • 25. Other option: (Meta)model merge ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 25
  • 26. Model Merge [5,7] An algorithm for merging models based on correspondences defined between them The merge is again the duplicate-free union of the model elements ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 26
  • 27. Problems of metamodel merge ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 27
  • 28. It might work… ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 28
  • 29. More problems of metamodel merge ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 29
  • 30. Another problem How to merge these two metamodels? ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 30
  • 31. And what about this? How to merge BPMN and UML activities models? ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 31
  • 32. And what about this? The situation is not that simple, though… ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 32 or and
  • 33. A DSML combination approach based on Model Unification ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 33
  • 34. Model Unification ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 34
  • 35. Some comments Inspired in the original notion of Viewpoint Unification [15] The form of unification depends on the DSMLs to be combined The kind of projections depend on the relationship between the DSMLs and the unified language Refinement; abstraction; equivalence; implementation; … Viewpoint consistency is checked using the projections and the fact that they have to respect the correspondences Model unification subsumes all previous approaches The unified model can be developed using model inheritance, extension or merge – whenever possible The unified model corresponds to the “least developed unification” of [5] Projections are the inverse of mapping functions ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 35
  • 36. ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 36
  • 37. ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 37 module t4; create OUT : Movements from IN : MG ; … rule inh2thing { from i : MG!Inhabitant to t : Movements!Thing } …
  • 38. Does this always work? Sometimes it is not possible (inconsistent views) ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 38 1 1 1 1
  • 39. Does this always work? (II) Sometimes there are several choices: No unique unified metamodel Continuous refines discrete, or discrete refines continuous ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 39
  • 40. Viewpoint analysis From the unified metamodel and the set of projections: The projections are mappings that provide the bridges between the unified metamodel and the views Viewpoint analysis is automatic if projections are defined in terms of model transformations E.g., we have defined ATL model transformations to implement the projections for the Zoological example New views can be defined by projections (model transformations) from the unified metamodel ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 40
  • 41. Further issues What happens with the concrete syntax? In our proposal users do not need to deal with the unified language… Otherwise, Do you super-impose icons? :-O Do you invent yet another notation? :-( … What happens with the semantics? This is tough in most approaches… In an unification context, the semantics of the individual viewpoints and of the unified metamodel are preserved Projections act as semantic bridges that relate the semantics ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 41
  • 42. A typical application scenario A user is confronted with two DSMLs to combine The user defines the correspondences Model weaving techniques can be useful here Can model extension or model merge algorithms work? If so, apply the algorithms described in [5] or [6] The projections are just the inverse of their mappings functions Otherwise, define a new combined language By language embedding (if none of the issues mentioned above represent a problem for you) Projections are the inverse of the mappings By defining a new metamodel Projections are defined by the user (as model transformations!) ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 42
  • 43. Conclusions We have discussed the different mechanisms available for DSML combination, their advantages and limitations We propose a general framework for combining DSMLs that subsumes them, based on the concept of unification and its realization using model-driven techniques We are applying our work in the context of Multi- Viewpoint approaches such as MDWE or RM-ODP ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs" 43
  • 44. Thanks! Acknowledgements: 44ECMFA, paris, June 2010A. Vallecillo: "On the Combinination of DSMLs"