Re: Negation section text updated.

On 2010-05-20, at 08:27, Olivier Corby wrote:

> Some remarks on negation.
> 
> 
> 
> 8 Negation
> 
> "one based filtering results"
> ->
> one based on filtering results
> 
> 
> 8.1 Filtering Using Graph Patterns
> 
> "Filering of query solutions"
> ->
> Filtering
> 
> 
> Note that there are two syntax for negation :
> 
> filter(not exists PAT)
> 
> filter(! exists PAT)

However, NOT doesn't appear to by a synonym of !, so it's not legal to write FILTER(NOT ?x=1), which seems a little odd.

I think we should either add a NOT operator, or remove NOT from EXISTS, and just use !.

> 8.1.2 Testing For the Presence of a Pattern
> 
> EXISTS { ?person foaf:name ?name }
> ->
> FILTER EXISTS { ?person foaf:name ?name }
> 
> 
> 8.2 Removing bindings
> 
> "then to calculates"
> ->
> then calculates
> 
> 
> 8.3 Relationship and difference between NOT EXISTS and MINUS
> 
> evaulation
> ->
> evaluation
> 
> 
> "Note: NOT EXISTS as a graph pattern is translated into an
> algebra filter and positioned exactly where it occurs in the graph pattern,
> unlike a FILTER expression which is applied over the whole group it occurs
> in, as done during algebra translation. See below."
> 
> Isn't this note obsolete as NOT EXISTS is proposed to be a filter ?
> 
> 
> 8.3 Relationship and difference between NOT EXISTS and MINUS
> 
> Introduction to Negation :
> "The SPARQL query language incoporates two styles of negation, [one ...] and one based on removing solutions related to another pattern."
> 
> PREFIX : <http://example/>
> SELECT *
> {
> ?s ?p ?o
> MINUS { :a :b :c }
> }
> 
> evaluates to result set with one query solution:
> 
> <http://example/a> <http://example/b> <http://example/c>
> 
> 
> So I write a MINUS to remove solution :a :b :c and I get solution :a :b :c

Well, { :a :b :c } is a pattern, not a solution, so I don't understand the source of confusion.

{ ?s ?p ?o . FILTER(?s=:a && ?p=:b && ?o=:c) } has zero or more solutions, which are what you expected I think, but it's still a pattern. There is probably a more elegant way to write that with BINDINGS, but I'm not that familiar with it.

- Steve

-- 
Steve Harris, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD

Received on Thursday, 20 May 2010 08:50:16 UTC