Re: Testcase comment and question

Geoff writes:
[...]
> I realize the whole question assumes an acceptance of the logical
> interpretation of OPTIONAL. Whether or not the working group considers that
> to be valid, I think this test case clearly illustrates the need for some
> formal definition of the semantics of OPTIONAL (i.e. I don't think you can
> use test cases alone to define the behavior).

Both the current editor's draft and the latest public working
draft give this formal specification:

[[
Definition: Optional Matching

Given graph pattern GP1, and graph pattern GP2, let GP = (GP1 union
GP2).

The optional match of GP2 of graph G, given GP1, defines a pattern
solution PS such that:

If GP matches G, then the solutions of GP is the patterns solutions of
GP else the solutions are the pattern solutions of GP1 matching G.
]]
 -- http://www.w3.org/2001/sw/DataAccess/rq23/#OptionalMatchingDefn
http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050217/#OptionalMatchingDefn

This design was confirmed by WG decision
 http://www.w3.org/2001/sw/DataAccess/ftf5-bos.html#item_03
after explicitly considering the design where
"A optional B" is interpreted as "A & (B v True)" and finding
that it returns unhelpful solutions.
 http://www.w3.org/2001/sw/DataAccess/ftf5-bos.html#item02

I'll continue to study the test case that you write about, but
meanwhile, I just wanted to bring to your attention the current
formal definition.


-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Tuesday, 29 March 2005 17:01:31 UTC