Software & Systems Modeling

, Volume 11, Issue 1, pp 111–125 | Cite as

Reusable model transformations

  • Sagar Sen
  • Naouel Moha
  • Vincent Mahé
  • Olivier Barais
  • Benoit Baudry
  • Jean-Marc Jézéquel
Theme Section

Abstract

Model transformations written for an input metamodel may often apply to other metamodels that share similar concepts. For example, a transformation written to refactor Java models can be applicable to refactoring UML class diagrams as both languages share concepts such as classes, methods, attributes, and inheritance. Deriving motivation from this example, we present an approach to make model transformations reusable such that they function correctly across several similar metamodels. Our approach relies on these principal steps: (1) We analyze a transformation to obtain an effective subset of used concepts. We prune the input metamodel of the transformation to obtain an effective input metamodel containing the effective subset. The effective input metamodel represents the true input domain of transformation. (2) We adapt a target input metamodel by weaving it with aspects such as properties derived from the effective input metamodel. This adaptation makes the target metamodel a subtype of the effective input metamodel. The subtype property ensures that the transformation can process models conforming to the target input metamodel without any change in the transformation itself. We validate our approach by adapting well known refactoring transformations (Encapsulate Field, Move Method, and Pull Up Method) written for an in-house domain-specific modeling language (DSML) to three different industry standard metamodels (Java, MOF, and UML).

Keywords

