Software & Systems Modeling

, Volume 16, Issue 2, pp 469–497 | Cite as

Aspectual templates in UML

Enhancing the semantics of UML templates in OCL
  • Gilles Vanwormhoudt
  • Olivier Caron
  • Bernard Carré
Regular Paper

Abstract

UML Templates allow to capture reusable models through parameterization. The construct is general enough to be used in many ways, ranging from the representation of generic components (such as Java generics or C++ templates) to aspectual usage, including pattern-, aspect- and view-oriented modeling. We concentrate on this last usage and so-called aspectual templates which require that parameters must form a model of systems in which to inject new functionalities. Starting from this strict constraint, we derive an in-depth semantic enhancement of the standard. It is formalized as a fully UML-compliant interpretation in OCL of the template construct and its binding mechanism. In particular, this aspectual interpretation must be ensured in case of partial binding (not all parameters are valued). Partial binding of UML is a powerful technique which allows to obtain richer templates from the composition of other ones. As a major result, the present semantic enhancement is consistent with this capacity so that partial binding of aspectual templates produces aspectual templates. Finally, at an operational level, an algorithm for aspectual template (partial) binding operation is formulated and consequent reusable technology made available in EMF (Eclipse Modeling Framework) is presented.

Keywords

Model templates UML OCL  Metamodeling Aspects Patterns  Template composition 

Notes

Acknowledgments

The authors would like to thank Prof. R. France, Prof. M. Chechik and the anonymous reviewers for their work, specifically for their remarks on the generalization of the results.

