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

Re: Drafting definitions for select expressions

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Tue, 08 Dec 2009 14:45:09 +0000
Message-ID: <4B1E6675.1080407@talis.com>
To: Axel Polleres <axel.polleres@deri.org>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>


On 08/12/2009 12:29, Axel Polleres wrote:
> when I looked into this...
>
> 1)
> ... I suppose:
>
> extend(μ, var, expr) = { (var,value) | var not in dom(μ) and value = eval(expr) }
> extend(μ, var, expr) = μ if var not in dom(μ) and eval(expr) is an error
> extend is undefined when var in dom(μ).
>
>
> should be:
>
>
> extend(&mu;, var, expr) =
> (i)   { (var,value) | value = eval(expr) }&cup;&mu; ... if var not in dom(&mu;) and eval(expr) is defined

Yes.

> (ii)&mu; ... if var not in dom(&mu;) and eval(expr) is an error
> (iii) undefined ... if var in dom(&mu;).
>
> 2) I am somewhat hesitant about forbidding
>
>   _:blank AS ?Var
>
>   if we don't have sub-CONSTRUCTs, since if I can't "mint" new bnodes I think I can't model
>   one of the use cases I had in mind fir sub CONSTRUCTs.

Is that use case written up?  Link?

>   (related to ACTION-133)

That it maybe but it has not been brought up as a design requirement so 
I suggested it be banned.  Note that because its:

(expr AS ?var)

we are talking about

(_:b+1 AS ?var)

as well. The special case of just a blank node can be done - the only 
case is _:b AS ?var) not full expression.

There is conceptual problem because bnodes in patterns are 
non-distinguished variables and it gets confusing if in a SELECT query 
if they are used as in CONSTRUCT templates.

An alternative design is a generator function that yields new bnodes per 
solution and that might be better and clearer.  The CONSTRUCT handling 
of bnodes is

(BNODE() AS ?var)

but I don't know a use case that requires mining bnodes.  What had you 
in mind? (noting we can add this later but can't remove it once spec'ed)


	Andy

>
> best,
> Axel
>
> On 25 Nov 2009, at 14:08, Andy Seaborne wrote:
>
>> Here is an early draft of definitions for select expressions covering
>> algebra, evaluation, and translation from syntax to algebra.
>>
>> This is a temporary working document prior to integration into the main
>> document.
>>
>> Comments and fixes welcome: please note it is very much a
>> work-in-progress draft
>>
>> http://www.w3.org/2009/sparql/docs/query-1.1/select-expr-defs-1-1.html
>>
>>          Andy
>>
>>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
Received on Tuesday, 8 December 2009 14:45:28 GMT

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