Loading in 5 sec....

Towards Transformation Rule CompositionPowerPoint Presentation

Towards Transformation Rule Composition

- 74 Views
- Uploaded on
- Presentation posted in: General

Towards Transformation Rule Composition

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Márk Asztalos, Eugene Syriani,Manuel Wimmer, and MarouaneKessentini

- Context
- Rule Composition
- Composability Criteria
- Composition Procedure

- Example: UML EJB 2.0 EJB 3.0
- Conclusion

Enterprise Development Company

Requirements

Design

Development

Maintenance

Enterprise Development Company

Design

Development

Enterprise Development Company

Design

Development

v2.0

v3.0

EJB 3 meta-model

UML meta-model

?

T3

T1

T2

EJB 2 meta-model

- In general this is a very hard task
- Instead we will try to solve the problem at the rule level

UML class TO EJB2 archive

b2:EJBArchive2

a1:Package

a1:Package

T

T3

b3:DeployDesc

UML class TO EJB3 archive

c1:EJBArchive2

d2:EJBArchive3

c1:EJBArchive2

T

T1

T2

a1:Package

a1:Package

d2:EJBArchive3

T

EJB2 archive TO EJB3 archive

Transformation Chain

- We assume an exogenous chain of transformations
- Rules of the transformations are algebraic graph transformation rules [1]
- Rules must produce traceability links such that every newly created element must have at least one trace link

a1:Package

a1:Package

d2:EJBArchive3

T

[1] H. Ehrig, K. Ehrig, U. Prange, G. Taentzer. Fundamentals of Algebraic Graph Transformation.EATCS, Springer-Verlag, 2006.

For any model m1, m2 = T1(m1) and m3 = T2(m2) we definem’ = T3(m1) = T2 T1(m1) such that:

- Soundness & Completeness:
- m1 is preserved in m’
- All elements produced by T2 are present in m’
- m’ contains no other elements then those in m3

- Elimination:
- No element from m2 shall be present in m’
- No traceability link involving elements from MM2 must be present in m’

- Transitivity
- If there is a trace link 12 between an element e1 m1 and an element e2 in m2AND there is a trace link 23 between e2 and an element e3 m3Then there must be a trace link 13 m’ between e1 and e3

Composability Criteria

Two rules (LHS1 , RHS1) and (LHS2 , RHS2) are composable if:

Every element in LHS2 that is part of MM2 is present in RHS1

b2:EJBArchive2

a1:Package

a1:Package

T

b3:DeployDesc

c1:EJBArchive2

d2:EJBArchive3

c1:EJBArchive2

T

- The Composability Criteria specifies the pre-condition
- The Composition Definition specifies the post-condition
- In [1], Ehrig et. al. have proven that the composition of two graph transformation rules is possible

[1] H. Ehrig, K. Ehrig, U. Prange, G. Taentzer. Fundamentals of Algebraic Graph Transformation.EATCS, Springer-Verlag, 2006.

L

R

K

gLink

gLink

right

right

m

right

gLink

right

gLink

left

up

down

up

down

left

right

up

down

up

down

right

pLink

fLink

left

pLink

fLink

G

left

H

If there exists an occurrence of L in G then replace it with R

- In [1], Ehrig et. al. have proven that the composition of two graph transformation rules is possible
- By computing the so-called E-concurrent graph of the two rules

- BUT the theorem does not say how to precisely construct the new rule
r’ = r2 r1

- How to construct the L,K, and R parts of r’?

[1] H. Ehrig, K. Ehrig, U. Prange, G. Taentzer. Fundamentals of Algebraic Graph Transformation.EATCS, Springer-Verlag, 2006.

Eliminate MM2 elements and related trace links and compute transitive trace links

b2:EJBArchive2

d2:EJBArchive3

a1,b2

b2,d2

a1:Package

a1,d2

b3:DeployDesc

a1,b3

E:

T

a1:Package

d2:EJBArchive3

R3:

b2:EJBArchive2

b2:EJBArchive2

b2:EJBArchive2

b2:EJBArchive2

r1:

a1:Package

a1:Package

a1:Package

a1:Package

a1:Package

T

T

T

T

b3:DeployDesc

b3:DeployDesc

b2:EJBArchive2

T

T

r2:

c1:EJBArchive2

c1:EJBArchive2

c1:EJBArchive2

d2:EJBArchive3

d2:EJBArchive3

T

T

a1:Package

d2:EJBArchive3

T

b3:DeployDesc

T

r3:

- a1:Package

- a1:Package

d2:EJBArchive3

T

Negative Application Conditions

