1. AN OVERVIEW OF MDE
RESEARCH ACTIVITIES IN
THE MISO GROUP
Computer Science Department
Universidad Autónoma de Madrid (Spain)
http://miso.es
@miso_uam
Esther Guerra, Juan de Lara
McGill U - 9th Feb 2018
3. THE AUTONOMOUS
UNIVERSITY OF MADRID
3
Universidad Autónoma de Madrid
• Established in 1968
• North part of Madrid (campus Cantoblanco)
• One of the top universities in Spain
• >30000 students
• “Excellence” campus with CSIC (Spanish
Research Council)
Computer Science and
Telecommunication Engineering
• Created in 1992
• 96 full time professors
• Joint diploma Comp.Sci.-Maths
4. THE MISO GROUP
Modelling and Software Engineering Research Group
Professors:
• Juan de Lara, PhD
• Esther Guerra, PhD
• Elena Gómez, PhD
Researchers:
• Jesús Sánchez, PhD (external)
• Jesús Juan López, PhD (external)
• Antonio Garmendia (FPI)
• Pablo Gómez (research associate)
• Mario González (research associate)
• Ángel Mora (FPU)
• Javier Palomares (research associate)
• Sara Pérez (research associate)
• Santiago Jácome (U. Fuerzas Armadas, Ecuador)
4
http://miso.es
5. OUR RESEARCH:
MODEL DRIVEN ENGINEERING
Domain-Specific Languages
Model-Transformations
(Meta-)Modelling
Flexibility
Scalability
Reuse
Mobile apps
Open data
Social networks
Streaming data applications
5
AreasConcernsApplications
6. SOME BITS OF OUR
RESEARCH FOR TODAY
(Meta-)Modelling
• Multi-level modelling
• A-posteriori typing
• Modelling through social networks
Domain-Specific Languages
• Active DSLs
• DSLs by example
• Pattern-based development of DSLs
Transformations
• Verification
• Reuse
6
8. MULTI-LEVEL MODELLING (1/2)
8
Using more than two meta-levels at the same time
Reduces accidental complexity
Potency to characterize instances beyond the immediate
meta-level below
ProductType@2
VAT@1: double
price: double
Book: ProductType
VAT=18.0
price=10.0
mobyDick: Book
vs
(class Product becomes
useless: accidental complexity)
Atkinson, Kühne. 2002. Rearchitecting the UML
infrastructure. ACM Tr. Model. Comput. Simul.
12, 4 (2002), 290–321.
9. MULTI-LEVEL MODELLING (2/2)
Tooling
• MetaDepth (http://metadepth.org)
• Textual modelling, command-line
• Integrated with the Epsilon model
management languages
Relevance in practice
• Patterns whose occurrence signal a “multi-level” smell
• Analysis of OMG standards, meta-model repositories (400+ MMs)
• Pervasive in some domains (sw architecture, enterprise/process
modelling)
• Relatively frequent in OMG specifications (over 35%)
9
de Lara, Guerra. Deep Meta-modelling with MetaDepth. TOOLS (48) 2010: 1-20
de Lara, Guerra, Sánchez Cuadrado. When and How to Use Multilevel Modelling.
ACM Trans. Softw. Eng. Methodol. 24(2): 12:1-12:46 (2014)
Model Ecommerce@2{
Node ProductType {
VAT@1: double;
price: double;
}
10. Constructive typing
• Creation of objects and classification
are inseparable
Lacks flexibility
• Objects cannot change their type at
run-time (and retain its identity)
Hinders reuse
• An operation defined for a meta-model
cannot be used for another one
APOSTERIORI
TYPING
10
Task
start: Date
duration: int
review: Task
start= 8/5/15
duration=30
creation «instance of»
Tasks meta-model
model
11. Constructive typing
• Creation of objects and classification
are inseparable
Lacks flexibility
• Objects cannot change their type at
run-time (and retain its identity)
Hinders reuse
• An operation defined for a meta-model
cannot be used for another one
APOSTERIORI
TYPING
11
review: Task
start= 8/5/15
duration=10
model
Task
start: Date
duration: int
review: Task
start= 8/5/15
duration=30
creation «instance of»
Tasks meta-model
model
12. Constructive typing
• Creation of objects and classification
are inseparable
Lacks flexibility
• Objects cannot change their type at
run-time (and retain its identity)
Hinders reuse
• An operation defined for a meta-model
cannot be used for another one
APOSTERIORI
TYPING
12
Task
start: Date
duration: int
review: Task
start= 8/5/15
duration=30
creation «instance of»
Tasks meta-model
model
review: Task
start= 8/5/15
duration=0
model
13. Constructive typing
• Creation of objects and classification
are inseparable
Lacks flexibility
• Objects cannot change their type at
run-time (and retain its identity)
Hinders reuse
• An operation defined for a meta-model
cannot be used for another one
A POSTERIORI
TYPING
13
Task
start: Date
duration: int
review: Task
start= 8/5/15
duration=30
creation «instance of»
Tasks meta-model
model
review: Milestone
start= 8/5/15
duration=0
model
14. Constructive typing
• Creation of objects and classification
are inseparable
Lacks flexibility
• Objects cannot change their type at
run-time (and retain its identity)
Hinders reuse
• An operation defined for a meta-model
cannot be used for another one
A POSTERIORI
TYPING
14
Task
start: Date
duration: int
review: Task
start= 8/5/15
duration=30
creation «instance of»
Tasks meta-model
model
Measurable
quantity: int
Measuring MM
review: Milestone
start= 8/5/15
duration=0
model
15. AP TYPING MOTIVATION:
REUSE
15
Measurable
quantity: int
Schedulable
date: Date
review: Task
Scheduling MM Measuring MM
model
«instance of» «instance of»
start= 8/5/15
duration= 30
name= “rev”
«Schedulable,Measurable»
*
*
res
Task
start: Date
duration: int
name: String
Resource
Person
owner
assigned
1..*
creation meta-model
role meta-models
creation
«instance of»
a-posteriori typingcreation typing
operation
typing of operation
applicable to
16. 16
AP TYPING MOTIVATION:
FLEXIBLE REUSE
*topics
*
*
res
Task
start: Date
duration: int
name: String
Tasks meta-model (constructive types)
Resource
Person
owner
assigned
1..* 1..*
0..3
reviewsArticle
title: String
Conference meta-model (dynamic types)
Reviewer
Authorauthors
Topic
desc: String
«Author»
p2: Person
«Reviewer»
p1: Person
«Article»
r: Resource
:owner
t1:Task
start: 8/5/15
duration: 30
name: “rev”
:res
:assigned
«Author,Reviewer»
p2: Person
«Reviewer»
p1: Person
«Article»
r: Resource
:owner
t1:Task
start: 8/5/15
duration: 30
name: “rev”
:res
:assigned
«Author»
p3: Person
«Article»
s: Resource
:owner
t2:Task
start: 9/5/15
duration: 30
name: “rev”
:res
:assigned
the model
changes
and gets
retyped
creation «instance of»
model
• A Person (constructive type) is only a Reviewer (a posteriori type)
when some condition is met.
17. A more flexible typing mechanism for MDE
Decouple instantiation from classification
• Interfaces, Roles in role-based programming languages
Allow dynamic typing and multiple classifiers for objects
Type and instance-level reclassification specifications
• Transformation by reclassification
• Flexible reuse of model management operations
Prototype implementation in our MetaDepth tool
APOSTERIORI TYPING:
CONTRIBUTIONS
17
de Lara, Guerra. A Posteriori Typing for Model-Driven Engineering: Concepts, Analysis,
and Applications. ACM Trans. Softw. Eng. Methodol. 25(4): 31:1-31:60 (2017)
18. MODELLING THROUGH
SOCIAL NETWORKS
Increasing use of social networks
• Telegram, Twitter
Use them for collaborative modelling
• Chatbot
• Interprets natural language
• Creates a meta-model automatically
18
https://saraperezsoler.github.io/
ModellingBot/
Perez-Soler, Guerra, de Lara, Jurado. The Rise of the (Modelling) Bots: Towards Assisted
Modelling via Social Networks. Proc ASE’2017.
Perez-Soler, Guerra, de Lara. Assisted modelling over social networks with SOCIO. Tool demo at
MODELS’17.
20. DSLs BY EXAMPLE
A way to make meta-modelling/DSLs development more accesible
• Domain experts
• Foster their active participation in DSL development
20
López-Fernández, Sánchez Cuadrado, Guerra, de Lara. Example-driven meta-model
development. SoSyM 14(4): 1323-1347 (2015)
21. ACTIVE DSLs
Move beyond current scenarios for DSL use
today
• Use in mobility
• Geolocation
• Context awareness
• Collaboration
• External interaction
New kinds of DSLs
• Geo, Open, Contextual, Active
DSL-Comet
• Modelling iOS devices&Eclipse
• Available at app store
21
Vaquero, Palomares, Guerra, de Lara. Active DSLs: making every mobile user a modeller.
Proc. MODELS’2017.
https://diagrameditorserver.herokuapp.com/
22. PATTERN-BASED DSL
DEVELOPMENT
DSLs are rarely built from scratch
• DSLs for behaviour are inspired by state machines, workflow
languages, etc
Patterns
• Domain patterns (e.g., StateMachines)
• Design patterns (e.g., Lists)
• Concrete syntax patterns
• Infrastructure (e.g., model partitioning, filters, queries, etc)
• Dynamic semantics
DSL-tao: http://jdelara.github.io/DSL-tao/
22
A. Pescador, A. Garmendia, E. Guerra, J. Sánchez Cuadrado, J. de Lara. Pattern-
based development of Domain-Specific Modelling Languages. MoDELS 2015: 166-175
28. TRANSFORMATION ANALYSIS
28
J. Sánchez Cuadrado, E. Guerra, J. de Lara. Static analysis of model transformations.
IEEE Trans. Software Eng. 43(9): 868-897 (2017)
J. Sánchez Cuadrado, E. Guerra, J. de Lara. AnATLyzer: An Advanced IDE for ATL Model
Transformations. Proc. ICSE 2018 (demos).
29. TRANSFORMATION ANALYSIS BY
ADVANCING CONSTRAINTS
29
Combined with constraint solving
• Ensure strong executability
• Characterize classes of target models
• Contract-based transformation development
• Property-based testing
• Bi-directional transformations
J. Sánchez Cuadrado, E. Guerra, J. de Lara, R. Clariso, J. Cabot. Translating target to source
constraints in model-to-model transformations. Proc. IEEE/ACM MODELS’2017.
30. CORRECTNESS ANALYSIS:
SATISFACTION OF TARGET
CONSTRAINTS
30
Is there some Factory model, whose equivalent Petri net violates constraint
boundedTok?
module factory2pn;
create OUT : PN from IN : FAC;
rule Factory2PN2 {
from f :FAC!Factory(f.capacity<=0)
to pn : PN!PetriNet (
elems <- f.conveyors->
union(f.machines),
bound <- 1
)
}…
ATL Transformation
32. REUSABILITY:
CONCEPTS
32
Taking ideas of generic programming
Source
Concept
Generic
M2M transf.
(template)
from to
Concrete
source MM
binding
Instantiated
M2M transf.
from to
instantiation1
Source
model
conforms
Target
model
2
conforms
execution
Definition
Instantiation
Execution
Concrete
target MM
binding1
Target
Concept
33. REUSABILITY:
CONCEPTS
33
rule class2jclass {
from class : OO!Class
to jclass : Java!JavaClass
( name <- class.name,
extends <- class.superclasses.first() )
}
rule attribute2field {
from att : OO!Attribute
to field : Java!Field
( name <- att.name,
owner <- att.owner,
isPublic <- att.isPublic )
}
JavaClass
name : String
extends
Domain to: meta-model
owner
*
name : String
isPublic : boolean
Field
Class
name : String
superclasses
*
Domain from: concept
owner
*
name : String
isPublic : boolean
Attribute
Binding of concept:
generic transformation (template)
Class Component
Class.name Component.name
Class.superclasses Component.parents
Attribute Property
Attribute.name Property.name
Attribute.isPublic Property.public
Attribute.owner Property.cprop
Component
parents *
cprop
*
public : boolean
readonly: boolean
Property Port
in : boolean
out: boolean
*
the transformation can be applied
to instances of the Components meta-model
Domain from: meta-model
Components
name : String
NamedElement
cport
Sánchez Cuadrado, Guerra, de Lara. A Component Model for Model
Transformations. IEEE Trans. Software Eng. 40(11): 1042-1060 (2014)
de Lara, Guerra. Towards the flexible reuse of model transformations:
A formal approach based on graph transformation. J. Log. Algebr.
Meth. Program. 83(5-6): 427-458 (2014)