Professional Documents
Culture Documents
Model Transformation and UML
Model Transformation and UML
expressiveness and
complexity
execution and
optimisation
well-definedness
preservation of semantics
maintaining consistency
evolution
translation
execution
of transformations
of models
A math. foundation is
needed for studying
Outline
Graph Transformation
why it is fun
how it works
:Field
:Field
:Field
:Field
:PacMan
marbles=3
:Marble
:Field
instance graph
(represents a
single state;
abstracts from
spatial layout)
typing
Ghost *
1 * PacMan
Field
marbles:int
1
*
Marble
type graph
(specifies legal
instance graphs)
:Marble
f1:Field
f2:Field
pm:PacMan
f1:Field
pm:PacMan
marbles=m+1
collect
f1:Field
pm:PacMan
movePM
f2:Field
f2:Field
f1:Field
f2:Field
:PacMan
f1:Field
f2:Field
g:Ghost
f1:Field
g:Ghost
kill
f1:Field
g:Ghost
moveGhost
f2:Field
f2:Field
f1:Field
f2:Field
Outline
Graph Transformation
why it is fun
how it works
:Field
g:Ghost
:Field
undirected edges as
pairs of directed ones
:Field
:Field
f:Field
Graph homomorphism as
mappings preserving
source and target
:Field
instance graphs G
typed over TG by
homomorphism g
Ghost
Field
Marble
PacMan
marbles:int
TG
Rules
p: L R with L R well-defined, in different
presentations
pm:PacMan
f1:Field
f2:Field
movePM:
pm:PacMan
f1:Field
f2:Field
Rules
p: L R with L R well-defined, in different
presentations
L - R as destroyed
R - L as new
movePM:
pm:PacMan
{destroyed}
f1:Field
{new}
f2:Field
Transformation Step
pm:PacMan
m1:Marble
marbles=m
f2:Field
f1:Field
pm:PacMan
marbles=m+1
f2:Field
oL
f1:Field
oR
f1:Field
m1:Marble
f2:Field
pm:PacMan
marbles=3
f2:Field
f3:Field
m2:Marble
f3:Field
f1:Field
pm:PacMan
marbles=4
m2:Marble
1.
2.
3.
a:A
:B
A bit of History
Chomsky
Grammars
Term
Rewriting
Petri
Nets
Diagram
Languages
Models of
Computation
Behaviour
Modelling and
Visual Programming
Outline
Graph Transformation
why it is fun
how it works
Semantics-preserving
Model Transformation
operational
denotational
operational
semantics
transformation
Abstract
Syntax
denotational
semantics
Semantic
Domain
refactoring of business
processes, replacing
centralised by distributed
execution
Warehouse
Receive
order
How to demonstrate
preservation of behaviour?
1.
specify operational
semantics of processes
2.
define transformations
3.
Office
Shipment
Undo
order
operational
semantics
Abstract
Syntax
transformations as transitions
response
op: String
id: String
to
responsible
Basic
Structured
op: String
Invoke
request
Orch
name: String
src
corresponds Edge tar Node
Switch
Msg
from
current
Abstract
Syntax
Reply
partner
operational
semantics
e:Edge
tar
i:Invoke
partner
current
o1:Orch
o2:Orch
e:Edge
tar
i:Invoke
current
req(i.id, m.id)
partner
request
from m:Msg
to
o1:Orch
id=new()
op=i.op
o2:Orch
operational
semantics
tar
r:Reply
src
Abstract
Syntax
e:Edge
current
o1:Orch
to m1:Msg from
op=r.op
o2:Orch
e:Edge
tar
r:Reply
src
e:Edge
current
reply(r.id, m1.id, m2.id)
o1:Orch
from
to m1:Msgfrom
op=r.op
response
m2:Msg
id=new()
op=r.op
o2:Orch
to
operational
semantics
i:Invoke
src
request
from
o1:Orch
to
Abstract
Syntax
e:Edge
partner
to
m1:Msg
o2:Orch
response
from
m2:Msg
i:Invoke
resp(i.id, m2.id)
current
o1:Orch
src
e:Edge
partner
o2:Orch
Simulation
o1:Orch
current
:Edge
tar
tar
i:Invoke
request
from
:Edge
partner
o2:Orch
current
r:Reply
src
src
:Edge
:Edge
to
to
m1:Msg
m2:Msg
op=i.op
from
op=r.op
response
Observations:req(i.id, m1.id);
reply(r.id, m1.id, m2.id);
resp(i.id, m2.id)
Orch1
Orch 2
delegate
Orch 2
<<receive>>
op
<<invoke>>
Orch2.op
<<reply>>
op
Semantic Compatibility
Processes P1 and P2 are semantically compatible if they are
weakly bisimilar after hiding labels not in alph(P1) alph(P2)
Show for trafo P1 P2 that P2 simulates P1, i.e.
Q2 simulates Q1
P1
obs
Q1
Approach:
P2
obs
Q2
p1
G1
p2
G2
* H *
Critical Pair
LHS of
invoke vs delegate
delete-use-conflict
Outline
Graph Transformation
why it is fun
how it works
Semantics-preserving
Model Transformation
operational
denotational
operational
semantics
transformation
Abstract
Syntax
denotational
semantics
Semantic
Domain
Process Improvement
Motivation:
transform process to
increase flexibility,
performance, ...
preserve behaviour!
Aim: rule-level
verification
Rule-level Verification
L
r/o
G
s(L)
s(G)
semantic domain
Approach:
H
s(R)
s(H)
Works if
Abstract
Syntax
Act
in
in
[not c]
[c]
in
Act
Act
Act
::=
Act
do something
Act
out
ou
t
out
out
Analysis
0
receive order
check availability
[product available]
[product not
available]
calculate prize
notify client
8
send receipt
2
5
Pair Grammar
Abstract
Syntax
Source: wellstructured
activity
diagrams
Target: CSP
denotational
semantics
Semantic
Domain
in
in
in
[not c]
[c]
A:Act
Proc(A)
in
A1:Act
A:Act
A1:Act
::=
A2:Act
do something
A2:Act
out
Proc(A)
ou
t
Proc(A1) ;
::=
Proc(A2)
out
if [c] then Proc(A1)
else Proc(A2)
out
do something
Synthesis
0
receive order
Proc(A0)
Proc(A1) ; Proc(A2)
Proc(A3) ;
Proc (A4) ;
if [product available]
then Proc(A5)
else Proc(A8)
check availability
[product available]
[product not
available]
calculate prize
receive order ;
check availability ;
if [product available]
then calculate prize ;
send receipt
else notify client
notify client
8
send receipt
2
5
Good Enough ?
Visual
abstract syntax or
concrete syntax templates
Bi-directional
Declarative
Expressive ?
Traceable ?
context-free graph
languages only
through naming
conventions
Efficient ?
NP complete parsing
problem
Relevant Theory
Chomsky
Grammars
Term
Rewriting
Petri
Nets
Processes, unfoldings
Event-structures
Stochastic concepts
Verification,