Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvtd-dev] [Dev] binding.isLoop for collections

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



Back to the top