[OCL] Resolving properties, ambiguities [message #593639] |
Wed, 04 October 2006 16:55 |
Radomil Dvorak Messages: 249 Registered: July 2009 |
Senior Member |
|
|
Hi,
The current EMFT OCL implementation (R1_0_maintenance branch only) excludes
'explicitly defined iterator variables' as a source of a
property. It is done by design, as a result of the fix
https://bugs.eclipse.org/bugs/show_bug.cgi?id=151234
While reading OCL 2.0 spec, I found myself in doubt, whether the spec
clearly states this.
There is section '7.8 Resolving properties', which describes how implicit
iterator properties are handled.
On the other hand, the section '9.3 Concrete Syntax' contains
AttributeCallExpCS and
Disambiguating rules:
[1] [A, B] 'simpleName' is name of an Attribute of the type of source or if
source is empty the name of an attribute of 'self'
or any of the iterator variables in (nested) scope.
So, it looks to me, that the resolution rule 'the most-inner-scope first'
should be used also if an iterator variable is not implicit.
To be accurate, the OCL expression bellow illustrates this topic.
context ecore::EPackage
eClassifiers->collect(classifier | name)
Should the result collect the package name or EClassifiers names?
Regards,
/Radek
|
|
|
Powered by
FUDForum. Page generated in 0.03124 seconds