On the Quest for Flexible Modelling Esther Guerra, Juan de Lara - - PowerPoint PPT Presentation

on the quest for flexible modelling
SMART_READER_LITE
LIVE PREVIEW

On the Quest for Flexible Modelling Esther Guerra, Juan de Lara - - PowerPoint PPT Presentation

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 /


slide-1
SLIDE 1

On the Quest for Flexible Modelling

Esther Guerra, Juan de Lara

MISO - Modelling & Software Engineering Research Group (miso.es) Universidad Aut´

  • noma de Madrid (Spain)

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 1 / 23

slide-2
SLIDE 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

slide-3
SLIDE 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

  • ur proposal: meta-modelling language + explicit modelling process

the Kite meta-modelling framework

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 3 / 23

slide-4
SLIDE 4

Requirements and Scenarios

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 4 / 23

slide-5
SLIDE 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

  • bjects with an abstract type
  • bjects with a non-existing type

Inconsistency tolerance rigid free configurable typing #instances cardinality constraints

R1

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 5 / 23

slide-6
SLIDE 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

slide-7
SLIDE 7

Requirements and scenarios

R2: Information extension

R2: The user should be able to dis(allow) information extension. Possibility to have (or not):

  • bjects with no type (it is type-safe)

typed objects with fields not in the object type

Information extension untyped

  • bjects

untyped features

R2

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 6 / 23

slide-8
SLIDE 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

slide-9
SLIDE 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

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

slide-10
SLIDE 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

  • ver
  • peration 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

slide-11
SLIDE 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

Generalization multiple inheritance

  • bject-

level

R4

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 8 / 23

slide-12
SLIDE 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

slide-13
SLIDE 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

  • rder of object creation

current modelling phase

manual automatic

process intent

meta-model creation (bottom-up, top-down, blended) model creation

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

slide-14
SLIDE 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

slide-15
SLIDE 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

assistance extensible Process

R6

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 10 / 23

slide-16
SLIDE 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

slide-17
SLIDE 17

Our Proposal

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 11 / 23

slide-18
SLIDE 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 process model ecosystem process supervisor

current phase

configurable model validator

configures feedback

fixes checks check selector fix selector

selects selects «extensible» fix fix fix check check check

phase 1 phase 2 phase 3 phase 4 Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 12 / 23

slide-19
SLIDE 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 * *

  • bjects

* super

Target

* to

  • bject

Integrity Constraint

name: String body: String context

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23

slide-20
SLIDE 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 * *

  • bjects

* super

Target

* to

  • bject

Integrity Constraint

name: String body: String context

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23

slide-21
SLIDE 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 * *

  • bjects

* super

Target

* to

  • bject

Integrity Constraint

name: String body: String context

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23

slide-22
SLIDE 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 * *

  • bjects

* super

Target

* to

  • bject

Integrity Constraint

name: String body: String context

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23

slide-23
SLIDE 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 * *

  • bjects

* super

Target

* to

  • bject

Integrity Constraint

name: String body: String context

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 13 / 23

slide-24
SLIDE 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)

*

  • typings

Model Typing Object Typing Feature Typing TypedElement Typing Featured Typing

* ftypings type instance

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 14 / 23

slide-25
SLIDE 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

slide-26
SLIDE 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

slide-27
SLIDE 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

slide-28
SLIDE 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

slide-29
SLIDE 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

slide-30
SLIDE 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

  • ut *

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

slide-31
SLIDE 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

  • ut *

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

slide-32
SLIDE 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

  • ut *

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

slide-33
SLIDE 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

  • ut *

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

slide-34
SLIDE 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

  • ut *

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

slide-35
SLIDE 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

slide-36
SLIDE 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

slide-37
SLIDE 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 3 5 6 4

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 19 / 23

slide-38
SLIDE 38

Conclusions

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 20 / 23

slide-39
SLIDE 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

slide-40
SLIDE 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

slide-41
SLIDE 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´

  • noma de Madrid (Spain)

Comments? Questions?

Esther Guerra On the Quest for Flexible Modelling MoDELS 2018 23 / 23