OwlDlTrHReasoner is a new OWL DL reasoning module added to Bossam, which shows much better performance than Bossam’s default OWL DL reasoning module. You can create an instance of
OwlDlTrHReasoner by calling
In Bossam shell, instead of
owltr as follows:
load owltr from http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine;
Yeap. That’s it.
OwlDlTrHReasoner completes a forward-chaining reasoning session over the W3C wine ontology in less than 3 seconds, on my 1.8Ghz Core Duo notebook with 128MB of Java heap memory. Not bad, right?
Doesn’t that reasoner lose too many derivations? Well, actually, I have to see from now on… 🙂 I’d be greatly appreciated for any feedback and problem reports on this new reasoner. 🙂
Now, big improvements in performance. With newly added reasoners for OWL reasoning, OwlDlTrHReasoner, resonable performance measures are obtained. Refer to the preliminary LUBM benchmark results. Also, this release includes a feature to present the derivation tree for conclusions. Please refer to the short explanations on explanation.
Highlights for Bossam 0.9b40 Release
- New Reasoners:
SwrlRdfTrHReasonerare OWL and SWRL reasoners respectively. These reasoners provide better performance than previous reasoners e.g.
load owltrto utilize the new
OwlDlTrHReasonerin Bossam shell!
- Explanation: It’s now possible to print out the derivation tree of a derived facts. Please refer to an explanation on the explanation feature.
- Derived facts with blank nodes now do not appear in the conclusions! It provides more compact view on the conclusions.
- Several bug-fixes as always…
Notes for the Bossam users!
Highly regarded Bossam users! Please note the following guides!
- You should always use
bossam.app.ReasonerFactoryto create reasoner instances. Creators of reasoner classes are now protected so you cannot directly create instances of reasoner classes.
- You should create an OWL reasoner to load OWL documents, and a SWRL reasoner to load SWRL documents. You cannot load OWL or SWRL documents with the default reasoner created by
IReasonerFactory.createOwlDlTrHReasoner()for better OWL reasoning performance!
- Query performance is better optimized for this release. Try querying.
Thank you so much for using Bossam!
Recently, a big performance-wise improvement was injected into Bossam. 😉 I performed a preliminary LUBM benchmark with Bossam and got a promising results. The machine was a notebook with a fast Intel Core Duo 1.8Ghz processor and 2 GB of RAM. I assigned 256MB heap memory for the Java machine (JDK 1.3.1) for the test. The test was done on two data sets: one with about 50,000 triples and another with 100,000 triples. As Bossam is the forward-chaining engine, it took a while to finish the full derivation phase. It took about 100 seconds for 100,000 triples and 22 seconds for 50,000 triples. The following chart shows the elapsed time for 13 LUBM queries. Answers were correct. I think the performance figure shown in the chart is not bad for a rule-based OWL reasoner. 🙂
As of 0.9b40, Bossam comes with a small explanation feature. You can easily utilize the explanation feature in Bossam shell. The command is simple as follows:
fact-id is the ID of the fact for which an explanation is requested.
Suppose we assert a set of knowledge and run a reasoning session in the Bossam shell as follows:
> assert fact f1 is hasParent(a,b); > assert fact f2 is hasParent(b,c); > assert fact f3 is hasParent(c,d); > assert rule r2 is if hasParent(?x,?y) then hasAncestor(?x,?y); > run; Running..... Reasoning Completed. fact def:Fact2 is def:hasAncestor(def:c,def:d); fact def:Fact1 is def:hasAncestor(def:b,def:c); fact def:Fact0 is def:hasAncestor(def:a,def:b);
With explanation, it’s possible to see which set of facts contributed to the derivation of a specific fact. For example, we can see the explanation for the
Fact2 as follows:
> explain def:Fact2; Fact2: def:hasAncestor(def:c,def:d) [from r2] f3: def:hasParent(def:c,def:d) [Given]
We can see that the
Fact2 is derived by the rule
r2 with the support of the fact
f3 which is given. As such, we can track the derivation path of conclusions. For a slightly more complex example, we add one more rule and request an explanation as follows.
> assert rule r2 is if hasAncestor(?x,?y) and hasParent(?y,?z) then hasAncestor(?x,?z); Asserted. > run; Running..... Reasoning Completed. fact def:Fact5 is def:hasAncestor(def:a,def:d); fact def:Fact3 is def:hasAncestor(def:b,def:d); fact def:Fact4 is def:hasAncestor(def:a,def:c); > explain def:Fact5; Fact5: def:hasAncestor(def:a,def:d) [from r2] Fact4: def:hasAncestor(def:a,def:c) [from r2] Fact0: def:hasAncestor(def:a,def:b) [from r2] f1: def:hasParent(def:a,def:b) [Given] f2: def:hasParent(def:b,def:c) [Given] f3: def:hasParent(def:c,def:d) [Given] >
We see an embedded hierarchy of derivation relations.
Fact5 is derived by the rule
r2 with the support of the facts
Fact4 is derived again by
r2 with the support of
Fact0 is soley supported by the given fact
Currently, Bossam does not provide a data structure for explanations. The
bossam.app.IReasoner interface provides a method
getProof() that accepts a fact ID and returns an explanation string.
I’m considering a number of ways to provide an object model or an XML markup for the explanations. Any suggestions?
Claire gave a series of feedbacks on bugs in SWRL/RDF processing. Based on Claire’s comments, I could fix several data type processing bugs. Thanks so much, Claire!!
Claire is at Department of Information Technology, National University of Ireland, Galway.
I’m working on a new implementation of Bossam’s OWL reasoning module. There’re roughly two approaches for rule-based OWL reasoning. One is translation-based approach and the other is meta-reasoning approach. Bossam’s OWL reasoning module originally is implemented in meta-reasoning approach, but now I’m working on a translation-based OWL reasonnig implementation for Bossam. I’ve just finished the first draft of the code and it looks quite promising in the sense of performance!
- A full forward-chained reasoning session on the W3C wine ontology completed in 1.5 seconds!
- A full forward-chained reasoning session on the LUBM benchmark with 100,000 triples completed in 97 seconds! All the 13 sample queries are processed in less than 1 second!
Stay tuned! One major performance-tuned Bossam is coming!
The RETE core is refactored for performance improvements. Generally, this release is *three times* faster than the previous release. Also, some SWRL/RDF processing bugs are fixed, and this release runs on J2ME CDC/PP platform as well as J2SE platforms of JDK 1.3 or later. Download at http://projects.semwebcentral.org/projects/bossam/