This page discusses some work I did to gain familiarity with
RuleML (version 0.7)
and the use of the
DAML+OIL
language with several rule engines
(XSB,
JESS,
and cwm)
during and shortly after meeting with
the RuleML folks at the
RDF Interest Group Face-to-Face Meeting
in Cambridge, MA
in late February 2001.
This summary page was written in July 2001.
GEDCOM
I had
recently developed
gedcom.daml,
a DAML ontology for genealogy information.
It employed the
data model
from the existing GEDCOM standard,
which defines Individuals, Families, and Events.
This provides a "normalized" representation where information
is never duplicated,
but may not be the most convenient representation for progammatic manipulation.
I decided to use RuleML to define familiar family relationships
(child, spouse, etc.).
This grew over time to become 31 rules.
The current version is available as
gedcom-relations.xml.
Execution
To gain experience in using the rules under different rule engines,
I wrote small XSLT scripts to translate the rules into the
rule representation for each of the target engines,
and (where necessary) a Java program to translate the RDF graph into a literal
representation of the triples.
I then wrote a small application to print my uncles.
These are linked in the table below:
The XSB application
ran quickly,
but kept looping
(someone more familiar with XSB and Prolog could probably debug this).
cwm deduces all possible facts from its inputs.
Running on my personal family tree
(1741 Individual and 668 Families),
it started with 16296 DAML statements and generated 399103 more.
I left it running overnight, so I'm not sure how long it actually
took, but I was impressed that it did finish.
Some additional details of my use of cwm are available
here.
Findings
Here are my significant findings:
- RuleML generally worked well for expressing these rules.
There were a couple requirements that weren't addressed by RuleML 0.7:
- the ability to specify that 2 variables (e.g. child1 and child2 in sibling)
must not bind to the same object
- the ability to use NOT in the rule (e.g. for stepchild)
These features are supported in each of the target rule engines.
I manually changed the generate output specify the former.
- XSLT was the obvious choice for translating the rules,
and it worked OK,
but output formatting requirements (spaces, linefeeds, etc),
which is not generally a concern for XSLT,
made the XSLT stylesheets much less readable
Possible Future Directions
- update to RuleML 0.8
- adapt to other rule engines
- ...
Author
Mike Dean
$Id: index.xml,v 1.7 2002/04/11 14:14:10 kmbarber Exp $