keynote extreme modelling 2014

Post on 24-Jan-2015

163 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Slides from my keynote at XM 2014. http://www.di.univaq.it/XM2014/

TRANSCRIPT

Putting Engineering into MDE

Components and contracts for models and transformations

Steffen Zschaler

29 September, 2014With (lots of) help by

Francisco Duran, Jeffrey Terrell, Jendrik Johannes, Dimitris Kolovos, and many others

All errors my own!

(c) Steffen Zschaler

Motivation

• MDE is beginning to see some use– Automotive– Telecommunications– Enterprise systems (especially for quality prediction)

• Need for systematic engineering– To deal with scale of models– To deal with complexity of domains– To ensure correctness so MDE techniques can be

relied on

29/09/2014 2

(c) Steffen Zschaler

Motivation (2)

• Elements of systematic MDE engineering– Requirements– Architectures– (Reusable) Components– Patterns and Architecture Styles– Methods and Guidelines

A re

sea

rch

ag

en

da

for the yea

rs to co

me

29/09/2014 3

(c) Steffen Zschaler

Motivation (2)

• Elements of systematic MDE engineering– Requirements– Architectures– (Reusable) Components– Patterns and Architecture Styles– Methods and Guidelines

A re

sea

rch

ag

en

da

for the yea

rs to co

me

29/09/2014 3

(c) Steffen Zschaler

A framework for discussing composition

Uwe Aßmann: Invasive Software Composition.29/09/2014 4

(c) Steffen Zschaler

A framework for discussing composition

Component Model

(incl. contracts)

Uwe Aßmann: Invasive Software Composition.29/09/2014 4

(c) Steffen Zschaler

A framework for discussing composition

Composition Model(composition

technique)

Component Model

(incl. contracts)

Uwe Aßmann: Invasive Software Composition.29/09/2014 4

(c) Steffen Zschaler

A framework for discussing composition

Composition Language

Composition Model(composition

technique)

Component Model

(incl. contracts)

Uwe Aßmann: Invasive Software Composition.29/09/2014 4

(c) Steffen Zschaler

A framework for discussing composition

Composition System

Composition Language

Composition Model(composition

technique)

Component Model

(incl. contracts)

Uwe Aßmann: Invasive Software Composition.29/09/2014 4

(c) Steffen Zschaler

Outline

1. Motivation

2. Models

3. Transformations

4. Challenges

29/09/2014 5

(c) Steffen Zschaler

Outline

1. Motivation

2. Models

3. Transformations

4. Challenges

1. Composition techniques2. Contracts

29/09/2014 5

(c) Steffen Zschaler

Model components

• Variety of approaches– Model/Package Import– AOM

• Package Merge• Language-specific merges

– E.g., for sequence diagrams– RAM, MATA, ...

• Generic merges– E.g., GeKo, Reuseware, ...

29/09/2014 6

Model componentsExample 1

29/09/2014

Model componentsExample 1

29/09/2014

(c) Steffen Zschaler29/09/2014 8

Model componentsExample 2

(c) Steffen Zschaler29/09/2014 8

Model componentsExample 2

(c) Steffen Zschaler29/09/2014 8

Model componentsExample 2

(c) Steffen Zschaler29/09/2014 8

Model componentsExample 2

(c) Steffen Zschaler29/09/2014 8

Model componentsExample 2

(c) Steffen Zschaler29/09/2014 8

Model componentsExample 2

(c) Steffen Zschaler29/09/2014 8

Model componentsExample 2

(c) Steffen Zschaler

Model componentsContracts?

• Only syntactical, if any– Meta-classes of elements expected– Naming and signatures of operations

• Key exception: Rely-Guarantee Specifications– For temporal logic and state machines

29/09/2014 9

(c) Steffen Zschaler

Syntactic Contracts

29/09/2014 10

(c) Steffen Zschaler

Syntactic Contracts

29/09/2014 10

(c) Steffen Zschaler

Syntactic Contracts

29/09/2014 10

(c) Steffen Zschaler

Outline

1. Motivation

2. Models

3. Transformations

4. Challenges

1. Composition techniques2. Contracts

29/09/2014 11

(c) Steffen Zschaler

Transformation Composition

29/09/2014 12

(c) Steffen Zschaler

