[Pellet-users] Debugging rules
Evren Sirin
evren at clarkparsia.com
Mon Mar 31 15:23:26 UTC 2008
On 3/28/08 11:44 AM, Crapo, Andrew (GE, Research) wrote:
> I have a simple ontology and a SWRL rule that I am testing. It seems to
> me that the rule should fire but the conclusion isn't set. How can I
> debug this? Create some kind of trace of why rules do or do not fire?
>
It is always tricky to debug why something does not happen vs why
something happens. You can use the explanation feature of Pellet to help
understand why a rule fires. So if you have a rule
C(?x) ^ p(?x, ?y) ^ D(?y) -> q(?x, ?y)
and you know that the assertion q(a,b) is inferred, you can get the
explanations for assertions C(a), p(a,b), and D(b) separately to see
which source axioms caused each of these assertions to be inferred (I'm
saying separately because Pellet currently only provides explanations
for atomic inferences).
If the assertion q(a,b) is not inferred contrary to your intuition then
you can try to get the explanation for each of those assertions and see
which one fails (the explanation for one should fail otherwise the head
of the rule would hold). This does not help understand the exact problem
but hopefully narrows down the issue to a simpler case which might be
easier to analyze.
In the general case, explaining why an axiom is not entailed is an
interesting question with no good solution. There has been some work in
this area (based on generating counter-examples for the missing
inference or using some heuristics) but the work is not yet mature
enough to provide a useful and generic service for this task.
There are some issues with the above solution I outlined. Currently
Pellet does not consider the effect of rules in the explanations it
generates and explanations will not contain rules. So, if the assertion
q(a,b) from the above example is later used to infer another fact, the
explanation for that fact will not include the above rule which could be
a big issue if there are many rules that are dependent on each other. We
know about this problem and intend to fix it in the future. Also there
is no command line interface or any other utility tool to get
explanations for an axiom. You can look at the explanation example from
the Pellet distribution to see how explanations can be retrieved
programmatically.
Cheers,
Evren
> Andrew Crapo
> GE Global Research
> Information Scientist
>
> T 518 387 5729
> F 518 387 6104
> D *833 5729
> E crapo at research.ge.com
> www.research.ge.com
>
> One Research Circle
> Niskayuna, NY 12309 USA
> General Electric Company
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
>
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
More information about the Pellet-users
mailing list