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

Re: Typos in SPARQL 1.1 Query

From: Olivier Corby <Olivier.Corby@sophia.inria.fr>
Date: Wed, 07 Dec 2011 15:44:14 +0100
Message-ID: <4EDF7BBE.4040809@sophia.inria.fr>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>
> 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? 


My understanding (?) is that for each value of n in the loop, V is empty.
Because, according to the definition of ALP, V is empty when returning
from ALP(n, path, R, V)
So it is clearer (to me) if it is explicit  in the call.
It would be even clearer with :

ALP(n, path, R, {})

Am I missing something here ?

Olivier
Received on Wednesday, 7 December 2011 14:44:44 GMT

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