- ... OCL1
-
This work was partially supported by the
Bayerische Forschungsstiftung.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... OCL.2
-
The only mention of Cartesian product in [RAT97] is when
introducing the extended variant of the forAll operation,
namely the one with more than one iterator:
collection->forAll(e1,e2 | <Boolean-expression-on-e1-and-e2>),
which in fact is a forAll on the Cartesian product of the
collection with itself. The result of an expression of this form
is Boolean.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
either.3
-
Notice that in general it cannot be ensured that the projection of
a set of instances of a class (i.e. a set of n-tuples) is of a
type present in the model, thus an operation returning such a set
is not expressible in OCL; cf. discussion above on Cartesian
products in OCL.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... if-then-else4
-
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
-
In the specification document [RAT97] of OCL, the
if-then-else operation is listed among the
Boolean ones, of course just the first argument of an
if-then-else operation has to be of type Boolean
and its result value is of the (least) supertype of the types of
the then-branch and of the else-branch.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
possibility.5
-
This is also true for the negation given the closed world
assumption.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.