Transformation Composition

InternalExternal

29/09/2014 12

(c) Steffen Zschaler

Transformation Composition

InternalExternal

Sequential

T1

M

1

M

2

M

3

T2

29/09/2014 12

(c) Steffen Zschaler

Transformation Composition

InternalExternal

Sequential Rule Superimposition(aka import with replacement)

29/09/2014 12

(c) Steffen Zschaler

Transformation Composition

InternalExternal

Sequential Rule Superimposition(aka import with replacement)

M

2

M

1

29/09/2014 12

(c) Steffen Zschaler

Transformation Composition

InternalExternal

Sequential Parallel Rule Superimposition(aka import with replacement)

T1

M

1

M

2

M

3

T2

M

4

M

5

29/09/2014 12

(c) Steffen Zschaler

Transformation Composition

InternalExternal

Sequential Parallel Rule Superimposition(aka import with replacement)

Rule Weaving(aka full aspect orientation)

29/09/2014 12

(c) Steffen Zschaler

Transformation Composition

InternalExternal

Sequential Parallel Rule Superimposition(aka import with replacement)

Rule Weaving(aka full aspect orientation)

M

2

M

1

29/09/2014 12

(c) Steffen Zschaler

Transformation CompositionSequential

OO to Relational

Class Model

Table Model

29/09/2014 13

(c) Steffen Zschaler

Transformation CompositionSequential

Table Model

NormalisedTable Model

Normalisation

29/09/2014 13

(c) Steffen Zschaler

Transformation CompositionSequential

OO to Relational

Class Model

Table Model

NormalisedTable Model

Normalisation

29/09/2014 13

Transformation Composition

Parallel

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

:Table

<<hook>>:Column

*

Transformation Composition

Parallel

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

:Table

<<hook>>:Column

*:Class

Transformation Composition

Parallel

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

:Table

<<hook>>:Column

*:Class

:Attribute

Transformation Composition

Parallel

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

<<anchor>>:Column

:Table

<<hook>>:Column

*:Class

:Attribute

Transformation Composition

Parallel

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

<<anchor>>:Column

:Table

<<hook>>:Column

*:Class

:Attribute

Transformation Composition

Parallel

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

<<anchor>>:Column

:Table

<<hook>>:Column

*:Class

:Attribute

:Classsuper

sub

Transformation Composition

Parallel

<<anchor>><<slot>>:Table

<<hook>>:Column

*

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

<<anchor>>:Column

:Class

:Attribute

:Classsuper

sub

Transformation Composition

Parallel

<<anchor>><<slot>>:Table

<<hook>>:Column

*

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

<<anchor>>:Column

<<anchor>><<slot>>:Table

<<hook>>:Column

*

:Class

:Attribute

:Classsuper

sub

Transformation Composition

Parallel

<<anchor>><<slot>>:Table

<<hook>>:Column

*

Based on Jendrik Johannes, Steffen Zschaler, Miguel A. Fernández, Antonio Castillo, Dimitrios S. Kolovos, Richard F. Paige: Abstracting Complex Languages through Transformation and Composition. MODELS 2009, LNCS 5795, pp 546–550.

<<anchor>>:Column

<<anchor>><<slot>>:Table

<<hook>>:Column

*

:Class

:Attribute

:Classsuper

sub

Weaving

Weaving

(c) Steffen Zschaler

Transformation Composition

Superimposition

Based on Lawley, M., Duddy, K., Gerber, A., Raymond, K. Language Features for Re-Use and Maintainability of MDA Transformations. OOPSLA & GPCE Workshop, 2004

and: Jouault, F. and Kurtev, I. Transforming models with ATL. In: Satellite Events at the MoDELS 2005 Conference, Oct 2005, Montego Bay, Jamaica. pp. 128-138, LNCS 3844 (long version from http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.99.6117&rep=rep1&type=pdf )

module Class2Relational;create OUT : Relational from IN : Class;

rule Class2Table { from c : Class!Class to out : Relational!Table ( name <- c.name, col <- Sequence {key} ->union(c.attr)), key : Relational!Column ( name <- 'objectId', type <- objectIdType)}

rule Attribute2Column { from a : Class!Attribute to out : Relational!Column ( name <- a.name, type <- a.type)}

