Skip to main content
Log in

Aspectual templates in UML

Enhancing the semantics of UML templates in OCL

  • Regular Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24

Similar content being viewed by others

Notes

  1. See Sect. 9.1 for exhaustive lists of templateable and parameterable elements.

  2. In order to highlight parameter constituents in the template core, class boxes and association lines are dashed and names are bolded. Other constituents correspond to injected elements.

  3. To determine if a parameterable element is a formal template parameter, we use the standard UML query (see Templates Section in [43]): ParameterableElement::isTemplateParameter().

  4. This does not apply to primitive data types.

  5. In UML, the ownedParameter role for an operation covers in, out and return parameters.

  6. If all parameters are substituted, this property is implicitly guaranteed because they form a model by definition.

  7. The core functionalities and the CASE tool are available at http://www.cristal.univ-lille.fr/caramel/aspectualtemplates.

  8. Such registry of services can be found into component platforms like OSGI in order to facilitate a loose-coupling between components.

  9. Remind that they are not aspectualizable inside the strict standard.

  10. Note that Ecore has parameterized types but the offered capacities are very close to the generic part of the Java type system.

References

  1. MDA. Home Page. http://www.omg.org/mda

  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)

  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)

  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)

  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)

    Article  Google Scholar 

  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)

  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. 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)

  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)

  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. Clark, T., Evans, A., Stuart, K.: Aspect-oriented metamodelling. Comput. J. 46(5), 566–577 (2003)

    Article  MATH  Google Scholar 

  12. Clarke, S.: Extending standard UML with model composition semantics. In: Science of Computer Programming, vol. 44, pp. 71–100. Elsevier Science (2002)

  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)

  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)

  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)

  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)

  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)

  18. de Lara, J., Guerra, E.: From types to type requirements: genericity for model-driven engineering. Softw. Syst. Model. 12(3), 453–474 (2013)

    Article  Google Scholar 

  19. Dingel, J., Diskin, Z., Zito, A.: Understanding and improving UML package merge. Softw. Syst. Model. 7(4), 443–467 (2008)

    Article  Google Scholar 

  20. D’Souza, D., Wills, A.: Objects, components and frameworks with UML: the catalysis approach. Addison-Wesley, Boston (1999)

    Google Scholar 

  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)

  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)

  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)

  24. Jézéquel, J.M.: Model driven design and aspect weaving. Softw. Syst. Model. 7(2), 209–218 (2008)

    Article  Google Scholar 

  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)

  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)

  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)

  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)

  29. Kühne, T.: On model compatibility with referees and contexts. Softw. Syst. Model. 12(3), 475–488 (2013)

    Article  Google Scholar 

  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)

  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)

  32. Muller, A.: Reusing functional aspects : from composition to parameterization. In: Aspect-Oriented Modeling Workshop-AOM 2004, Lisbon-Portugal (2004)

  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)

  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)

  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)

    Article  Google Scholar 

  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)

  37. Steel, J., Jézéquel, J.-M.: On model typing. Softw. Syst. Model. 6(4), 401–413 (2007)

    Article  Google Scholar 

  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)

  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)

  40. Thiello, S.: Model templates for roles interaction, Master thesis. Technical report, University of Lille (2010)

  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)

  42. Ullmann, J.R.: An algorithm for subgraph isomorphism. J. ACM 23(1), 31–42 (1976)

    Article  MathSciNet  Google Scholar 

  43. UML 2.4.1 Superstructure Specification, 2011. http://www.omg.org/spec/UML/2.4.1/

  44. Auxiliary Constructs Templates, chapter 17. UML 2.4.1 Superstructure Specification, 2011

  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)

  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)

  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)

Download references

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gilles Vanwormhoudt.

Additional information

Communicated by Prof. Joerg Kienzle.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Vanwormhoudt, G., Caron, O. & Carré, B. Aspectual templates in UML. Softw Syst Model 16, 469–497 (2017). https://doi.org/10.1007/s10270-015-0463-3

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-015-0463-3

Keywords

Navigation