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.
Similar content being viewed by others
Notes
See Sect. 9.1 for exhaustive lists of templateable and parameterable elements.
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.
To determine if a parameterable element is a formal template parameter, we use the standard UML query (see Templates Section in [43]): ParameterableElement::isTemplateParameter().
This does not apply to primitive data types.
In UML, the ownedParameter role for an operation covers in, out and return parameters.
If all parameters are substituted, this property is implicitly guaranteed because they form a model by definition.
The core functionalities and the CASE tool are available at http://www.cristal.univ-lille.fr/caramel/aspectualtemplates.
Such registry of services can be found into component platforms like OSGI in order to facilitate a loose-coupling between components.
Remind that they are not aspectualizable inside the strict standard.
Note that Ecore has parameterized types but the offered capacities are very close to the generic part of the Java type system.
References
MDA. Home Page. http://www.omg.org/mda
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)
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)
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)
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)
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)
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)
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)
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)
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
Clark, T., Evans, A., Stuart, K.: Aspect-oriented metamodelling. Comput. J. 46(5), 566–577 (2003)
Clarke, S.: Extending standard UML with model composition semantics. In: Science of Computer Programming, vol. 44, pp. 71–100. Elsevier Science (2002)
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)
Clarke, S., Walker, R.J.: Generic aspect-oriented design with Theme/UML. In: Aspect-oriented software development, pp 425–458. Addison-Wesley Professional (2004)
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)
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)
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)
de Lara, J., Guerra, E.: From types to type requirements: genericity for model-driven engineering. Softw. Syst. Model. 12(3), 453–474 (2013)
Dingel, J., Diskin, Z., Zito, A.: Understanding and improving UML package merge. Softw. Syst. Model. 7(4), 443–467 (2008)
D’Souza, D., Wills, A.: Objects, components and frameworks with UML: the catalysis approach. Addison-Wesley, Boston (1999)
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)
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)
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)
Jézéquel, J.M.: Model driven design and aspect weaving. Softw. Syst. Model. 7(2), 209–218 (2008)
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)
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)
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)
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)
Kühne, T.: On model compatibility with referees and contexts. Softw. Syst. Model. 12(3), 475–488 (2013)
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)
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)
Muller, A.: Reusing functional aspects : from composition to parameterization. In: Aspect-Oriented Modeling Workshop-AOM 2004, Lisbon-Portugal (2004)
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)
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)
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)
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)
Steel, J., Jézéquel, J.-M.: On model typing. Softw. Syst. Model. 6(4), 401–413 (2007)
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)
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)
Thiello, S.: Model templates for roles interaction, Master thesis. Technical report, University of Lille (2010)
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)
Ullmann, J.R.: An algorithm for subgraph isomorphism. J. ACM 23(1), 31–42 (1976)
UML 2.4.1 Superstructure Specification, 2011. http://www.omg.org/spec/UML/2.4.1/
Auxiliary Constructs Templates, chapter 17. UML 2.4.1 Superstructure Specification, 2011
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)
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)
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)
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
Corresponding author
Additional information
Communicated by Prof. Joerg Kienzle.
Rights and permissions
About this article
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
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10270-015-0463-3