11.07.2015 Views

Generating JMI model transformation code from UML profile models ...

Generating JMI model transformation code from UML profile models ...

Generating JMI model transformation code from UML profile models ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Segravis School on Foundations of Visual Modelling Techniques, May 2004, Schloss Dagstuhl<strong>Generating</strong><strong>JMI</strong> <strong>model</strong> <strong>transformation</strong> <strong>code</strong><strong>from</strong> <strong>UML</strong> <strong>profile</strong> <strong>model</strong>s for SDMAligning Graph Rewriting with MDA-lightPieter Van GorpHans SchippersFormal Techniques in Software Engineering{Pieter.VanGorp,Hans.Schippers}@ua.ac.be


2/24Overview1. Demo 1:– Fujaba Refactoring Cycle– Refactoring Implementation¸ Pull Up Method2. Problem: Tool Lock-In3. Solution: (Reflective) MDA Light4. Demo 2:– Integrated Tool Context– Pull Up Method Refactoring¸ Pull Up Method


3/24Fujaba Refactoring Cycle3Execute RefactoringImport Java Sources(by directory)2Rearrange diagrams4regenerate1parseOld SourcesNew Sources


4/24Refactoring: Structural DesignFujaba’s Meta<strong>model</strong>Example Refactoring Classes


5/24Refactoring Behavior: SDMModel Transformation as Graph Transformation1. Bind method> (Hidden) Cast target2. Bind container> Link Navigation3. Bind stub> Link Navigation4. Bind superclass> Link Navigation5. Remove method<strong>from</strong> container6. Add methodto superclass


6/24Constraint Checking: SDM[p1.getIndex()][ failure]


7/24Overview1. Demo 1:– Fujaba Refactoring Cycle– Refactoring Implementation¸ Pull Up Method2. Problem: Tool Lock-In3. Solution: (Reflective) MDA Light4. Demo 2:– Integrated Tool Context– Pull Up Method Refactoring¸ Pull Up Method


8/24Problem: Vendor Lock-In1. SDM could only be drawn in Fujaba• Industry Requires Commercial Support2. Fujaba <strong>code</strong> generator assumes target repositorycomplies to Fujaba API.• XMI + <strong>JMI</strong> + EMF + … desirable


9/24Solution: Reflective MDA Light1. SDM could only be drawn in Fujaba• Solution: <strong>UML</strong> Profile for SDM2. Fujaba <strong>code</strong> generator assumes target repositorycomplies to Fujaba API.• Solution: Pluggable Code TemplatesBézivin, J., Farcet, N., Jézéquel, J.-M., Langlois, B., Pollet, D. Reflective Model Driven Engineering. <strong>UML</strong> 2003, October, 2003


Reflective Architecture10/24


Reflective Architecture (cont.)11/24


12/24Example “Fujaba vs <strong>JMI</strong> Specific Code”<strong>JMI</strong>:// delete linkmethod.setOwner(null)// create linkmethod.setOwner(superclass);


13/24Overview1. Demo 1:– Fujaba Refactoring Cycle– Refactoring Implementation¸ Pull Up Method2. Problem: Tool Lock-In3. Solution: (Reflective) MDA Light4. Demo 2:– Integrated Tool Context– Pull Up Method Refactoring¸ Pull Up Method


14/24Integrated Tool ContextNetBeans MDRPoseidon (or …):TransformationSpecificationsSDM as<strong>UML</strong> 1.4 ProfileXMIMM as ClassDiagramPoseidon embedded MDR“Application” Models<strong>JMI</strong> Manipulation+ Poseidon Plugin Code


15/24MM Class Diagram in PoseidonMeta<strong>model</strong> Class Diagram


16/24Transformation ComponentSDM GT GTSpecificationsStereotypes as flags


17/24High Level SDM Control Flow


Code Activity(demo purpose only)18/24


19/24Loop Activity(again with stereotype)Use tagged value as reference


20/24Create LinksPath NavigationRemove Links


Attribute Assignments(demo purpose only)21/24


22/24Compiler Results‣ <strong>JMI</strong> RepositoryManipulation Code– View Updating throughsmall “hack”…‣ Poseidon Plugin– Extra menu item forlaunching <strong>transformation</strong>


23/24Conclusions (1/2)1. Now <strong>transformation</strong> writers can…• Create visual <strong>model</strong> <strong>transformation</strong>s in Magicdraw, Together,Objecteering, Poseidon, …• Execute them on <strong>JMI</strong> repositories (opt: CASE tool plugins)2. Now, Fujaba can…• be migrated to MDR3. Now, other CASE tool vendors can…• Provide a plugin for enhanced visualization (cfr. nesting)


24/24Conclusions (2/2)‣ Lessons Learned– MDA Light¸ <strong>UML</strong> Profiles: adequate if MM close to <strong>UML</strong>¸ Code Templates: reuse problems– Graph Rewriting¸ Convenient for specifying Refactorings‣ Future Work– EMF support… if necessary, solve reuse problems with stepwise refinement– Model Refinement & Weaving Case Studies– Compare to (and align with) ATLPublications– Pieter Van Gorp, Niels Van Eetvelde, and Dirk Janssens. Implementing Refactorings as Graph Rewrite Rules on aPlatform Independent Metamode. In Proceedings of the 1st International Fujaba Days. University of Kassel,Germany October 13-14, 2003.– Hans Schippers. <strong>JMI</strong> Conforme Model Transformator Generator (JCMTG). Master Thesis, University of Antwerp,2004. Upcoming Paper...

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!