Sunday, July 03, 2005

All the W3C entailment tests are now scripted, working, and checked in. It's very nice to see. :-)

There are a few caveats to these tests, but that is by design.

First, there are no datatype entailments. I'm not sure what you can entail from a datatype. The only test for it says that the following results in a "False" document:

  <> <rdfs:range> <rdf:XMLLiteral>
<> <> "<"^^<rdf:XMLLiteral>
I could write a resolver to check this kind of thing, only it would need to create statements like:
  <rdf:XMLLiteral> <tucana:isTypeFor> "<"
But I'm skeptical about working too closely with data types for RDFS, since I may need to consider the different types of literals as well. I may look at this later.

Next is that there are no consistency checks. There are a few reasons for this. Consistency checks don't entail new data (well, you could say that they entail a false document, but no new statements). Next is that I planned on making consistency checks a part of OWL, and hadn't really considered it before now. However, just as I was getting to the last tests I found one which checks that the following is wrong:
  <> <rdf:type> <rdf:Property>
<> <rdfs:subClassOf> <>
It is supposed to use <rdfs:subPropertyOf> instead. This is actually legal in OWL Full (but not DL). It will be tricky making OWL Full a superset of RDFS if I go testing for conditions like that.

Anyway, I can do consistency checks very easily, and it should only take a day of code. However, they were not a part of what I said I'd do for the moment, so I'll put them off until I get a little time (I actually thought I might get them done on the flight... see how I go).

The only other thing I've avoided in the tests is RDF parsing. However, that is already being done elsewhere, and is not relevant to entailment.

This means that I just need to document the format of the RDF for rules, and I've met my current commitments for this code. I still have to make OWL work, but it's still a milestone, and I feel good for it. :-)

While doing all the tests I added some minor extras as I went.
  • I fixed the Http resolver test that was looking at Sourceforge. It seems that the page changed from html to xml. I'm skeptical of any test that relies on external resources like this, but I can see the usefulness.
  • I added an explicit rollback() when the rule insertions fail.
  • Added some feedback when rules complete.
  • Put in a Dummy Rule loader (at Andrae's request) and made this the default when none is supplied. I couldn't work out how to make the RuleLoader tag optional in the XSD for the configuration file though.
  • When using a model as a rule model, check it for rules or axioms. If none are found then report it as a problem.
There are all sorts of extra bit and pieces that I want to get working. I need to prioritize my time, but it would be nice to get some of them done. They include:
  • A shortcut command to select all statements from a model (without needing to select the subject, predicate and object and give all three in a constraint as well). This should save on some typing!
  • A similar shortcut to count the result of a query. At the moment a count has to be a subquery. When you just want the results of a query that means you need a superfluous model and where clause that has to evaluate to something.
  • More detailed results to applying a set of rules (number of rules, number of axioms, number of generated statements).
The problem with these sorts of things is that they can be a distraction from the real work, but they'd be great to have. If anyone else would like these features, then please feel free to implement them for me. :-)

No comments: