Re: Negation decision : unexpected effects

On 12/04/2010 2:09 PM, Lee Feigenbaum wrote:
>>> I believe this difference only occurs in the case of what the Chileans
>>> call not-well-formed queries - a variable occurs inside the NOT EXISTS,
>>> but not on the left-hand side of the NOT EXISTS, and also occurs
>>> elsewhere in the query. (Same as with procedural vs. compositional
>>> OPTIONAL.)
>>
>> Confused about the reference to not-well-formed queries: they are to do
>> with doubley nested optionals where a variable appears in the LHS of the
>> outer OPTIONAL and the RHS for the inner OPTIONAL but not in between.
>
> I do not believe that this is the case; I think my understanding of
> well-formed (actually "well-designed) patterns is accurate. Please see
> Definition 4 of http://www.dcc.uchile.cl/~cgutierr/papers/sparql.pdf .


[[
Definition 4. A graph pattern P is well designed if for every occurrence 
of a sub-pattern P0 = (P1 OPT P2) of P and for every variable ?X 
occurring in P, the following condition holds:

   if ?X occurs both inside P2 and outside P0, then it also occurs in P1.
]]

There is an difference that needs further proof. OPTIONAL has the 
characteristic that it may or may not bind a variable and so place it in 
scope further out depending on the data.

Double nested optional exhibit that in a data dependent way because the 
deepest variable may get bound to possibilities that exclude matching at 
the outer level but, being OPTIONAL, that binding need not be done.

NOT EXISTS does not have that characteristic (nor does MINUS for that 
matter, for difference reasons).

 Andy

Received on Monday, 12 April 2010 14:26:14 UTC