On 12/07/12 19:14, Jan Schäfer wrote:
Hi all,

I'm having difficulties with my Jena/Pellet environment, as the
reasoning after individual removals is very slow and my SWRL rules are
not evaluated.

This is my setup. I'm using an inferencing model atop a non-inferencing
model:
OntModel baseModel =
ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
baseModel.addSubModel(onto1.owl);
baseModel.addSubModel(onto2.owl);
baseModel.addSubModel(onto3.owl);
OntModel infModel =
ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC,
baseModel);
infModel.prepare();
// ...add/remove individuals to/from baseModel...
infModel.rebind();
// ...query infModel...

I use the baseModel for adding/removing individuals including their
properties and the infModel for queries. Here I found out that if I want
the reasoner to find inconsistencies, I need a infModel.rebind() after
each modification to the baseModel (add/remove some individuals).
However, the rebind() call is fast after adding individuals (it's done
almost instantly) and *very* slow after individuals have been removed
(in my case, sometimes more than 1min), even after only a few statements
are (bulk) removed. Is there a way to increase the reasoner update
speed?

You'll have to ask on the Pellet list for such hints.

It's common in other reasoners to be able to process additions incrementally (because the semantics is monotonic) but to process a remove you often have to just start over from scratch. Hence the asymmetry in speed.

Do I really have to rebind after each modification (before the
next query)?

Normal practice to do do changes through the infModel rather than through the base model. In that case you don't need to do a rebind. It is up to the reasoner to decide when to process the changes.

Maybe a related problem is that the SWRL rules contained in my
ontologies are not evaluated at runtime (at least I can't query them,
nor do i see them in the serialized models). If I serialize my runtime
ontologies (both baseModel.write() or infModel.write()), I can load
either into Protege, run Pellet and get the expected results from the
rules. Do you know what I'm doing wrong?

Sorry, again this is a question for the Pellet folks.

Dave


Reply via email to