{ } and OPTIONAL

Hi!

In rq24 in the definition of the Empty Group pattern the use of "requiring
no substitution" is not clear (at least not for me). The specification of
the example SELECT ?x WHERE { } is more clear but I think that it leads to
an unexpected behavior.

rq24 states that SELECT ?x WHERE { }

"matches with one solution which has no substitutions for variables."

Consider the data

ex:a ex:p ex:b

Does the definition mean that ?x -> ex:a is not a solution for the empty
pattern { }? If this is the case then the pattern

{ } OPTIONAL { ?x ex:p ex:b }

will not has as solution ?x -> ex:a because it is not a solution for the
first pattern (applying the definition of OPTIONAL). This implies that for
every pattern of the form

{ } OPTIONAL { P }

no mather what P is, the solution is always the empty set. Is this the
desired behavior? If it is not, I think that, to be consistent in the
definitions, at least ?x -> ex:a must be consider a solution for { } with
the dataset above and then (to be consisten again) ex:a must appear in the
result of SELECT ?x WHERE { }.

I don't know if I'm understanding well the definitions about { }, but I
think that at least they deserve test cases with OPTIONALs and
conjunctions of group graph patterns (for example a pattern like { { } {
?s ?p ?o } }).

In the same context, what is the necessity of having an Empty Group
Pattern? is there a Use Case or Requirement about that?

- jorge

Received on Thursday, 3 August 2006 17:38:17 UTC