Presentation is loading. Please wait.

Presentation is loading. Please wait.

McGill University School of Computer Science Ph.D. Candidate in the Modelling, Simulation, and Design Lab MPM’10 Márk Asztalos, Eugene Syriani, Manuel.

Similar presentations


Presentation on theme: "McGill University School of Computer Science Ph.D. Candidate in the Modelling, Simulation, and Design Lab MPM’10 Márk Asztalos, Eugene Syriani, Manuel."— Presentation transcript:

1 McGill University School of Computer Science Ph.D. Candidate in the Modelling, Simulation, and Design Lab MPM’10 Márk Asztalos, Eugene Syriani, Manuel Wimmer, and Marouane Kessentini

2 Towards Transformation Rule Composition MPM’10 OUTLINE  Context  Rule Composition  Composability Criteria  Composition Procedure  Example: UML  EJB 2.0  EJB 3.0  Conclusion 2

3 Towards Transformation Rule Composition MPM’10 CONTEXT 3 Enterprise Development Company RequirementsRequirementsDevelopmentDevelopmentDesignDesignMaintenanceMaintenance

4 Towards Transformation Rule Composition MPM’10 CONTEXT 4 Enterprise Development Company DevelopmentDevelopmentDesignDesign

5 Towards Transformation Rule Composition MPM’10 CONTEXT 5 Enterprise Development Company DevelopmentDevelopmentDesignDesign v2.0 v3.0

6 Towards Transformation Rule Composition MPM’10 AUTOMATICALLY IS IT POSSIBLE TO AUTOMATICALLY DERIVE T3? That is the question 6 UML meta-model EJB 3 meta-model EJB 2 meta-model T3 T1 T2 ?

7 Towards Transformation Rule Composition MPM’10 IS IT POSSIBLE TO AUTOMATICALLY DERIVE T3? In general this is a very hard task rule level Instead we will try to solve the problem at the rule level 7 a1:Package b2:EJBArchive2 a1:Package b3:DeployDesc T c1:EJBArchive2 d2:EJBArchive3 T a1:Package d2:EJBArchive3 a1:Package T T3 T1 T2 UML class TO EJB2 archive EJB2 archive TO EJB3 archive UML class TO EJB3 archive

8 Towards Transformation Rule Composition MPM’10 ASSUMPTIONS Transformation Chain 8 exogenous We assume an exogenous chain of transformations Rules of the transformations are algebraic graph transformation rules [1] traceability links Rules must produce traceability links such that every newly created element must have at least one trace link [1] H. Ehrig, K. Ehrig, U. Prange, G. Taentzer. Fundamentals of Algebraic Graph Transformation. EATCS, Springer-Verlag, 2006. a1:Package d2:EJBArchive3 a1:Package T

9 Towards Transformation Rule Composition MPM’10 WHAT DO WE MEAN BY COMPOSITION? For any model m 1, m 2 = T 1 (m 1 ) and m 3 = T 2 (m 2 ) we define m’ = T 3 (m 1 ) = T 2  T 1 (m 1 ) such that: Soundness & Completeness: – m 1 is preserved in m’ – All elements produced by T 2 are present in m’ – m’ contains no other elements then those in m 3 Elimination: – No element from m 2 shall be present in m’ – No traceability link involving elements from MM 2 must be present in m’ Transitivity – If there is a trace link 12 between an element e 1  m 1 and an element e 2  in m 2 AND there is a trace link 23 between e 2 and an element e 3  m 3 Then there must be a trace link 13  m’ between e 1 and e 3 9

10 Towards Transformation Rule Composition MPM’10 ASSUMPTIONS Composability Criteria 10 Two rules (LHS 1, RHS 1 ) and (LHS 2, RHS 2 ) are composable if: Every element in LHS 2 that is part of MM 2 is present in RHS 1 a1:Package b2:EJBArchive2 a1:Package b3:DeployDesc T c1:EJBArchive2 d2:EJBArchive3 T

11 Towards Transformation Rule Composition MPM’10 RULE COMPOSITION PROCEDURE Composability Criteria The Composability Criteria specifies the pre-condition Composition Definition The Composition Definition specifies the post-condition In [1], Ehrig et. al. have proven that the composition of two graph transformation rules is possible 11 [1] H. Ehrig, K. Ehrig, U. Prange, G. Taentzer. Fundamentals of Algebraic Graph Transformation. EATCS, Springer-Verlag, 2006.

12 Towards Transformation Rule Composition MPM’10 GRAPH TRANSFORMATION RULE APPLICATION 12 right left right left updownupdown right LKR G gLinkgLink gLink pLinkfLink left right left updownupdown H gLink pLinkfLink m If there exists an occurrence of L in G then replace it with R

13 Towards Transformation Rule Composition MPM’10 RULE COMPOSITION PROCEDURE 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’ = r 2  r 1 How to construct the L,K, and R parts of r’? 13 [1] H. Ehrig, K. Ehrig, U. Prange, G. Taentzer. Fundamentals of Algebraic Graph Transformation. EATCS, Springer-Verlag, 2006.

14 Towards Transformation Rule Composition MPM’10 RULE COMPOSITION PROCEDURE Eliminate MM 2 elements and related trace links and compute transitive trace links 14 b2:EJBArchive2 a1:Package b3:DeployDesc a1,b2 d2:EJBArchive3 a1,b3 b2,d2 a1,d2

