Nested forAlls [message #1751510] |
Tue, 10 January 2017 22:52 |
Edouard R. Batot Messages: 100 Registered: March 2015 |
Senior Member |
|
|
Hi every one,
why does this code :
--(context FF)
self.d->forall(m0:M |
m0.d->forAll(oclIsKindOf(M))
)
produces this exception :
Quote:org.eclipse.ocl.SemanticException: Incomplete iterator expression: (Set {self."<null>"}->forall(m0 : "<null>" | Set {m0."<null>"}->forAll(temp1 : "<null>" | temp1."<null>"("<null>"))))
when I call it through
helper.setContext(THE RIGHT CONTEXT (FF))
helper.createQuery( THE OCL MENTIONED ABOVE );
('helper' is a org.eclipse.ocl.helper.OCLHelper<C, O, P, CT>)
Context :
Conceptuals entities and links conform to metamodel (attached, if needed) : an instance of the class FF (self) contains a reference d, which is an instance of the class M (say m0). Then I want to ensure, randomly if the intances referenced by 'm0.d' are of kind M.
But 'd' seems to disapear in the depth of OCL.
Questions:
Where is the 'd' gone ?
Why does this OCL rise an exception ?
Did I miss something ?
Is it possible to nest the forAlls (and exists) ?
Thanks for your help.
Edouard
-
Attachment: F.ecore
(Size: 1.58KB, Downloaded 412 times)
[Updated on: Tue, 10 January 2017 22:53] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04803 seconds