Re: Negation section text updated.

Olivier,

Thanks for the remarks:

On 20/05/2010 08:27, Olivier Corby wrote:
 > Some remarks on negation.
 >
 >
 >
 > 8 Negation
 >
 > "one based filtering results"
 > ->
 > one based on filtering results

Done

 >
 >
 > 8.1 Filtering Using Graph Patterns
 >
 > "Filering of query solutions"
 > ->
 > Filtering

Done

 >
 >
 > Note that there are two syntax for negation :
 >
 > filter(not exists PAT)
 >
 > filter(! exists PAT)

See next message.

 >
 > 8.1.2 Testing For the Presence of a Pattern
 >
 > EXISTS { ?person foaf:name ?name }
 > ->
 > FILTER EXISTS { ?person foaf:name ?name }

Done

 >
 >
 > 8.2 Removing bindings
 >
 > "then to calculates"
 > ->
 > then calculates

Done

 > 8.3 Relationship and difference between NOT EXISTS and MINUS
 >
 > evaulation
 > ->
 > evaluation
 >
Done

 >
 > "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 ?
 >
Removed

 >
 > 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
 >
 > I wonder how I will explain this to users ...

Yes - that's how MINUS works.
I share your concern.

Maybe the example should be more direct

{ ?s :b :c } MINUS { :a :b :c }

 >
 > 8.4.1 Algebra: EXISTS
 >
 > "We define a expression"
 > ->
 > define an

Done

 > 8.4.2 Algebra: MINUS
 >
 > "The additional restriction on dom(μ) and dom(μ') is added so that if
 > any solution mapping
 > has no variables in common with solution mappings of Ω1 then
 > Minus(Ω1, Ω2) is empty, regardless of the rest of Ω2"
 >
 > I don't understand this sentence.

It might be unnecessary.  The point is that MINUS is defined specially 
and different from the it's natural definition of "not compatible" 
anti-join (which is the "diff" operation used in defining OPTIONAL/left 
join).

Otherwise:
{ anything MINUS {} }

is the empty result which the WG members found unhelpful.  I'd rather 
not give an example in the doc because it isn't what the spec is defining.

Forcompleness: currently:
{ {} MINUS {} }

is one row of no bindings, not the empty result set.

 Andy

Received on Thursday, 20 May 2010 19:05:13 UTC