15 Towards Transformation Rule Composition MPM’10 RULE COMPOSITION PROCEDURE 15 a1:Package b2:EJBArchive2 a1:Package b3:DeployDesc T c1:EJBArchive2 d2:EJBArchive3 T r1:r1: r2:r2: E: b2:EJBArchive2 a1:Package T r3:r3: R3:R3: b2:EJBArchive2 a1:Package b3:DeployDesc T d2:EJBArchive3 T T T a1:Package d2:EJBArchive3 T b2:EJBArchive2 a1:Package T b2:EJBArchive2 a1:Package b3:DeployDesc T c1:EJBArchive2d2:EJBArchive3 T a1:Packaged2:EJBArchive3 T

16 Towards Transformation Rule Composition MPM’10 RULE COMPOSITION PROCEDURE Negative Application Conditions 16 If the NAC of r 1 corresponds to its RHS, then add a NAC to r 3 that corresponds to its RHS If the NAC of r 2 corresponds to its RHS, then it is taken into account when applying r 2 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

17 Towards Transformation Rule Composition MPM’10 SOLVING THE UML  EJB2  EJB3 MIGRATION CASE 17 UML meta-model EJB 3 meta-model EJB 2 meta-model T3 T1 T2

18 Towards Transformation Rule Composition MPM’10 UML  EJB2  EJB3 COMPOSITION UML Class Diagram TO EJB 2.0 18 a1:Package b2:EJBArchive2 a1:Package b3:DeployDesc T a1:Package b2:EJBArchive2 b3:DeployDesc isPersistent = true a4:Class a1:Package b2:EJBArchive2 b3:DeployDesc a4:Class name = a4.name b5:EntityBean name = a4.name b6:Interface b7:EntityEntry T T T a1:Package b2:EJBArchive2 b3:DeployDesc isPersistent = false a4:Class a1:Package b2:EJBArchive2 b3:DeployDesc a4:Class name = a4.name b5:SessionBean name = a4.name b6:Interface b7:SessionEntry isStateful = false T T T R1:R1: R2:R2: R3:R3: b2:EJBArchive2 a1:Package b3:DeployDesc T a1:Package b2:EJBArchive2 b3:DeployDesc a4:Class name = a4.name b5:EntityBean name = a4.name b6:Interface b7:EntityEntry T T a1:Package b2:EJBArchive2 b3:DeployDesc a4:Class name = a4.name b5:SessionBean name = a4.name b6:Interface b7:SessionEntry isStateful = false T T

19 Towards Transformation Rule Composition MPM’10 UML  EJB2  EJB3 COMPOSITION EJB 2.0 TO EJB 3.0 19 R1:R1: R2:R2: R3:R3: c1:EJBArchive2 d2:EJBArchive3 c1:EJBArchive2 d2:EJBArchive3 c4:EntityBean c1:EJBArchive2 d2:EJBArchive3 c4:EntityBean d6:EntityBean d7:Interface name = c4.name c1:EJBArchive2 d2:EJBArchive3 c3:SessionBean c5:SessionEntry c1:EJBArchive2 d2:EJBArchive3 c3:SessionBean c5:SessionEntry d6:SessionBean d7:Interface d8:Stateless isStateful = false name = c3.name T T T T T T T c1:EJBArchive2 d2:EJBArchive3 c3:SessionBean c5:SessionEntry c1:EJBArchive2 d2:EJBArchive3 c3:SessionBean c5:SessionEntry d6:SessionBean d7:Interface d8:Stateful isStateful = true name = c3.name T T T c1:EJBArchive2d2:EJBArchive3 T c1:EJBArchive2 d2:EJBArchive3 c4:EntityBean d6:EntityBean d7:Interface name = c4.name T T c1:EJBArchive2 d2:EJBArchive3 c3:SessionBean c5:SessionEntry d6:SessionBean d7:Interface d8:Stateless name = c3.name T T c1:EJBArchive2 d2:EJBArchive3 c3:SessionBean c5:SessionEntry d6:SessionBean d7:Interface d8:Stateful name = c3.name T T R4:R4:

20 Towards Transformation Rule Composition MPM’10 UML  EJB2  EJB3 COMPOSITION Composability Matrix 20 T 2  T 1 T 2 :R 1 T 2 :R 2 T 2 :R 3 T 2 :R 4 T 1 :R 1 YESNO T 1 :R 2 YES NO T 1 :R 3 YESNOYESNO

21 Towards Transformation Rule Composition MPM’10 UML  EJB2  EJB3 COMPOSITION T 3 :R 1 = T 2 :R 1  T 1 :R 1 21 a1:Package d2:EJBArchive3 a1:Package T d2:EJBArchive3 a1:Package T  = b2:EJBArchive2 a1:Package b3:DeployDesc T b2:EJBArchive2 a1:Package b3:DeployDesc T c1:EJBArchive2 d2:EJBArchive3 T c1:EJBArchive2d2:EJBArchive3 T

22 Towards Transformation Rule Composition MPM’10 c1:EJBArchive2 d2:EJBArchive3 c4:EntityBean c1:EJBArchive2 d2:EJBArchive3 c4:EntityBean d6:EntityBean d7:Interface name = c4.name T T T c1:EJBArchive2 d2:EJBArchive3 c4:EntityBean d6:EntityBean d7:Interface name = c4.name T T UML  EJB2  EJB3 COMPOSITION T 3 :R 2 = T 2 :R 2  T 1 :R 2 22  =

23 Towards Transformation Rule Composition MPM’10 UML  EJB2  EJB3 COMPOSITION T 3 :R 3 = T 2 :R 3  T 1 :R 3 23  =

24 Towards Transformation Rule Composition MPM’10 CONCLUSION 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,...) 24


Download ppt "McGill University School of Computer Science Ph.D. Candidate in the Modelling, Simulation, and Design Lab MPM’10 Márk Asztalos, Eugene Syriani, Manuel."

Similar presentations


Ads by Google