Anybody can submit an opinion to the following issue:
MooseChef allows to express a query such as:
aClass queryOutgoingInvocations
aMethod queryOutgoingReferences
that will return all methods invoked from 'aClass' for the first query
and all classes referenced by 'aMethod' in the second query
Then you can constraint the scope of the result, for example to say that
you are interested by the package containing the referenced classes
aMethod queryOutgoingReferences atPackageScope
You can also down scope the result, for example to say you want all the
methods of the class referenced:
aMethod queryOutgoingReferences atMethodScope
Finally, there is something to say you are not interested in relation
that loop back to the original object queried
aClass queryOutgoingInvocations withoutSelfLoops
will return all classes that own methods invoked from 'aClass' except
'aClass' itself (that would be a selfLoop)
one sees on this example that withoutSelfLoops involves some scoping:
queryOutgoingInvocations will return a collection of methods, but the
query was sent to a class.
So when we say withoutSelfLoop, we actually mean all methods that don't
belong to the class to which the query was sent.
This is equivalent to:
aClass queryOutgoingInvocations atClassScope withoutSelfLoops
Up to now, the semantic is rather Ok, but when you use hidden down
scoping, it starts to be less clear:
aMethod queryOutgoingReference withoutSelfLoops
will return all classes referenced in 'aMethod' taken at methodScope and
removing self loop.
In the end, the result will ignore references to the class owning 'aMethod'.
What do you think?
There is some logic in the semantic, but it is not so intuitive.
Looking at the query, I cannot convince me that this is the result that
one would expect.
Should we change the semantic?
To what? (keep up-scoping and forbid implicit down-scoping? forbid all
implicit re-scoping?)
nicolas
PS: This may look like a rather theoretical question, but I actually
have a bug partly related to that and I need to know how to solve it