W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2012

Attemt to tackle in-scope BIND issue (ACTION-618 - part 1)

From: Polleres, Axel <axel.polleres@siemens.com>
Date: Wed, 23 May 2012 09:04:49 +0200
To: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-ID: <9DA51FFE5E84464082D7A089342DEEE80139B0FFC48F@ATVIES9917WMSX.ww300.siemens.net>
Dear all,
 

I'd like to first tackle the issue around BIND, I'll write some more suggestions on the definition of "in-scope" in a separate mail

As per 
http://lists.w3.org/Archives/Public/public-rdf-dawg/2012AprJun/0120.html
I think that there was some problem about the definition of in-scope with BIND.
 
item 12. in
http://www.w3.org/2009/sparql/docs/query-1.1/rq25.xml#sparqlGrammar
currently says:

"
 *   The variable assigned in a BIND clause must not be already <a href="http://www.w3.org/TR/sparql11-query/#variableScope">in-scope</a>.
"

which I think was a bit unclear, since the meaning of "already" in scope wasn't clear.
I have two alternative suggestions to go forward here:

--------------------------------------------------------------------
 
Option 1:
--------- 

Disallow variable being in-scope for the whole group where the BIND clause appears in: 

That could be addressed by changing item 12 as follows:
 
     *   The variable assigned in a BIND clause must not be already <a href="http://www.w3.org/TR/sparql11-query/#variableScope">in-scope</a> in the same group the BIND clause appears in if the BIND clause was dropped. That is, if BIND (Exp as V) appears in a pattern  {  P1 BIND (Exp as V) P2 }, then v must not be <a href="http://www.w3.org/TR/sparql11-query/#variableScope">in-scope</a <http://www.w3.org/TR/sparql11-query/#variableScope">in-scope</a> > in { P1 P2 } .
 
--------------------------------------------------------------------

Option 2:
---------

Disallow variable being in-scope in the semegroup, but only before the BIND clause appears: 
That could be addressed by changing item 12 as follows:
 
     *   The variable assigned in a BIND clause must not be already <a href="http://www.w3.org/TR/sparql11-query/#variableScope">in-scope</a> 
          within the pattern in the same group befor the BIND clause. That is, if BIND (Exp as V) appears in a pattern  
   {  P1 BIND (Exp as V) P2 }, then v must not be <a href="http://www.w3.org/TR/sparql11-query/#variableScope">in-scope</a <http://www.w3.org/TR/sparql11-query/#variableScope">in-scope</a> > P1.
 

--------------------------------------------------------------------

It seems actually, that both versions resolve the issue and it seems that Option 1 and 2 are somewhat 
equivalent, since we also write that "BIND ends the basic graph pattern", right? (Although I couldn't really find where
that was actually reflected in the semantics definition, or is this implicit in the algorithm in Section "18.2.2.6 Translate Graph Patterns"?)

Best,
Axel


 
-- 
Dr. Axel Polleres 
Siemens AG Österreich 
Corporate Technology Central Eastern Europe Research & Technologies 
CT T CEE 
 
Tel.: +43 (0) 51707-36983 
Mobile: +43 (0) 664 88550859
Fax: +43 (0) 51707-56682 mailto:axel.polleres@siemens.com 
Received on Wednesday, 23 May 2012 07:05:42 GMT

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