Advertisement

Generic Model Refactorings

  • Naouel Moha
  • Vincent Mahé
  • Olivier Barais
  • Jean-Marc Jézéquel
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5795)

Abstract

Many modeling languages share some common concepts and principles. For example, Java, MOF, and UML share some aspects of the concepts of classes, methods, attributes, and inheritance. However, model transformations such as refactorings specified for a given language cannot be readily reused for another language because their related metamodels may be structurally different. Our aim is to enable a flexible reuse of model transformations across various metamodels. Thus, in this paper, we present an approach allowing the specification of generic model transformations, in particular refactorings, so that they can be applied to different metamodels. Our approach relies on two mechanisms: (1) an adaptation based mainly on the weaving of aspects; (2) the notion of model typing, an extension of object typing in the model-oriented context. We validated our approach by performing some experiments that consisted of specifying three well known refactorings ( Encapsulate Field,Move Method, and Pull Up Method) and applying each of them onto three different metamodels (Java, MOF, and UML).

Keywords

Adaptation Aspect Weaving Genericity Model Typing Refactoring 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Amelunxen, C., Legros, E., Schurr, A.: Generic and reflective graph transformations for the checking and enforcement of modeling guidelines. In: Proceedings of the 2008 IEEE Symposium on Visual Languages and Human-Centric Computing (VLHCC 2008), Washington, DC, USA, pp. 211–218. IEEE Computer Society, Los Alamitos (2008)CrossRefGoogle Scholar
  2. 2.
    Basili, V.R., Briand, L.C., Melo, W.L.: How reuse influences productivity in object-oriented systems. Communications of ACM 39(10), 104–116 (1996)CrossRefGoogle Scholar
  3. 3.
    Biggerstaff, T.J., Perlis, A.J.: Software Reusability Volume I: Concepts and Models, vol. I. ACM Press, Addison-Wesley, Reading (1989)zbMATHGoogle Scholar
  4. 4.
    Blanc, X., Gervais, M.-P., Sriplakich, P.: Model bus: Towards the interoperability of modelling tools. In: Aßmann, U., Aksit, M., Rensink, A. (eds.) MDAFA 2003. LNCS, vol. 3599, pp. 17–32. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  5. 5.
    Blanc, X., Ramalho, F., Robin, J.: Metamodel reuse with mof., pp. 661–675 (2005)Google Scholar
  6. 6.
    Bruce, K.B., Vanderwaart, J.: Semantics-driven language design: Statically type-safe virtual types in object-oriented languages. Electronic Notes in Theoretical Computer Science 20, 50–75 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Clifton, C., Leavens, G.T., Chambers, C., Millstein, T.D.: Multijava: Modular open classes and symmetric multiple dispatch for java. In: Proceedings of the 15th International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pp. 130–145 (2000)Google Scholar
  8. 8.
    Engels, G., Heckel, R., Cherchago, A.: Flexible interconnection of graph transformation modules. In: Kreowski, H.-J., Montanari, U., Orejas, F., Rozenberg, G., Taentzer, G. (eds.) Formal Methods in Software and Systems Modeling. LNCS, vol. 3393, pp. 38–63. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    Odersky, M., et al.: An overview of the scala programming language. Technical Report IC/2004/64, EPFL Lausanne, Switzerland (2004)Google Scholar
  10. 10.
    Fowler, M.: Refactoring – Improving the Design of Existing Code, 1st edn. Addison-Wesley, Reading (1999)zbMATHGoogle Scholar
  11. 11.
    Gibbons, J., Jeuring, J. (eds.): Generic Programming, IFIP TC2/WG2.1 Working Conference on Generic Programming, Dagstuhl, Germany, July 11-12. IFIP Conference Proceedings, vol. 243. Kluwer Academic Publishers, Dordrecht (2003), http://www.comlab.ox.ac.uk/oucl/work/jeremy.gibbons/publications/wcgp-preface.pdf zbMATHGoogle Scholar
  12. 12.
    Hannemann, J., Kiczales, G.: Design pattern implementation in java and aspectj. SIGPLAN Not. 37(11), 161–173 (2002)CrossRefGoogle Scholar
  13. 13.
    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. Applications, languages, and tools, vol. 2, pp. 669–689. World Scientific, Singapore (1999)CrossRefGoogle Scholar
  14. 14.
    Hoffman, B., Pérez, J., Mens, T.: A case study for program refactoring. In: GraBaTs (September 2008)Google Scholar
  15. 15.
    Janssens, D., Demeyer, S., Mens, T.: Case study: Simulation of a lan. Electronic Notes in Theoretical Computer Science 72(4) (2003)Google Scholar
  16. 16.
  17. 17.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  18. 18.
    Kiczales, G., Mezini, M.: Aspect-oriented programming and modular reasoning. In: Proceedings of the 27th international conference on Software engineering (ICSE 2005), pp. 49–58. ACM, New York (2005)Google Scholar
  19. 19.
    Kienzle, J., Abed, W.A., Jacques, K.: Aspect-oriented multi-view modeling. In: AOSD 2009: Proceedings of the 8th ACM international conference on Aspect-oriented software development, pp. 87–98. ACM, New York (2009)Google Scholar
  20. 20.
    Lahire, P., Morin, B., Vanwormhoudt, G., Gaignard, A., Barais, O., Jézéquel, J.-M.: Introducing variability into aspect-oriented modeling approaches. In: Engels, G., Opdyke, B., Schmidt, D.C., Weil, F. (eds.) MODELS 2007. LNCS, vol. 4735, pp. 498–513. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  21. 21.
    Lämmel, R.: Towards Generic Refactoring. In: Proceedings of Third ACM SIGPLAN Workshop on Rule-Based Programming RULE 2002, Pittsburgh, USA, October 5, 14 pages. ACM Press, New York (2002)Google Scholar
  22. 22.
    Mens, T., Van Gorp, P.: A taxonomy of model transformation. Electronic Notes in Theoretical Computer Science 152, 125–142 (2006)CrossRefGoogle Scholar
  23. 23.
    Mili, H., Mili, F., Mili, A.: Reusing software: Issues and research directions. IEEE Transactions of Software Engineering 21(6), 528–562 (1995)CrossRefzbMATHGoogle Scholar
  24. 24.
    Münch, M.: Generic Modelling with Graph Rewriting Systems. PhD thesis, RWTH Aachen, Berichte aus der Informatik (2003)Google Scholar
  25. 25.
    Muller, P.-A., Fleurey, F., Jézéquel, J.-M.: Weaving executability into object-oriented meta-languages. In: Briand, L.C., Williams, C. (eds.) MoDELS 2005. LNCS, vol. 3713, pp. 264–278. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  26. 26.
    Oliveira, B.C.D.S., Gibbons, J.: Scala for generic programmers. In: Hinze, R., Syme, D. (eds.) WGP 2008: Proceedings of the ACM SIGPLAN workshop on Generic programming, pp. 25–36. ACM, New York (2008)Google Scholar
  27. 27.
    OMG. Mof 2.0 core specification. Technical Report formal/06-01-01, OMG, April 2006. OMG Available SpecificationGoogle Scholar
  28. 28.
    OMG. The Object Constraint Language Specification 2.0, OMG Document: ad/03-01-07 (2007)Google Scholar
  29. 29.
    OMG. The uml 2.1.2 infrastructure specification. Technical Report formal/2007-11-04, OMG, April 2007. OMG Available SpecificationGoogle Scholar
  30. 30.
    Steel, J.: Typage de modèles. PhD thesis, Université de Rennes (April 1, 2007)Google Scholar
  31. 31.
    Steel, J., Jézéquel, J.-M.: On model typing. Journal of Software and Systems Modeling (SoSyM) 6(4), 401–414 (2007)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Naouel Moha
    • 1
  • Vincent Mahé
    • 1
  • Olivier Barais
    • 1
  • Jean-Marc Jézéquel
    • 1
  1. 1.INRIA Rennes – Bretagne Atlantique/IRISA,Université Rennes 1, Triskell TeamRennes CedexFrance

Personalised recommendations