Re: Typos in SPARQL 1.1 Query

On 07/12/11 13:28, Olivier Corby wrote:
>
>
> On 12/03/2011 07:00 PM, Andy Seaborne wrote:
>> Corrected to:
>>
>> eval(D(G), OneOrMore(x:term, path, vy:var)) =
>> Let X = eval(x, path)
>> Let V = {}
>> Let R = the empty multiset
>> For n in X
>>     ALP(n, path, R, V)
>>     End
>> result is R
>
> I think there is another typo here, V should be reset to {} in the loop
> as shown below :
>
>
> eval(D(G), OneOrMore(x:term, path, vy:var)) =
> Let X = eval(x, path)
> Let R = the empty multiset
> For n in X
>     Let V = {}
>     ALP(n, path, R, V)
>     End
> result is R
>

I don't think so. V is the set of nodes visited and should carry across 
calls to ALP for each possible next step in set X.

In OneOrMore the form of ALP being called is the main worked function 
and V is an accumulator of visited nodes.

In ALP, ALP(x:term, path) passes in an empty set to the main worker 
function.  This is the route taken by ZeroOrMore.  OneOrMore calls the 
main worked function directly.

Do you have an example of the difference as you see it?

	Andy
>
>
> Olivier

Received on Wednesday, 7 December 2011 13:56:57 UTC