Hi Ed,
I understand your point and the differences in the two types of bindings. Is it correct to assume that binding.isIsLoop() follows this logic? If so, my previous example indicates a bug. If on the other hand what this is implying is that the semantics is constrained to only allow bindings in the form of (BNF):
variable := SlotOwnerOCLExpr.PropertyName
where Property is a collection, I think it should be changed to support the more general case.
Regards,
Hi
That is why the definition has been moved to the user syntax.
Consider a List(Set(String)) being passed to a Set(String) bound variable. The looping occurs over the List.
But a Set(String) passed to a Set(String) has no looping, despite being a collection value and a collection type everywhere.
It is therefore a requirement that a looped invocation provides a depth N+1 collection to be iterated by the depth N bound variable.
Regards
Ed
On 15/04/2013 12:20, Horacio Hoyos Rodriguez wrote:
Hi Ed,
What is the precise definition of a binding being a loop? It seems the current implementation tests if the ValueOCLExpr refers to an attribute that is a collection, rather than testing if the result of evaluating the ValueOCLExpr returns a collection. Thus in the following example binding.isIsLoop() returns false, although the result of the ValueOCLExpr is a collection:
map Node2Middle {
n1 := g1.element->select(e | e.oclIsTypeOf(simplegraph::Node));
middleParent := middleG2G;
}
Regards ,
Horacio Hoyos Rodríguez
EngD Student
University of York
http://www.york.ac.uk/docs/disclaimer/email.htm
_______________________________________________
qvtd-dev mailing list
qvtd-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/qvtd-dev
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3272 / Virus Database: 3162/6245 - Release Date: 04/14/13