On Better Understanding OCL Collections or An OCL Ordered Set Is Not an OCL Set

  • Fabian Büttner
  • Martin Gogolla
  • Lars Hamann
  • Mirco Kuhlmann
  • Arne Lindow
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6002)


Modeling languages like UML or EMF support textual constraints written in OCL. OCL allows the developer to use various collection kinds for objects and values. OCL 1.4 knows sequences, sets, and bags, while OCL 2.0 adds ordered sets. We argue that this addition in the OCL standard was not carried out in a careful way and worsened conceptional problems that were already present previously. We discuss a new way of establishing the connection between the various collection kinds on the basis of explicitly highlighting and characterizing fundamental collection properties.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [BD07]
    Bräuer, M., Demuth, B.: Model-Level Integration of the OCL Standard Library Using a Pivot Model with Generics Support. In: Giese, H. (ed.) MODELS 2008. LNCS, vol. 5002, pp. 182–193. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. [BSM+03]
    Budinsky, F., Steinberg, D., Merks, E., Ellersick, R., Grose, T.: Eclipse Modeling Framework. Addison Wesley Professional, Reading (2003)Google Scholar
  3. [EGL89]
    Ehrich, H.-D., Gogolla, M., Lipeck, U.W.: Algebraische Spezifikation Abstrakter Datentypen - Eine Einführung in die Theorie. Leitfäden und Monographien der Informatik. Teubner, Stuttgart (1989)Google Scholar
  4. [EM85]
    Ehrig, H., Mahr, B.: Fundamentals of Algebraic Specification. Springer, Berlin (1985)zbMATHGoogle Scholar
  5. [GBR07]
    Gogolla, M., Büttner, F., Richters, M.: USE: A UML-Based Specification Environment for Validating UML and OCL. Science of Computer Programming 69, 27–34 (2007)zbMATHCrossRefMathSciNetGoogle Scholar
  6. [GKB08]
    Gogolla, M., Kuhlmann, M., Büttner, F.: A Benchmark for OCL Engine Accuracy, Determinateness, and Efficiency. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 446–459. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  7. [HB94]
    Hoogendijk, P.F., Backhouse, R.C.: Relational Programming Laws in the Tree, List, Bag, Set Hierarchy. Science of Computer Programming 22(1-2), 67–105 (1994)zbMATHCrossRefMathSciNetGoogle Scholar
  8. [HL07]
    Hartmann, S., Link, S.: Collection Type Constructors in Entity-Relationship Modeling. In: Parent, C., Schewe, K.-D., Storey, V.C., Thalheim, B. (eds.) ER 2007. LNCS, vol. 4801, pp. 307–322. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  9. [OMG03]
    OMG (ed.): Object Constraint Language, Version 1.4. OMG, 2003. OMG Document,
  10. [OMG04]
    OMG (ed.): OMG Unified Modeling Language Specification, Version 2.0. OMG. OMG Document (2004),
  11. [OMG06]
    OMG (ed.): Object Constraint Language, Version 2.0. OMG. OMG Document formal/06-05-01 (2006),
  12. [Opo09]
    Opoka, J.: OCLLib, OCLUnit, OCLDoc: Pragmatic Extensions of the Object Constraint Language. In: Schürr, A., Selic, B. (eds.) MODELS 2009. LNCS, vol. 5795, pp. 665–669. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  13. [TS91]
    Tannen, V., Subrahmanyam, R.: Logical and Computational Aspects of Programming with Sets/Bags/Lists. In: Leach Albert, J., Monien, B., Rodríguez-Artalejo, M. (eds.) ICALP 1991. LNCS, vol. 510, pp. 60–75. Springer, Heidelberg (1991)Google Scholar
  14. [Wir90]
    Wirsing, M.: Algebraic specification. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science. North-Holland, Amsterdam (1990)Google Scholar
  15. [WK03]
    Warmer, J., Kleppe, A.: The Object Constraint Language: Precise Modeling with UML, 2nd edn. Addison-Wesley, Reading (2003)Google Scholar
  16. [Won95]
    Wong, L.: Polymorphic Queries Across Sets, Bags, and Lists. ACM SIGPLAN Notices 30(4), 39–44 (1995)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Fabian Büttner
    • 1
  • Martin Gogolla
    • 1
  • Lars Hamann
    • 1
  • Mirco Kuhlmann
    • 1
  • Arne Lindow
    • 1
  1. 1.Computer Science Department Database Systems GroupUniversity of BremenBremenGermany

Personalised recommendations