Adaptation Aspect weaving Genericity Metamodel pruning Model typing Model transformation Refactoring 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Biggerstaff T.J., Perlis A.J.: Software Reusability Volume I: Concepts and Models, vol. 1. ACM Press, Addison-Wesley, Reading (1989)Google Scholar
  2. 2.
    Mili H., Mili F., Mili A.: Reusing software: Issues and research directions. IEEE Trans. Softw. Eng. 21(6), 528–562 (1995)CrossRefGoogle Scholar
  3. 3.
    Basili V.R., Briand L.C., Melo W.L.: How reuse influences productivity in object-oriented systems. Commun. ACM 39(10), 104–116 (1996)CrossRefGoogle Scholar
  4. 4.
    Blanc, X., Ramalho, F., Robin, J.: Metamodel reuse with MOF. In: ACM/IEEE 8th International Conference on Model Driven Engineering Languages and Systems (MODELS’05), pp. 661–675 (2005)Google Scholar
  5. 5.
    Steel, J.: Typage de modèles. PhD thesis, Université de Rennes 1 (2007)Google Scholar
  6. 6.
    Sen, S., Moha, N., Baudry, B., Jezequel, J.M.: Meta-model pruning. In: ACM/IEEE 12th International Conference on Model Driven Engineering Languages and Systems (MODELS’09). Springer, Berlin (2009)Google Scholar
  7. 7.
    Steel J., Jézéquel J.M.: On model typing. J. Softw. Syst. Model. (SoSyM) 6(4), 401–414 (2007)CrossRefGoogle Scholar
  8. 8.
    Moha, N., Mahé, V., Barais, O., Jézéquel, J.M.: Generic Model Refactorings. In: ACM/IEEE 12th International Conference on Model Driven Engineering Languages and Systems (MODELS’09), Springer, Berlin (2009)Google Scholar
  9. 9.
    Fowler M.: Refactoring – Improving the Design of Existing Code. 1st edn. Addison-Wesley, Boston (1999)Google Scholar
  10. 10.
    Moha, N., Sen, S., Faucher, C., Barais, O., Jézéquel, J.M.: Evaluation of Kermeta on Graph Transformation Problems. Int. J. Softw. Tools Technol. Transf. (STTT) (2010) (To appear)Google Scholar
  11. 11.
    Mens T., Van Gorp P.: A taxonomy of model transformation. Electron. Notes Theoret. Comput. Sci. 152, 125–142 (2006)CrossRefGoogle Scholar
  12. 12.
    Janssens, D., Demeyer, S., Mens, T.: Case study: Simulation of a LAN. Electron. Notes Theoret. Comput. Sci. 72(4) (2003)Google Scholar
  13. 13.
    Hoffman, B., Pérez, J., Mens, T.: A case study for program refactoring. In: 4th International Workshop on Graph-Based Tools (GraBaTs’08) (2008)Google Scholar
  14. 14.
    OMG: MOF 2.0 core specification. Technical Report formal/06-01-01, OMG (2006)Google Scholar
  15. 15.
    OMG: The UML 2.1.2 infrastructure specification. Technical Report formal/2007-11-04, OMG (2007)Google Scholar
  16. 16.
    OMG: Architecture-driven modernization (ADM): Abstract syntax tree metamodel (ASTM) 1.0 - beta 2. Technical Report ptc/09-07-06, OMG (2009)Google Scholar
  17. 17.
    Muller, P.A., Fleurey, F., Jézéquel, J.M.: Weaving executability into object-oriented meta-languages. In: ACM/IEEE 8th International Conference on Model Driven Engineering Languages and Systems (MODELS’05), pp. 264–278. Springer, Berlin (2005)Google Scholar
  18. 18.
    Clifton, C., Leavens, G.T., Chambers, C., Millstein, T.D.: Multijava: Modular open classes and symmetric multiple dispatch for java. In: 15th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA’00), pp. 130–145 (2000)Google Scholar
  19. 19.
    OMG: The Object Constraint Language Specification 2.0. Technical Report ad/03-01-07, OMG (2003)Google Scholar
  20. 20.
    Bruce K.B., Vanderwaart J.: Semantics-driven language design: Statically type-safe virtual types in object-oriented languages. Electron. Notes Theoret. Comput. Sci. 20, 50–75 (1999)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Kermeta: http://www.kermeta.org/. Accessed on April 2010
  22. 22.
    Gibbons, J., Jeuring, J., (eds.): Generic Programming. Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming, Kluwer Academic Publishers, Boston (2003)Google Scholar
  23. 23.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.M., Irwin, J.: Aspect-oriented programming. In: 11th European Conference on Object-Oriented Programming (ECOOP’97), vol. 1241, pp. 220–242. Springer, Berlin (1997)Google Scholar
  24. 24.
    Hannemann J., Kiczales G.: Design pattern implementation in Java and AspectJ. SIGPLAN Not. 37(11), 161–173 (2002)CrossRefGoogle Scholar
  25. 25.
    Kiczales, G., Mezini, M.: Aspect-oriented programming and modular reasoning. In: 27th International Conference on Software Engineering (ICSE’05), pp. 49–58. ACM Press, New York (2005)Google Scholar
  26. 26.
    Oliveira B., Gibbons J.: Scala for generic programmers. In: Hinze, R., Syme, D. (eds) SIGPLAN Workshop on Generic Programming (WGP’08), pp. 25–36. ACM Press, New York (2008)CrossRefGoogle Scholar
  27. 27.
    Lämmel, R.: Towards generic refactoring. In: 3rd SIGPLAN Workshop on Rule-Based Programming (RULE’02), pp. 15–28. ACM Press, New York (2002)Google Scholar
  28. 28.
    Odersky, M., et al.: An overview of the Scala programming language. Technical Report IC/2004/64. EPFL Lausanne, Switzerland (2004)Google Scholar
  29. 29.
    Blanc, X., Gervais, M.P., Sriplakich, P.: Model Bus : Towards the interoperability of modelling tools. In: European Workshop on Model Driven Architecture: Foundations and Applications (MDAFA’04). Volume 3599 of LNCS, pp. 17–32. Springer, Berlin (2004)Google Scholar
  30. 30.
    Amelunxen, C., Legros, E., Schurr, A.: Generic and reflective graph transformations for the checking and enforcement of modeling guidelines. In: IEEE Symposium on Visual Languages and Human-Centric Computing (VLHCC’08), pp. 211–218, IEEE Computer Society, Washington, DC (2008)Google Scholar
  31. 31.
    Münch, M.: Generic Modelling with Graph Rewriting Systems. PhD thesis, Berichte aus der Informatik. RWTH Aachen, Aachen (2003)Google Scholar
  32. 32.
    Heckel, R., Engels, G., Ehrig, H., Taentzer, G.: Classification and comparison of module concepts for graph transformation systems. In: Handbook of graph grammars and computing by graph transformation: vol. 2: applications, languages, and tools, pp. 639–689. World Scientific Publishing Co., Inc., Hackensack (1999)Google Scholar
  33. 33.
    Engels, G., Heckel, R., Cherchago, A.: Flexible interconnection of graph transformation modules. In: Formal Methods in Software and Systems Modeling. vol. 3393 of LNCS., pp. 38–63. Springer, Berlin (2005)Google Scholar
  34. 34.
    Lahire, P., Morin, B., Vanwormhoudt, G., Gaignard, A., Barais, O., Jézéquel, J.M.: Introducing variability into aspect-oriented modeling approaches. In: ACM/IEEE 10th International Conference on Model Driven Engineering Languages and Systems (MODELS’07). LNCS, pp. 498–513. Springer, Berlin (2007)Google Scholar
  35. 35.
    Ramos, R., Barais, O., Jézéquel, J.M.: Matching model-snippets. In: ACM/IEEE 10th International Conference on Model Driven Engineering Languages and Systems (MODELS’07). LNCS, pp. 121–135. Springer, Berlin (2007)Google Scholar

Copyright information

© Springer-Verlag 2010

Authors and Affiliations

  • Sagar Sen
    • 1
  • Naouel Moha
    • 1
  • Vincent Mahé
    • 1
  • Olivier Barais
    • 1
  • Benoit Baudry
    • 1
  • Jean-Marc Jézéquel
    • 1
  1. 1.INRIA Rennes, Bretagne Atlantique/IRISAUniversité Rennes 1Rennes CedexFrance

Personalised recommendations