Abstract
Based on our experience in implementing a type-checker for the Object Constraint Language (OCL), we observed that OCL is not suitable for constraining a system under development, because changes in the underlying class diagram unnecessarily invalidate the type correctness of constraints, while their semantic value does not change. Furthermore, the type system of OCL does not support templates.
To alleviate these problems, we extended the type system of OCL with intersection and union types and bounded operator abstraction. The main advantage of our type system is that it allows more changes in the contextual class diagrams without adapting the OCL constraints.
Part of this work has been financially supported by IST project Omega (IST-2001-33522) and NWO/DFG project Mobi-J (RO 1122/9-1, RO 1122/9-2)
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
Boldsoft and Rational Software Corporation and IONA and Adaptive Ltd.: UML
0 OCL Specification (2003) 2. Object Management Group: UML 2.0 Infrastructure Specification (2003), http://www.omg.org/cgi-bin/doc?ptc/2003-10-14 , http://www.omg.org/cgi-bin/doc?ptc/2003-10-14
Object Management Group: UML 2.0 Superstructure Specification (2004), http://www.omg.org/cgi-bin/doc?ptc/2004-10-02
Richters, M.: A Precise Approach to Validating UML Models and OCL Constraints. PhD thesis, Universtät Bremen, Logos Verlag, Berlin, BISS Monographs, No. 14 (2002)
Cengarle, M.V., Knapp, A.: OCL 1.4/5 vs. 2.0 expressions: Formal semantics and expressiveness. Software and Systems Modeling (2003)
Kyas, M., Fecher, H., de Boer, F.S., van der Zwaag, M., Hooman, J., Arons, T., Kugler, H.: Formalizing UML models and OCL constraints in PVS. In: Lüttgen, G., Madrid, N.M., Mendler, M. (eds.) Proc. SFEDL 2004. ENTCS, vol. 115, pp. 39–47. Elsevier, Amsterdam (2005)
Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)
Clark, A.: Typechecking UML static models. In: France, R.B., Rumpe, B. (eds.) UML 1999. LNCS, vol. 1723, pp. 503–517. Springer, Heidelberg (1999)
Steffen, M.: Polarized Higher-Order Subtyping. PhD thesis, Technische Fakutät, Friedrich-Alexander-Universität Erlangen-Nürnberg (1997)
Cardelli, L., Wegener, P.: On understanding types, data abstraction, and polymorphism. ACM Computing Surveys 17(4), 471–522 (1985)
Pierce, B.C.: Programming with Intersection Types and Bounded Polymorphism. PhD thesis, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA 15213 (1991)
Compagnoni, A.B., Pierce, B.C.: Intersection types and multiple inheritance. Mathematical Structures in Computer Science 6(5), 469–501 (1996)
Meyer, B.: Eiffel: The Language. Prentice-Hall, Englewood Cliffs (1992)
Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall, Englewood Cliffs (1997)
Wadler, P.L.: Theorems for free! In: Fourth International Conference on Functional Programming Languages and Computer Architecture, pp. 347–359. ACM Press, New York (1989)
Bonsangue, M.M., Kok, J.N.: Infinite intersection types. Information and Computation 186(2), 285–318 (2003)
Compagnoni, A.B.: Higher-order subtyping and its decidability. Information and Computation 191(1), 41–113 (2004)
Coquand, T., Huet, G.: The calculus of constructions. Information and Computation 76(2/3), 95–120 (1988)
Richters, M., Gogolla, M.: OCL: Syntax, semantics, and tools. In: [21], pp. 42–68
Schürr, A.: A new type checking approach for OCL 2.0? In: [21], pp. 21–40
Clark, A., Warmer, J. (eds.): Object Modeling with the OCL. LNCS, vol. 2263. Springer, Heidelberg (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 IFIP International Federation for Information Processing
About this paper
Cite this paper
Kyas, M. (2005). An Extended Type System for OCL Supporting Templates and Transformations. In: Steffen, M., Zavattaro, G. (eds) Formal Methods for Open Object-Based Distributed Systems. FMOODS 2005. Lecture Notes in Computer Science, vol 3535. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11494881_6
Download citation
DOI: https://doi.org/10.1007/11494881_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-26181-0
Online ISBN: 978-3-540-31556-8
eBook Packages: Computer ScienceComputer Science (R0)