W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2011

Re: Typos in SPARQL 1.1 Query

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Wed, 07 Dec 2011 13:56:32 +0000
Message-ID: <4EDF7090.6060801@epimorphics.com>
To: Olivier Corby <Olivier.Corby@sophia.inria.fr>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>


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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:47 GMT