References

  1. 1.
    MDA. Home Page. http://www.omg.org/mda
  2. 2.
    Abed, W.A., Bonnet, V., Schöttle, M., Alam, O., Kienzle, J.: Touchram: a multitouch-enabled tool for aspect-oriented software design. In: Proceedings of the 5th International Conference on Software Language Engineering (SLE’12), vol. LNCS 7745. Springer (2012)Google Scholar
  3. 3.
    Bergmayr, A., Troya, J., Neubauer, P., Wimmer, M., Kappel, G.: UML-based cloud application modeling with libraries, profiles and templates. In: Proceedings of CloudMDE Workshop at MODELS’2014 (2014)Google Scholar
  4. 4.
    Bigot, J., Pérez, Ch.: Increasing reuse in component models through genericity. In: Proceedings of the 11th International Conference on Software Reuse, ICSR ’09, vol. 5791 of LNCS, pp. 21–30. Springer (2009)Google Scholar
  5. 5.
    Bruce, Kim B., Schuett, Angela, van Gent, Robert, Fiech, Adrian: Polytoil: a type-safe polymorphic object-oriented language. ACM Trans. Program. Lang. Syst. 25(2), 225–290 (2003)CrossRefGoogle Scholar
  6. 6.
    Caron, O., Carré, B., Debrauwer, L.: Contextualization of OODB schemas in CROME. In: Proceedings of the 11th International Conference on Database and Expert Systems Applications DEXA 2000, vol. 1873 of LNCS, pp. 135–149. Springer (2000)Google Scholar
  7. 7.
    Caron, O., Carré, B., Muller, A., Vanwormhoudt, G.: Programmation par objets structurée en contextes. Revue L’OBJET, Hermes–Lavoisier 13(2–3), 11–42 (2007)Google Scholar
  8. 8.
    Caron, O., Carré, B., Muller, A., Vanwormhoudt, G.: An OCL formulation of UML 2 template binding. In: Proceedings of 7th International Conference on The Unified Modeling Language. Model Languages and Applications (UML 2004), vol. 3273 of LNCS, pp. 27–40. Springer (2004)Google Scholar
  9. 9.
    Caron, O., Carré, B., Muller, A., Vanwormhoudt, G.: A coding framework for functional adaptation of coarse-grained components in extensible EJB servers. In: 47th International Conference Objects, Models, Components, Patterns (Tools’09), number 33 in LNBIP, pp. 215–230. Springer (2009)Google Scholar
  10. 10.
    Carré, B., Vanwormhoudt, G., Caron, O.: From subsets of model elements to submodels, a characterization of submodels and their properties. Softw. Syst. Model. (2013). doi: 10.1007/s10270-013-0340-x
  11. 11.
    Clark, T., Evans, A., Stuart, K.: Aspect-oriented metamodelling. Comput. J. 46(5), 566–577 (2003)CrossRefMATHGoogle Scholar
  12. 12.
    Clarke, S.: Extending standard UML with model composition semantics. In: Science of Computer Programming, vol. 44, pp. 71–100. Elsevier Science (2002)Google Scholar
  13. 13.
    Clarke, S., Walker, R.J.: Composition patterns: an approach to designing reusable aspects. In: Proceedings of the 23rd International Conference on Software Engineering, ICSE 2001, vol. 1, pp. 5–14. IEEE Computer Society (2001)Google Scholar
  14. 14.
    Clarke, S., Walker, R.J.: Generic aspect-oriented design with Theme/UML. In: Aspect-oriented software development, pp 425–458. Addison-Wesley Professional (2004)Google Scholar
  15. 15.
    Cuccuru, A., Mraidha, C., Terrier, F., Sébastien, G.: Templatable metamodels for semantic variation points. In: Proceedings of Model Driven Architecture- Foundations and Applications, vol. LNCS 4530. Springer, Berlin (2007)Google Scholar
  16. 16.
    Cuccuru, A., Radermacher, A., Gérard, S., Terrier, F.: Constraining type parameters of UML 2 templates with substitutable classifiers. In: Proceedings of 13th International Conference on Model Driven Engineering Languages and Systems (MoDELS’09), vol. 5795 of LNCS. Springer (2009)Google Scholar
  17. 17.
    de Lara, J., Guerra, E.: Generic meta-modelling with concepts, templates and mixin layers. In: Proceedings of the 13th International Conference on Model Driven Engineering Languages and Systems, MODELS 2010, vol. LNCS 6394. Springer (2010)Google Scholar
  18. 18.
    de Lara, J., Guerra, E.: From types to type requirements: genericity for model-driven engineering. Softw. Syst. Model. 12(3), 453–474 (2013)CrossRefGoogle Scholar
  19. 19.
    Dingel, J., Diskin, Z., Zito, A.: Understanding and improving UML package merge. Softw. Syst. Model. 7(4), 443–467 (2008)CrossRefGoogle Scholar
  20. 20.
    D’Souza, D., Wills, A.: Objects, components and frameworks with UML: the catalysis approach. Addison-Wesley, Boston (1999)Google Scholar
  21. 21.
    Ernst, E.: Family polymorphism. In: Jorgen, L.K. (ed.) Proceedings of 15th European Conference on Object-Oriented Programming - ECOOP 2001, vol. LNCS 2072. Springer, Berlin, Heidelberg (2001)Google Scholar
  22. 22.
    Garrigos, I., Wimmer, M., Mazon, J-N.: Weaving aspect-orientation into web modeling languages. In: Current Trends in Web Engineering, vol. 8295 of LNCS. Springer (2013)Google Scholar
  23. 23.
    Guy, C., Combemale, B., Derrien, S., Steel, J., Jézéquel, J.M.: On model subtyping. In: Proccedings of 8th European Conference on Modelling Foundations and Applications (ECMFA 2012), vol. 7349 of LNCS, pp. 400–415. Springer (2012)Google Scholar
  24. 24.
    Jézéquel, J.M.: Model driven design and aspect weaving. Softw. Syst. Model. 7(2), 209–218 (2008)CrossRefGoogle Scholar
  25. 25.
    Kent, S.: Model driven engineering. In: Proceedings of the 3rd International Conference on Integrated Formal Methods, vol. 2335 of LNCS, pp. 286–298. Springer (2002)Google Scholar
  26. 26.
    Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J-M., Irwin, J.: Aspect-Oriented Programming. In: Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP’97), vol. 1241, pp. 220–242. Springer (1997)Google Scholar
  27. 27.
    Kienzle, J., Al Abed, W., Fleurey, F., Jézéquel, J-M., Klein, J.: Aspect-Oriented Design with Reusable Aspect Models. In: Transactions on Aspect-Oriented Software Development VII - A Common Case Study for Aspect-Oriented Modeling, vol. 6210 of LNCS, pp. 272–320. Springer (2010)Google Scholar
  28. 28.
    Klein, J., Hélouët, L., Jézéquel, J.M.: Semantic-based weaving of scenarios. In: Proceedings of the 5th International Conference on Aspect-Oriented Software Development (AOSD’06), pp. 27–38. ACM Press, New York, NY, USA (2006)Google Scholar
  29. 29.
    Kühne, T.: On model compatibility with referees and contexts. Softw. Syst. Model. 12(3), 475–488 (2013)CrossRefGoogle Scholar
  30. 30.
    Lahire, Ph., Morin, B., Vanwormhoudt, G., Gaignard, A., Barais, O., Jézéquel, J. M.: Introducing variability into aspect-oriented modeling approaches. In: Proceedings of 10th International Conference on Model Driven Engineering Languages and Systems (MoDELS’07), LNCS, pp. 498–513. Springer (2007)Google Scholar
  31. 31.
    Morin, B., Vanwormhoudt, G., Lahire, Ph., Gaignard, A., Barais, O., Jézéquel, J-M.: Managing variability complexity in aspect-oriented modeling. In: Proceedings of the 11th Internation Conference on Model Driven Engineering Languages and Systems (MoDELS 2008), volume LNCS 5301, pp. 797–812. Springer (2008)Google Scholar
  32. 32.
    Muller, A.: Reusing functional aspects : from composition to parameterization. In: Aspect-Oriented Modeling Workshop-AOM 2004, Lisbon-Portugal (2004)Google Scholar
  33. 33.
    Muller, A., Caron, O., Carré, B., Vanwormhoudt, G.: On some properties of parameterized model application. In: Proceedings of 1st European Conference on Model Driven Architecture—Foundations and Applications (ECMDA-FA’05), vol. 3748 of LNCS, pp. 130–144. Springer (2005)Google Scholar
  34. 34.
    Muller, P., Fleurey, F., Jézéquel, JM.: Weaving executability into object-oriented meta-languages. In: Proceedings of 8th International Conference on The Unified Modeling Language. Model Languages and Applications (UML 2005), LNCS 3713, Jamaica. Springer (2005)Google Scholar
  35. 35.
    Perrouin, G., Vanwormhoudt, G., Morin, B., Lahire, Ph, Barais, O., Jézéquel, J.M.: Weaving variability into domain metamodels. Softw. Syst. Model. 11(3), 361–383 (2012)CrossRefGoogle Scholar
  36. 36.
    Reddy, Y.R., Ghosh, S., France, R. B., Straw, G., Bieman, J. M., McEachen, N., Song, E., Georg, G.: Directives for composing aspect-oriented design class models. In: Transaction on Aspect-Oriented Software Development I, vol. 3880, pp. 75–105. Springer (2006)Google Scholar
  37. 37.
    Steel, J., Jézéquel, J.-M.: On model typing. Softw. Syst. Model. 6(4), 401–413 (2007)CrossRefGoogle Scholar
  38. 38.
    Straw, G., Georg, G., Song, E., Ghosh, S., France, R., Bieman, J.M.: Model composition directives. In: Proceedings of UML 2004 - The Unified Modeling Language. Modelling Languages and Applications, vol. 3273 of LNCS, pp 84–97. Springer (2004)Google Scholar
  39. 39.
    Sunyé, G., Le Guennec, A., Jézéquel, J-M.: Design Patterns Application in UML. In: Bertino, E. (ed.), Proceedings of 14th European Conference on Object-Oriented Programming (ECOOP’2001), vol. 1850 of LNCS, pp 44–62. Springer, (2000)Google Scholar
  40. 40.
    Thiello, S.: Model templates for roles interaction, Master thesis. Technical report, University of Lille (2010)Google Scholar
  41. 41.
    Tombelle, Ch., Vanwormhoudt, G.: Dynamic and generic manipulation of models: from introspection to scripting. In: Proceedings of the 9th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2006), vol. 4199 of LNCS, Italy (2006)Google Scholar
  42. 42.
    Ullmann, J.R.: An algorithm for subgraph isomorphism. J. ACM 23(1), 31–42 (1976)MathSciNetCrossRefGoogle Scholar
  43. 43.
    UML 2.4.1 Superstructure Specification, 2011. http://www.omg.org/spec/UML/2.4.1/
  44. 44.
    Auxiliary Constructs Templates, chapter 17. UML 2.4.1 Superstructure Specification, 2011Google Scholar
  45. 45.
    Whittle, J., Praveen, K., Jayaraman, A., Elkhodary, M., Moreira, A., Araújo, J.: MATA: a unified approach for composing UML aspect models based on graph transformation. In: Transactions on Aspect-Oriented Software Development VI, Special Issue on Aspects and Model-Driven Engineering, vol. 5560 of LNCS, pp. 191–237. Springer (2009)Google Scholar
  46. 46.
    Wills, A.: Frameworks and component-based development. In: Proceedings of the International Conference on Object-Oriented Information Systems (OOIS’96), pp. 413–430. Springer, London (1997)Google Scholar
  47. 47.
    Wimmer, M., Schauerhuber, A., Kappel, G., Retschitzegger, W., Schwinger, W., Kapsammer, E.: A survey on UML-based aspect-oriented design modeling. In ACM Computing Surveys, vol. 43, pp. 28:1–28:33. ACM (2011)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  • Gilles Vanwormhoudt
    • 1
    • 2
  • Olivier Caron
    • 1
  • Bernard Carré
    • 1
  1. 1.CRIStAL, UMR CNRS 9189University of LilleVilleneuve d’Ascq CedexFrance
  2. 2.Institut Mines-TelecomParisFrance

Personalised recommendations