29/09/2014 15

(c) Steffen Zschaler

Transformation Composition

Superimposition

Based on Lawley, M., Duddy, K., Gerber, A., Raymond, K. Language Features for Re-Use and Maintainability of MDA Transformations. OOPSLA & GPCE Workshop, 2004

and: Jouault, F. and Kurtev, I. Transforming models with ATL. In: Satellite Events at the MoDELS 2005 Conference, Oct 2005, Montego Bay, Jamaica. pp. 128-138, LNCS 3844 (long version from http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.99.6117&rep=rep1&type=pdf )

module Class2Relational;create OUT : Relational from IN : Class;

rule Class2Table { from c : Class!Class to out : Relational!Table ( name <- c.name, col <- Sequence {key} ->union(c.attr)), key : Relational!Column ( name <- 'objectId', type <- objectIdType)}

rule Attribute2Column { from a : Class!Attribute to out : Relational!Column ( name <- a.name, type <- a.type)}

module Class2RelationalInheritance;create OUT : Relational from IN : Class;

rule Class2Table { from c : Class!Class ( c.parent.oclIsUndefined()) to out : Relational!Table ( name <- c.name, col <- Sequence {key} ->union(c.flattenedFeatures)), key : Relational!Column ( name <- 'objectId', type <- objectIdType)}

-- flattenedFeatures helper not shown.-- It collects all features of a class-- and all its sub-classes

29/09/2014 15

(c) Steffen Zschaler

Transformation Composition

Superimposition

Based on Lawley, M., Duddy, K., Gerber, A., Raymond, K. Language Features for Re-Use and Maintainability of MDA Transformations. OOPSLA & GPCE Workshop, 2004

and: Jouault, F. and Kurtev, I. Transforming models with ATL. In: Satellite Events at the MoDELS 2005 Conference, Oct 2005, Montego Bay, Jamaica. pp. 128-138, LNCS 3844 (long version from http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.99.6117&rep=rep1&type=pdf )

module Class2Relational;create OUT : Relational from IN : Class;

rule Class2Table { from c : Class!Class to out : Relational!Table ( name <- c.name, col <- Sequence {key} ->union(c.attr)), key : Relational!Column ( name <- 'objectId', type <- objectIdType)}

rule Attribute2Column { from a : Class!Attribute to out : Relational!Column ( name <- a.name, type <- a.type)}

module Class2Relational;create OUT : Relational from IN : Class;

rule Class2Table { from c : Class!Class ( c.parent.oclIsUndefined()) to out : Relational!Table ( name <- c.name, col <- Sequence {key} ->union(c.flattenedFeatures)), key : Relational!Column ( name <- 'objectId', type <- objectIdType)}

rule Attribute2Column { from a : Class!Attribute to out : Relational!Column ( name <- a.name, type <- a.type)}

-- flattenedFeatures helper-- not shown...

29/09/2014 15

(c) Steffen Zschaler29/09/2014

Transformation Composition

Weaving

16

(c) Steffen Zschaler29/09/2014

Transformation Composition

Weaving

16

(c) Steffen Zschaler

Contracts

• Need both syntactical and semantic contracts

• Goal:– Be precise enough to enable reasoning and

give assurances– Be lenient enough to maximise reusability

29/09/2014 17

(c) Steffen Zschaler

Contracts (2)

Will look at two types of contracts:– Syntactic contracts for sequential composition

(aka model typing)– Semantic contracts for rule weaving

29/09/2014 18

(c) Steffen Zschaler

Contracts for sequential composition

• Contracts specify the kinds of models read and written by a transformation

• Options:1. Meta-models

2. Effective meta-models

3. Model types / Concepts

OO to Relational

Class Model

Table Model

NormalisedTable Model

Normalisation

29/09/2014 19

Model typing problems

mmo NewSM (s : Simple) { s += new StateMachine ()}

S. Zschaler: Towards Constraint-Based Model Types: A Generalised Formal Foundation for Model Genericity.In VAO’14

Model typing problems

mmo NewSM (s : Simple) { s += new StateMachine ()}

StateMachineState

name: String

Transitionevent: String

initialState0..1

containedState *

src 1

tgt1

incoming*

*outgoing

