W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > March 2005

Re: Avoiding compatibility with logic?

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Tue, 29 Mar 2005 17:45:47 +0100
Message-ID: <4249863B.8010008@hp.com>
To: Bob MacGregor <bmacgregor@siderean.com>
CC: public-rdf-dawg-comments@w3.org



Bob MacGregor wrote:
> In this extract of the grammar:
> 
> |WhereClause| 	  ::=   	|( 'where' )? GraphPattern 
> <http://www.w3.org/2001/sw/DataAccess/rq23/#rGraphPattern>|
> 
> 
> |GraphPattern| 	  ::=   	|'{'
>     ( PatternElement 
> <http://www.w3.org/2001/sw/DataAccess/rq23/#rPatternElement>
>       ( '.' PatternElement 
> <http://www.w3.org/2001/sw/DataAccess/rq23/#rPatternElement> )*
>       ( '.' )?
>     )?
> '}'|
> 
> 
> we see that placing curly braces around the arbument to WHERE is
> required.  I'm hoping that is an unintentional mistake.

It is intentional.  It makes the pattern language regular.  Under the old syntax 
with () roudn triple patterns, there were special cases for basic patterns so 
operators could take either a triple or a graph pattern (including one of sveral 
triples).  In the current syntax, grouping of patterns is always by {} and the 
pattern combining operators always patterns, no special cases.

> Otherwise, writing
> 
> SELECT ?x
> WHERE ?x P 5
> 
> is illegal.
> 
> On the other hand, I see that the WHERE keyword is considered optional. 
> I'd much prefer that it was mandatory.  That would make the language 
> slightly more
> rigid, but also increases its clarity.
> 
> On a much more significant point:
> 
> I'm wondering if the following comment is still true.
> <snip>
>  > Seaborne, Andy wrote:
>  > Originally, this was called OR but the working group noted that this 
> leads to confusion because, in OWL DL:
>  >  { :x :p ?v } OR { :x :q ?w }
>  > may be true as a boolean expression without being about to determine 
> any values for either ?v and ?w.  Hence the choice of a name which is 
> supposed to > be more explicit as to the outcome.
> 
> This seems to be a statement that SPARQL in general wants to shy away 
> from a logic
> interpretation, and that specifically, it doesn't want to support 
> logical disjunction.
> The reference above is to OWL DL, but it applies equally to KIF and any 
> other logic
> that is sufficiently expressive.  I see this as extremely short-sighted 
> -- its basically saying
> that SPARQL doesn't want to be upward compatible with, e.g.,  the rule 
> languages that are
> sure to follow downstream.
> 
> It also is saying that SPARQL is distancing itself from OWL, i.e., that 
> if it is applied to a
> graph that contains OWL assertions, it seeks to avoid triggering 
> OWL-style inference. 
> Frequently, whether or not inference occurs is the province of the 
> underlying RDF/OWL
> store; not the query language.  Making sense of the answers you would 
> get back when
> applying a SPARQL query to an OWL reasoner will be a mess.

Actually it's the opposite.  It is that way so that a SPARQL processor is not 
required to support, say, OWL-DL level operations.  The operations in SPARQL are 
at the graph pattern combining level only and the expected results apply as such.

Because "{ :x :p ?v } OR { :x :q ?w }" can be true without knowing what to 
return for ?v and ?w, the working group was more comfortable with the choice of 
UNION.

	Andy

> 
> The OWL equivalent of a disjunction operator is called  'unionOf', so I 
> don't see how
> renaming 'OR' to 'UNION' has made things any clearer.
> 
> Cheers, Bob
Received on Tuesday, 29 March 2005 16:46:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:48 GMT