Re: UNSAID - two test cases (dawg:unbound, issues#useMentionOp)

On Wed, Dec 22, 2004 at 02:53:47 -0800, Pat Hayes wrote:
> >On Wed, Dec 22, 2004 at 05:26:01PM +0000, Andy Seaborne wrote:
> >> >Yes, but SQL for eg. has tri-value logic (true, false and NULL), so you
> >> >can meaningfully apply operators and functions to unbound values (NULL).
> >>
> >> It doesn't quite work out that simply.  It's fine for operators and
> >> functions but pattern matching isn't so straight forward.
> >>
> >> OPTIONAL (<x> ?p ?o)
> >>  (?o ?q <y>)
> >>
> >> so ?o may be NULL then we have the (?o ?q <y>) and it needs to handle
> >> ?o = NULL differently.  NULL is different.
> >
> >Yes, bun in RDF you cant have a triple like (NULL ?q <y>), so that match
> >will always fail. Unless I'm missing something.
> 
> Er...seems to me that you are missing a use/mention confusion. NULL 
> here is supposed to be a value (right?), not a piece of syntax. So 
> what does it even mean to put NULL into a triple? Or are you 
> suggesting that 'NULL' - that is an actual piece of syntax, a 
> four-letter character string - is used as a kind of dummy binding to 
> stand for the binding in cases where a variable doesn't have a 
> binding? If so, I think this really is a very bad idea. All sorts of 
> problems will arise right away: eg two different unbound variables 
> will be the same. It would be much better to simply leave the 
> variable in the pattern in cases like this.

I was doing a subsitution, as in:

?x is unbound, (?x ?q <y>)

We dont have a symbol for unbound, so I co-opted NULL. Old habbits die
hard.

BTW, in your proposed expressions involving unbound values are false
scheme, would !(?x == ?y) be true or false, if ?x is unbound. I'm not
clear on how far up the expression tree unboundedness propagates.
 
> > > Talking about NULLs, with all it special cases for matching and function
> >> handling, like NULL != NULL, is no different to talking about unbound
> >> variables.  Both need special handling.
> >
> >There are no special cases. Any arithemtic operation involving NULL is
> >NULL, so NULL == NULL is NULL, NULL > 3 is NULL, ...
> 
> Does NULL match NULL? If ?x and ?y are both bound to NULL, are the 
> bindings the same? And so on.

Not in SQL. I not holding that up as a shining example of rightness
though.

- Steve

Received on Thursday, 23 December 2004 10:19:11 UTC