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

Jos,

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 } .

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")

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.


[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?] 

	Andy

Received on Thursday, 8 July 2004 09:04:11 UTC