Weird value testing situations

As I was working on DISTINCT, I realized that there were other  
corners of RDF semantics that might be a bit odd. Forgive me if these  
have been raised already. They are mostly inspired by Jeremy  
Carroll's weird datatype tricks shown to me at WWW in Japan.

We have some text that sort of addresses this issue:

"""3.4 Matching Values and RDF D-entailment
RDF defines D-Entailment where extra semantic conditions are allowed  
for datatypes. When matching RDF literals in graph patterns, the  
datatype lexical-to-value mapping may be reflected into the  
underlying RDF graph, leading to additional matches where it is known  
that two literals are the same value. RDF semantics does not require  
this of all RDF graphs."""

I don't understand this last bit, especially if it is to be some sort  
of loophole. I would think that the presence of typed literals would  
require datatyped interpretations. We could, I supposed, designate a  
mode where all matching was done on the lexical form, or something  
similar. But I don't see that we *have* done that.

Let me just give some of the very simple ones, and see if there's  
anything to discuss:

:bob rdf:type  xsd:negativeIntegerr.
:mary rdf:type xsd:positiveInteger.

Query:
	SELECT ?x
	WHERE {?x rdf:type _:type.
			 ?y rdf:type _:type. FILTER ?x < ?y}

Should this have an answer? that is :bob? How about:

:bob rdf:type  xsd:negativeInteger.
:mary age "10"^^xsd:integer.

Query:
	SELECT ?x ?y
	WHERE {?x rdf:type _:type.
			 :mary age ?y. FILTER ?x < ?y}

How about this? <;bob, 10^^xsd:integer>?

More complex examples are possible with range or domain that are,  
perhaps, a little less artificial. But I hope these are clear. You  
could replace the URIs with BNodes as well.

The type testing functions (e.g., isLiteral()) are similarly doggy if  
you consider :bob rdf:type rdfs:Literal.

Of course, we could understand all the functions, as they seem to be  
implicitly, as applying strictly to the lexical form. But that's not  
quite right since the comparison operators, for example, operate on  
the value space. :bob *has a value* in the value space, we just don't  
have access to it.

Cheers,
Bijan.

Received on Monday, 14 August 2006 04:02:47 UTC