Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
kite
1. On the Quest for Flexible Modelling
Esther Guerra, Juan de Lara
MISO - Modelling & Software Engineering Research Group (miso.es)
Universidad Aut´onoma de Madrid (Spain)
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 1 / 23
2. Motivation
Diverse nature of modelling, ranging:
from informal (e.g., for discussion)
to fully formal (e.g., for code generation)
Most modelling tools only serve one of these extreme purposes:
create informal models or diagrams (imprecise)
build models fully conformant to the modelling language (rigid)
MDE tools on the rigid side:
it hinders a wider adoption of MDE
unnecessarily complex solutions to some scenarios
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 2 / 23
3. Contribution
Our claim: modelling tools need further flexibility
cover different stages, purposes, and approaches
explicit modelling process and conformance rules
In this presentation:
requirements for flexible modelling tools
application scenarios
our proposal: meta-modelling language + explicit modelling process
the Kite meta-modelling framework
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 3 / 23
5. Requirements and scenarios
R1: Configurable inconsistency tolerance
R1: The user should be able to relax the model conformance rules.
Possibility to enable/disable:
cardinality and integrity constraints
type checking of field values
objects with an abstract type
objects with a non-existing type
Inconsistency
tolerance
rigid freeconfigurable
typing #instances cardinality constraints
R1
Generalization
multiple
inheritance
object-
level
R4
gexplicitEsther Guerra On the Quest for Flexible Modelling MoDELS 2018 5 / 23
6. Requirements and scenarios
R1: Configurable inconsistency tolerance
R1: The user should be able to relax the model conformance rules.
Scenarios:
model life-cycle: from less to more strict rules
model migration, meta-model evolution: incorrect models will “load”
meta-model testing: partial, incorrect test models
test-driven meta-model development: non-existing types and features
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 5 / 23
7. Requirements and scenarios
R2: Information extension
R2: The user should be able to dis(allow) information extension.
Possibility to have (or not):
objects with no type (it is type-safe)
typed objects with fields not in the object type
Inconsistency
tolerance
rigid freeconfigurable
typing #instances cardinality constraints
R1
Information
extension
untyped
objects
untyped
features
R2
GeneralizationR4 ProR5
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 6 / 23
8. Requirements and scenarios
R2: Information extension
R2: The user should be able to dis(allow) information extension.
Scenarios:
data injection: no meta-model upfront
language extension: emergent features as untyped elements
auxiliary computation elements: flags, clocks... as untyped elements
language creation: creating types from untyped elements
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 6 / 23
9. Requirements and scenarios
R3: Configurable classification relation
R3: The user should be able to configure the classification relation.
Possibility to enable/disable:
dynamic, multiple typing
creation and a-posteriori types
multiple meta-levels
Modelling tools typically support:
single, static typing
creation types
two meta-levels
rmation
ension
untyped
features
Classification
dynamicity
static dynamic
levels
2level multilevel
#classifiers
single-c multiple-c
classification time
creation a-posteriori
#model types
single-m multiple-m
R3
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 7 / 23
10. Requirements and scenarios
R3: Configurable classification relation
R3: The user should be able to configure the classification relation.
Scenarios:
reuse of model operations: by allowing multiple typing
OO model«Container»
*
cl
Package Class
creation type
applicable to
Element
name: String
* pck
Container *
cnt
:Package
name=“org”
:Package
name=“people”
:Class
name=“Person”
Graph
MM
OO
MM defined
over
operation flatten
(Container c) =
c.cnt…
ti fl
«Container» «Leaf»
* lf
Leaf
a posteriori type
joint instantiation of sets of classes: e.g., used in ontologies
multi-level modelling: by allowing multiple meta-levels
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 7 / 23
11. Requirements and scenarios
R4: Configurable generalisation relation
R4: The user should be able to configure the generalisation relation.
Possibility to enable/disable:
multiple inheritance
generalisation between objects
tolerance
rigid freeconfigurable
typing #instances cardinality constraint
Generalization
multiple
inheritance
object-
level
R4
exp
config
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 8 / 23
12. Requirements and scenarios
R4: Configurable generalisation relation
R4: The user should be able to configure the generalisation relation.
Scenarios:
model libraries: reusable by object inheritance
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 8 / 23
13. Requirements and scenarios
R5: Explicit and configurable modelling process
R5: The tool should allow defining and enacting modelling processes.
Modelling processes:
phases, conformance rules
order of object creation
current modelling phase
manual
automatic
process intent
meta-model creation
(bottom-up, top-down,
blended)
model creation
Inconsistency
tolerance
rigid freeconfigurable
typing #instances cardinality constraints
R1
Information
extension
untyped
objects
untyped
features
R2
d
sta
levels
2level multilevel
#classifiers
single-c multiple-c
R3
Generalization
multiple
inheritance
object-
level
R4
modelling
process
generic domain-
specific
state
change
manual automatic
process
intent
bottom-up top-down blended
Process
explicit
configurable
R5
model refinement
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 9 / 23
14. Requirements and scenarios
R5: Explicit and configurable modelling process
R5: The tool should allow defining and enacting modelling processes.
Scenarios:
transition from informal to formal modelling
modelling guidelines: e.g., in UML, classes first
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 9 / 23
15. Requirements and scenarios
R6: Process-aware extensible assistance
R6: Fixes and refactorings may depend on the process intent.
For example, given a model error:
bottom-up fixes modify the meta-model
top-down fixes modify the model
domain-specific fixes
ree
ality constraints
Information
extension
untyped
objects
untyped
features
R2
Classification
dynamicity
static dynamic
levels
2level multilevel
#classifiers
single-c multiple-c
classification time
creation a-poste
R3
modelling
process
generic domain-
specific
state
change
manual automatic
process
intent
bottom-up top-down blended
Process
explicit
configurable
R5
model refinement
assistance
extensible
Process
R6
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 10 / 23
16. Requirements and scenarios
R6: Process-aware extensible assistance
R6: Fixes and refactorings may depend on the process intent.
Scenarios:
model refinement: model fixes and refactorings
live meta-model/model co-evolution: model fixes and refactorings
bottom-up meta-modelling: meta-model fixes
recommendation systems
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 10 / 23
18. Architecture
meta-modelling language for flexible modelling
explicit modelling process
model
model
model
meta-model
for flexible modelling
«conf. to» (linguistic)
«conf. to»
(onto.)
«conf. to»
(onto.)
modelling process
meta-model
«conf. to» (linguistic)
model
«conf. to» (ontologic)
modelling processmodel ecosystem
process supervisor
current phase
configurable
model
validator
configures
feedback
fixeschecks
check
selector
fix
selector
selects selects
«extensible»
fixfixfix
checkcheckcheck
phase
1
phase
2
phase
3
phase
4
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 12 / 23
19. Meta-modelling language
Basic modelling elements (R3, R4)
Support for multiple levels (one class to represent types and instances)
Models and objects can have features and constraints
Instantiation cardinality vs Value cardinality
References can have several targets, at any level
Generalization at any meta-level (relation Object.super)
Model Object
Feature
TypedElement
Featured
Element
ValuedElement
name: String
lbound: int
ubound: int
lbound_v: int
ubound_v: int
Attribute Reference
features
*
*
objects
*
super
Target
*to
object
Integrity
Constraint
name: String
body: String
context
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23
20. Meta-modelling language
Basic modelling elements (R3, R4)
Support for multiple levels (one class to represent types and instances)
Models and objects can have features and constraints
Instantiation cardinality vs Value cardinality
References can have several targets, at any level
Generalization at any meta-level (relation Object.super)
Model Object
Feature
TypedElement
Featured
Element
ValuedElement
name: String
lbound: int
ubound: int
lbound_v: int
ubound_v: int
Attribute Reference
features
*
*
objects
*
super
Target
*to
object
Integrity
Constraint
name: String
body: String
context
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23
21. Meta-modelling language
Basic modelling elements (R3, R4)
Support for multiple levels (one class to represent types and instances)
Models and objects can have features and constraints
Instantiation cardinality vs Value cardinality
References can have several targets, at any level
Generalization at any meta-level (relation Object.super)
Model Object
Feature
TypedElement
Featured
Element
ValuedElement
name: String
lbound: int
ubound: int
lbound_v: int
ubound_v: int
Attribute Reference
features
*
*
objects
*
super
Target
*to
object
Integrity
Constraint
name: String
body: String
context
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23
22. Meta-modelling language
Basic modelling elements (R3, R4)
Support for multiple levels (one class to represent types and instances)
Models and objects can have features and constraints
Instantiation cardinality vs Value cardinality
References can have several targets, at any level
Generalization at any meta-level (relation Object.super)
Model Object
Feature
TypedElement
Featured
Element
ValuedElement
name: String
lbound: int
ubound: int
lbound_v: int
ubound_v: int
Attribute Reference
features
*
*
objects
*
super
Target
*to
object
Integrity
Constraint
name: String
body: String
context
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23
23. Meta-modelling language
Basic modelling elements (R3, R4)
Support for multiple levels (one class to represent types and instances)
Models and objects can have features and constraints
Instantiation cardinality vs Value cardinality
References can have several targets, at any level
Generalization at any meta-level (relation Object.super)
Model Object
Feature
TypedElement
Featured
Element
ValuedElement
name: String
lbound: int
ubound: int
lbound_v: int
ubound_v: int
Attribute Reference
features
*
*
objects
*
super
Target
*to
object
Integrity
Constraint
name: String
body: String
context
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23
24. Meta-modelling language
Flexible typing (R1, R2, R3)
Explicit typing relation
Zero, one or more typings for an instance
Types can be assigned at creation time, or later
Re-typing (preserving the instance identity)
*
otypingsModel
Typing
Object
Typing
Feature
Typing
TypedElementTyping
Featured
Typing
*ftypings
type
instance
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 14 / 23
25. Meta-modelling language
Examples
1 Conference {
2 Author {}
3 Reviewer /1..∗/ {}
4 }
5
6 MODELS :Conference /0..0/ {
7 amelia :Author :Reviewer {}
8 lateReviews {
9 ref who = amelia;
10 }
11 }
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 15 / 23
26. Meta-modelling language
Examples
1 Conference {
2 Author {}
3 Reviewer /1..∗/ {} −−> instantiation cardinality
4 }
5
6 MODELS :Conference /0..0/ { −−> instantiation cardinality
7 amelia :Author :Reviewer {}
8 lateReviews {
9 ref who = amelia;
10 }
11 }
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 15 / 23
27. Meta-modelling language
Examples
1 Conference {
2 Author {}
3 Reviewer /1..∗/ {}
4 }
5
6 MODELS :Conference /0..0/ {
7 amelia :Author :Reviewer {} −−> object with multiple types
8 lateReviews {
9 ref who = amelia;
10 }
11 }
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 15 / 23
28. Meta-modelling language
Examples
1 Conference {
2 Author {}
3 Reviewer /1..∗/ {}
4 }
5
6 MODELS :Conference /0..0/ {
7 amelia :Author :Reviewer {}
8 lateReviews { −−> object with no types
9 ref who = amelia;
10 }
11 }
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 15 / 23
29. Meta-modelling language
Examples
1 ArtistTypes {
2 Singer {
3 att name : String;
4 att stageName : String;
5 }
6 }
7
8 SomeMusicians :ArtistTypes {
9 tina :Singer {
10 att name = ”Anna Mae Bullock”;
11 att stageName = ”Tina Turner”;
12 }
13 joaquin :Singer {
14 att realName (:name :stageName) = ”Joaquin Pascual”;
15 }
16 }
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 15 / 23
30. Reified modelling process
Explicit modelling process (R5, R6)
Explicit modelling process: phases, checks, transitions
checks: predefined conformance rules, or custom-made ocl conditions
transitions: manual or automatic, may define ocl conditions
Process intent: refinement, top-down, bottom-up, free
Quick fixes can be filtered by process intent
Conformance rules and quickfixes can be extended by users
ModellingProcess
Phase
name: String
phases *
name: String
«enum»
Intent
BOTTOMUP
TOPDOWN
MODELREFINEMENT
FREE
intent
initial
Transition
out *
next
«enum»
TransitionMode
AUTOMATIC
MANUAL
«enum»
Expressiveness
MULTITYPING
MULTILEVEL
MULTIINHERITANCE
«enum»
Extensibility
UNTYPEDOBJECTS
UNTYPEDFEATURES
expressiveness
0..3
0..2
transition
Check
/allEntails*
conditions *
«extensible»
Quickfix
name: String
description: String
body: String
activationCheck
activationIntent
*
*
fixes
* *
name: String
description: String
body: String
OclCondition «extensible»
ConformanceRule
ModelType AttributeValue IntegrityConstraints… …
«from Flex-mm»
Object
Model
for
0..1
for 0..1
entails*
«from Flex-mm»
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 16 / 23
31. Reified modelling process
Explicit modelling process (R5, R6)
Explicit modelling process: phases, checks, transitions
checks: predefined conformance rules, or custom-made ocl conditions
transitions: manual or automatic, may define ocl conditions
Process intent: refinement, top-down, bottom-up, free
Quick fixes can be filtered by process intent
Conformance rules and quickfixes can be extended by users
ModellingProcess
Phase
name: String
phases *
name: String
«enum»
Intent
BOTTOMUP
TOPDOWN
MODELREFINEMENT
FREE
intent
initial
Transition
out *
next
«enum»
TransitionMode
AUTOMATIC
MANUAL
«enum»
Expressiveness
MULTITYPING
MULTILEVEL
MULTIINHERITANCE
«enum»
Extensibility
UNTYPEDOBJECTS
UNTYPEDFEATURES
expressiveness
0..3
0..2
transition
Check
/allEntails*
conditions *
«extensible»
Quickfix
name: String
description: String
body: String
activationCheck
activationIntent
*
*
fixes
* *
name: String
description: String
body: String
OclCondition «extensible»
ConformanceRule
ModelType AttributeValue IntegrityConstraints… …
«from Flex-mm»
Object
Model
for
0..1
for 0..1
entails*
«from Flex-mm»
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 16 / 23
32. Reified modelling process
Explicit modelling process (R5, R6)
Explicit modelling process: phases, checks, transitions
checks: predefined conformance rules, or custom-made ocl conditions
transitions: manual or automatic, may define ocl conditions
Process intent: refinement, top-down, bottom-up, free
Quick fixes can be filtered by process intent
Conformance rules and quickfixes can be extended by users
ModellingProcess
Phase
name: String
phases *
name: String
«enum»
Intent
BOTTOMUP
TOPDOWN
MODELREFINEMENT
FREE
intent
initial
Transition
out *
next
«enum»
TransitionMode
AUTOMATIC
MANUAL
«enum»
Expressiveness
MULTITYPING
MULTILEVEL
MULTIINHERITANCE
«enum»
Extensibility
UNTYPEDOBJECTS
UNTYPEDFEATURES
expressiveness
0..3
0..2
transition
Check
/allEntails*
conditions *
«extensible»
Quickfix
name: String
description: String
body: String
activationCheck
activationIntent
*
*
fixes
* *
name: String
description: String
body: String
OclCondition «extensible»
ConformanceRule
ModelType AttributeValue IntegrityConstraints… …
«from Flex-mm»
Object
Model
for
0..1
for 0..1
entails*
«from Flex-mm»
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 16 / 23
33. Reified modelling process
Explicit modelling process (R5, R6)
Explicit modelling process: phases, checks, transitions
checks: predefined conformance rules, or custom-made ocl conditions
transitions: manual or automatic, may define ocl conditions
Process intent: refinement, top-down, bottom-up, free
Quick fixes can be filtered by process intent
Conformance rules and quickfixes can be extended by users
ModellingProcess
Phase
name: String
phases *
name: String
«enum»
Intent
BOTTOMUP
TOPDOWN
MODELREFINEMENT
FREE
intent
initial
Transition
out *
next
«enum»
TransitionMode
AUTOMATIC
MANUAL
«enum»
Expressiveness
MULTITYPING
MULTILEVEL
MULTIINHERITANCE
«enum»
Extensibility
UNTYPEDOBJECTS
UNTYPEDFEATURES
expressiveness
0..3
0..2
transition
Check
/allEntails*
conditions *
«extensible»
Quickfix
name: String
description: String
body: String
activationCheck
activationIntent
*
*
fixes
* *
name: String
description: String
body: String
OclCondition «extensible»
ConformanceRule
ModelType AttributeValue IntegrityConstraints… …
«from Flex-mm»
Object
Model
for
0..1
for 0..1
entails*
«from Flex-mm»
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 16 / 23
34. Reified modelling process
Further configuration options (R5, R6)
Configuration of the meta-modelling language:
expresiveness: multiple typing, multiple levels, multiple inheritance
extensibility: untyped objects, untyped features
ModellingProcess
Phase
name: String
phases *
name: String
«enum»
Intent
BOTTOMUP
TOPDOWN
MODELREFINEMENT
FREE
intent
initial
Transition
out *
next
«enum»
TransitionMode
AUTOMATIC
MANUAL
«enum»
Expressiveness
MULTITYPING
MULTILEVEL
MULTIINHERITANCE
«enum»
Extensibility
UNTYPEDOBJECTS
UNTYPEDFEATURES
expressiveness
0..3
0..2
transition
Check
/allEntails*
conditions *
«extensible»
Quickfix
name: String
description: String
body: String
activationCheck
activationIntent
*
*
fixes
* *
name: String
description: String
body: String
OclCondition «extensible»
ConformanceRule
ModelType AttributeValue IntegrityConstraints… …
«from Flex-mm»
Object
Model
for
0..1
for 0..1
entails*
«from Flex-mm»
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 17 / 23
35. Reified modelling process
Examples
Typed
Intent: ModelRefinement
TransitionMode: Manual
Expressiveness: MultiTyping, MultiInheritance
Extensibility: UntypedObjects, UntypedFeatures
checks: object types
Draft
checks: -
Bounded
checks: value cardinality,
instance cardinality
Well-formed
checks: type of feature values
Strict
checks: integrity constraints
current
Conference {
Author {}
Reviewer /1..*/ {}
}
MODELS :Conference {
amelia :Author :Reviewer {}
lateReviews :Comment {
ref who : amelia;
}
}
1
2
3
4
5
6
7
8
9
10
11
Typed
Draft
Bounded
Well-formed
Strict
Fixes (refinement)
- remove type
- change to Author/Reviewer
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 18 / 23
36. Reified modelling process
Examples
Feature Types
checks: feature types
Object Types
Cardinalities
checks: value cardinality,
instance cardinality
Free
checks: model types
checks: object types
Value Types
checks: type of feature values
createObjectType
createValueType
createFeat&ValueType
createObject&Feat&ValueType
createFeatType
createObject&FeatTypes
Quick fixes
createModelType
Intent: BottomUp
TransitionMode: Manual
Expressiveness: MultiInheritance
Extensibility: -
updateCardinality
current
Conference {
Author {}
Reviewer /1..*/ {}
}
MODELS :Conference {
amelia :Author :Reviewer {}
lateReviews :Comment {
ref who : amelia;
}
}
1
2
3
4
5
6
7
8
9
10
11
Object Types
Feat. Types
Value Types
Cardinalities
Fixes (bottomup)
- Add new type Comment
Free
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 18 / 23
37. Our prototype implementation Kite
Kite is an eclipse textual editor for flexible modelling
Based on EMF (for inter-operability), Xtext, and EVL (constraints)
1 2
35
6
4
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 19 / 23
39. Summary
Flexibility in modelling tools is useful in many scenarios
List of requirements for flexible modelling tools:
flexible typing
explicit modelling process
Initial proposal and implementation
In the paper: review of existing flexible (meta-)modelling tools
support for flexibility is only partial
big gap on explicit modelling processes (opportunity!)
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 21 / 23
40. Next steps
Improving Kite, e.g., DSL to define modelling processes
Integration with further model management languages
Extend reasoners to work with non-fully conformant models
Explore others aspects of flexibility, like concrete syntax
Meta-object protocols to extend meta-modelling facilities
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 22 / 23
41. On the Quest for Flexible Modelling
Esther Guerra, Juan de Lara
esther.guerra@uam.es
MISO - Modelling & Software Engineering Research Group (miso.es)
Universidad Aut´onoma de Madrid (Spain)
Comments? Questions?
Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 23 / 23