Abstract
Generic programming is a field of computer science which consists in defining abstract and reusable representations of efficient data structures and algorithms. In popular imperative languages, it is usually supported by a template-like notation, where generic elements are represented by templates exposing formal parameters. Defining such generic artifacts may require defining constraints on the actual types that can be provided in a particular substitution. UML 2 templates support two mechanisms for expressing such constraints. Unfortunately, the UML specification provides very few details on their usage. The purpose of our article is to provide such details with regard to one of these constraining mechanisms (namely, “substitutable constraining classifiers”) as well as modeling patterns inspired by practices from generic programming.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
OMG: Unified Modeling Language: Superstructure version 2.2 (2008)
Cuccuru, A., Mraidha, C., Terrier, F., Gérard, S.: Templateable Metomodels for Semantic Variation Points. In: Akehurst, D.H., Vogel, R., Paige, R.F. (eds.) ECMDA-FA. LNCS, vol. 4530, pp. 68–82. Springer, Heidelberg (2007)
Cuccuru, A., Mraidha, C., Terrier, F., Gérard, S.: Enhancing UML Extensions with Operational Semantics. In: Engels, G., Opdyke, B., Schmidt, D.C., Weil, F. (eds.) MODELS 2007. LNCS, vol. 4735, pp. 271–285. Springer, Heidelberg (2007)
Myers, N.: A New and Useful Template Technique: ”Traits”. In: Lippman, S.B. (ed.) C++ Gems, pp. 451–457. SIGS Publications, Inc., New York (1996)
Austern, M.H.: Generic Programming and the STL. Addison-Wesley Pro., Reading (1999)
Gregor, D., Järvi, J., Siek, J., Stroustrup, B., Dos Reis, G., Lumsdaine, A.: Concepts: Linguistic Support for Generic Programming in C++. In: OOPSLA 2006, pp. 291–310. ACM, New York (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cuccuru, A., Radermacher, A., Gérard, S., Terrier, F. (2009). Constraining Type Parameters of UML 2 Templates with Substitutable Classifiers. In: Schürr, A., Selic, B. (eds) Model Driven Engineering Languages and Systems. MODELS 2009. Lecture Notes in Computer Science, vol 5795. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-04425-0_51
Download citation
DOI: https://doi.org/10.1007/978-3-642-04425-0_51
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-04424-3
Online ISBN: 978-3-642-04425-0
eBook Packages: Computer ScienceComputer Science (R0)