- If the NAC of r1 corresponds to its RHS, then add a NAC to r3 that corresponds to its RHS
- If the NAC of r2 corresponds to its RHS, then it is taken into account when applying r2 on E
- Considering other arbitrary NACs is not trivial, as they can be
- Overlapping with the LHS
- Completely independent from the LHS
In either case, need knowledge of other rules involved

EJB 3 meta-model

UML meta-model

T3

T1

T2

EJB 2 meta-model

UML Class Diagram TO EJB 2.0

b2:EJBArchive2

b2:EJBArchive2

R1:

a1:Package

a1:Package

a1:Package

T

T

b3:DeployDesc

b3:DeployDesc

a4:Class

b6:Interface

b5:SessionBean

b6:Interface

b6:Interface

b5:SessionBean

b6:Interface

b5:EntityBean

a4:Class

b5:EntityBean

b2:EJBArchive2

b2:EJBArchive2

name = a4.name

name = a4.name

name = a4.name

name = a4.name

isPersistent = false

isPersistent = true

name = a4.name

name = a4.name

name = a4.name

name = a4.name

T

T

b2:EJBArchive2

b3:DeployDesc

b3:DeployDesc

a1:Package

a1:Package

T

b7:EntityEntry

b7:EntityEntry

R2:

b3:DeployDesc

a1:Package

a4:Class

a4:Class

T

T

b2:EJBArchive2

b2:EJBArchive2

T

T

b2:EJBArchive2

b3:DeployDesc

b3:DeployDesc

a1:Package

a1:Package

T

b7:SessionEntry

b7:SessionEntry

b3:DeployDesc

R3:

isStateful = false

isStateful = false

a1:Package

a4:Class

T

a4:Class

T

EJB 2.0 TO EJB 3.0

R1:

c1:EJBArchive2

d2:EJBArchive3

c1:EJBArchive2

c1:EJBArchive2

d2:EJBArchive3

T

T

d2:EJBArchive3

T

d2:EJBArchive3

T

d2:EJBArchive3

T

c1:EJBArchive2

c1:EJBArchive2

d6:EntityBean

R2:

d6:EntityBean

name = c4.name

c1:EJBArchive2

name = c4.name

c4:EntityBean

T

c4:EntityBean

T

d7:Interface

d7:Interface

c4:EntityBean

name = c4.name

name = c4.name

d2:EJBArchive3

d2:EJBArchive3

T

d2:EJBArchive3

T

T

d6:SessionBean

d6:SessionBean

c1:EJBArchive2

c1:EJBArchive2

c1:EJBArchive2

R3:

name = c3.name

name = c3.name

c3:SessionBean

d7:Interface

c3:SessionBean

d7:Interface

c3:SessionBean

T

T

name = c3.name

name = c3.name

c5:SessionEntry

c5:SessionEntry

c5:SessionEntry

d8:Stateless

isStateful = false

d8:Stateless

d2:EJBArchive3

T

d2:EJBArchive3

d2:EJBArchive3

T

T

d6:SessionBean

d6:SessionBean

c1:EJBArchive2

c1:EJBArchive2

R4:

c1:EJBArchive2

name = c3.name

name = c3.name

d7:Interface

c3:SessionBean

c3:SessionBean

d7:Interface

c3:SessionBean

T

T

name = c3.name

name = c3.name

c5:SessionEntry

c5:SessionEntry

d8:Stateful

c5:SessionEntry

d8:Stateful

isStateful = true

Composability Matrix

T3:R1 = T2:R1 T1:R1

b2:EJBArchive2

b2:EJBArchive2

c1:EJBArchive2

d2:EJBArchive3

c1:EJBArchive2

c1:EJBArchive2

d2:EJBArchive3

T

T

a1:Package

a1:Package

a1:Package

T

T

b3:DeployDesc

b3:DeployDesc

=

a1:Package

d2:EJBArchive3

a1:Package

d2:EJBArchive3

a1:Package

T

T

T3:R2 = T2:R2 T1:R2

d2:EJBArchive3

T

d2:EJBArchive3

T

d2:EJBArchive3

T

c1:EJBArchive2

c1:EJBArchive2

d6:EntityBean

d6:EntityBean

name = c4.name

c1:EJBArchive2

name = c4.name

c4:EntityBean

T

c4:EntityBean

T

d7:Interface

d7:Interface

c4:EntityBean

name = c4.name

name = c4.name

=

T3:R3 = T2:R3 T1:R3

=

- Composition procedure
- Given two transformation rules
- Produces the composite of the two rules (transitive closure)

- Composition detection
- Implemented in
- ATL: compiled to graph transformation rules
- EMF Tiger:
- detect composable rules
- Output the composite rule

- How to deal with more complex transformation?
- Arbitrary NACs
- Arbitrary attribute constraints
- Workflow structure (priority, layer, explicit control flow, ...)