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

Re: LET / BIND / Assignment test cases (ISSUE-57)

From: Lee Feigenbaum <lee@thefigtrees.net>
Date: Sun, 03 Oct 2010 13:01:12 -0400
Message-ID: <4CA8B6D8.3040507@thefigtrees.net>
To: Lee Feigenbaum <lee@thefigtrees.net>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>
I want to remind everyone that we will be seeking to close this issue on 
our Tuesday call. Given that the group's sentiment last time was (a) in 
favor of including this feature and (b) in favor of deciding on 
semantics before syntax/keyword, I'm hoping this agendum will go like:

   1) Re-confirm the group consensus in favor of including this feature
   2) Discuss the semantics as per the examples below, strawpoll
   3) Discuss the syntax/keyword in light of the outcome of #2
   4) Decision based on #1-3 on how to resolve and close ISSUE-57

Lee

On 9/28/2010 10:45 PM, Lee Feigenbaum wrote:
> When last we talked, we decided we wanted to look at the semantics of a
> proposed LET/BIND/Assignment clause before choosing the keyword and
> proceeding with a decision.
>
> Here are a few test cases; I use KW (keyword) below where LET or BIND or
> whatever might go.
>
> Data:
>
> :s :one 1 .
> :s :two 2 .
>
>
> 1. Simple
>
> SELECT ?sum ?one ?two {
> ?s :one ?one ; :two ?two .
> KW (?sum := ?one + ?two)
> }
>
> Result:
>
> ?sum ?one ?two
> -----------------------
> 3 1 2
>
>
> 2. Calculated value matches existing binding
>
> SELECT ?one {
> ?s :one ?one .
> KW (?one := 1)
> }
>
> I believe there are two options here from what I've heard
>
> Option 1 ("join semantics") result:
>
> ?one
> -----
> 1
>
> Option 2 ("simple semantics") result:
>
> Error, can't assign to / bind a variable that's elsewhere bindable in
> the same scope
>
>
> 3. Calculated value does not match existing binding
>
> SELECT ?one {
> ?s :one ?one .
> KW (?one := 5)
> }
>
> I believe there are three options here from what I've heard
>
> Option 1 ("join semantics") result:
>
> ?one
> -----
>
> Option 2 ("simple semantics") result:
>
> Error, can't assign to / bind a variable that's elsewhere bindable in
> the same scope
>
> Option 3 ("assignment semantics") result:
>
> ?one
> -----
> 5
>
> NOTE: I don't believe _anyone_ is advocating or implements assignment
> semantics like this, but I wanted to include it for completeness.
>
>
> 4. Logical order of assignment/binding
>
> SELECT ?sum {
> KW (?sum := ?one + 1) .
> :s :one ?one .
> }
>
> Option 1 ("in place") result:
>
> ?sum
> ----
>
> (no result as ?one has no binding and so the expression is an error)
>
> Option 2 ("end of group") result:
>
> ?sum
> ----
> 2
>
> (assignments/binds are treated as with FILTERs, they occur logically
> after a group's solution set has been evaluated)
>
>
> I believe from the thread at
> http://lists.w3.org/Archives/Public/public-rdf-dawg/2010JulSep/0116.html
> that Mulgara implements what I'm calling "simple semantics". Anzo
> (Glitter) implements "join semantics". ARQ implements "simple semantics"
> as well.
>
> Anzo does "end of group" ordering. I think Mulgara does "in place"
> ordering. I'm not sure about ARQ.
>
> Here was the last time we discussed this at a TC:
>
> http://www.w3.org/2009/sparql/meeting/2010-07-06#LET__2f_Assignment
>
> Please discuss if you'd like, and next week I'd like to decide on
> inclusion or not (strong lean towards include last time) and, if we
> choose to include the feature, the semantics based on these options or
> any other options people suggest and the keyword.
>
> Lee
Received on Sunday, 3 October 2010 17:01:58 GMT

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