S. Zschaler: Towards Constraint-Based Model Types: A Generalised Formal Foundation for Model Genericity.In VAO’14

Model typing problems

mmo NewSM (s : Simple) { s += new StateMachine ()}

StateMachineState

name: String

Transitionevent: String

initialState0..1

containedState *

src 1

tgt1

incoming*

*outgoing

Difference between Simple and Mandatory-startMandatory-start <:Steel Simple

S. Zschaler: Towards Constraint-Based Model Types: A Generalised Formal Foundation for Model Genericity.In VAO’14

Model typing problems

mmo NewSM (s : Simple) { s += new StateMachine ()}

StateMachineState

name: String

Transitionevent: String

initialState0..1

containedState *

src 1

tgt1

incoming*

*outgoing

Difference between Simple and Mandatory-start

Error: Allows passing in Mandatory-start instance, but breaks it.

Mandatory-start <:Steel Simple

S. Zschaler: Towards Constraint-Based Model Types: A Generalised Formal Foundation for Model Genericity.In VAO’14

mmo NewSM (s : Simple) { sm := new StateMachine () ; sm.initialState += new State () ; s += sm}

Model typing problems

StateMachineState

name: String

Transitionevent: String

initialState0..1

containedState *

src 1

tgt1

incoming*

*outgoing

Difference between Simple and Mandatory-startMandatory-start <:Guy Simple

S. Zschaler: Towards Constraint-Based Model Types: A Generalised Formal Foundation for Model Genericity.In VAO’14

mmo NewSM (s : Simple) { sm := new StateMachine () ; sm.initialState += new State () ; s += sm}

Model typing problems

StateMachineState

name: String

Transitionevent: String

initialState0..1

containedState *

src 1

tgt1

incoming*

*outgoing

Difference between Simple and Mandatory-start

Over-restriction: Would work with Mandatory-start instance, but cannot specify.

Mandatory-start <:Guy Simple

S. Zschaler: Towards Constraint-Based Model Types: A Generalised Formal Foundation for Model Genericity.In VAO’14

(c) Steffen Zschaler

Syntactic contracts:Research challenges

• Type theory of transformations– Including intrinsic and extrinsic contracts

• Static analysis of transformations– Data flow analysis

• Tool support for managing and checking transformation contracts

29/09/2014 21

(c) Steffen Zschaler

Contracts for rule weaving

29/09/2014 22

(c) Steffen Zschaler

Contracts for rule weaving

29/09/2014 22

(c) Steffen Zschaler

Contracts for rule weaving

• Morphisms over transformation systems– Both for parameter and bindings

• Define Properties of morphisms to ensure semantics of weaving– Behaviour reflection and preservation

Semantic contracts

29/09/2014 23

(c) Steffen Zschaler

• Other semantic properties– Allow some change of behaviour– Express behaviour of base parametrised over

transformations to be woven

Semantic contracts:Research challenges

29/09/2014 24

(c) Steffen Zschaler

• Other semantic properties– Allow some change of behaviour– Express behaviour of base parametrised over

transformations to be woven

Semantic contracts:Research challenges

τM1 M2

29/09/2014 24

(c) Steffen Zschaler

• Other semantic properties– Allow some change of behaviour– Express behaviour of base parametrised over

transformations to be woven

Semantic contracts:Research challenges

τM1 M2

ζ

sem1 sem2

Γ1 Γ229/09/2014 24

(c) Steffen Zschaler

• Other semantic properties– Allow some change of behaviour– Express behaviour of base parametrised over

transformations to be woven

Semantic contracts:Research challenges

τ(τ1, .. , τn)

f(ζ1, .. , ζn)

M1 M2

ζ

sem1 sem2

Γ1 Γ229/09/2014 24

(c) Steffen Zschaler

Outline

1. Motivation

2. Models

3. Transformations

4. Challenges

29/09/2014 25

(c) Steffen Zschaler

Research Agenda

• Need a calculus of transformation components– What do they look like?– What composition operations are there?– What are contracts?– What properties can we derive for composite transformations?

• Some work exists:– See talk– Megamodelling (e.g., MINNT for typing)

• But are still missing fundamental theory

29/09/2014 26

(c) Steffen Zschalerhttp://xkcd.com/1343/

29/09/2014

top related