On the expressive power of the Object Constraint Language OCL

The Object Constraint Language (OCL) has been introduced by IBM for business modelling and adopted by UML as a mean to specify invariants of classes and types in a class model, to specify type invariant of stereotypes, to describe pre-and postconditions on operations and methods, to describe guards, and also as a navigation language. OCL is a language of typed expressions, where an expression can be universally and existentially quantiied. This paper aims at examining the expressive power of OCL in terms of navigability and computability. First the expressive power of OCL is compared with the relational calculus, and it is showed that OCL is not equivalent to the relational calculus. Then it is studied if the transitive closure of a binary relation is expressible in OCL, showing how it is coded. Finally the equivalence of OCL with a Turing machine is pondered.

[1]  Alfred V. Aho,et al.  Universality of data retrieval languages , 1979, POPL.

[2]  Martin Gogolla,et al.  On Formalizing the UML Object Constraint Language OCL , 1998, ER.

[3]  E. F. Codd,et al.  Relational Completeness of Data Base Sublanguages , 1972, Research Report / RJ / IBM / San Jose, California.