RE: action item "to send pointers to test cases to the list"

Andy wrote:
> Thanks for the explanation - I'd missed the effect of merging the two
> :select a queries together.  Let me try and rephrase to make sure I
> understand / for you to point out where I have missed the point:
>
> We have queries:
>
> # S1 - must we have the ?Y here?
> [] q:select { (?X ?Y) } ;
>    q:where  { :x :p ?X } .
>
> # S2
> [] q:select { (?X ?Y) } ;
>    q:where  { :x :p ?X ; :x :q ?Y } .
                         ^.
(I have some running code problem for the case of (?X ?Y) only graphs
but thanks for suggesting that possibility...)
for the case we discuss here, the ?Y in S1 is needed

> data:
> :x :p "v-p" .
> :x :q "v-q" .
>
> then 
>
> S1 gives graph ("v-p" ?Y)
> S2 gives graph ("v-p" "v-q")
>
> merging gives:
>
> ("v-p", "v-q")

indeed

> because ?Y unifes with "v-q", so because there is at least match,
> the original ("v-p" ?Y) can be removed. This is the merge rule for 
universal
> variables.

that's right


> [Aside: in
>    [] q:select { q:result q:is (?X ?Y) } ;
>       q:where  { :x :p ?X ; :x :q ?Y } .
> why is the ?X in the q:select formula connected to the ?X in the q:where
> formula.  What are the scoping rules on ?-named variables? Is it the
> document?] 

the meaning is the same as in
http://www.w3.org/DesignIssues/N3QL#Design3
i.e. in this case it is
{ :x :p ?X ; :x :q ?Y } => { q:result q:is (?X ?Y) }.
and the scope of ?X is that formula as explained in
http://www.w3.org/2003/Talks/0520-www-tf1-b3-rules/slide21-0.html

-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/

Received on Thursday, 8 July 2004 13:33:11 UTC