Galigator / openllet

Openllet is an OWL 2 reasoner in Java, build on top of Pellet.
https://www.w3.org/TR/owl2-primer/
Other
100 stars 26 forks source link

InternalReasonerException: Adding edge to a pruned _node #38

Open Locke opened 6 years ago

Locke commented 6 years ago

Hi, I get another InternalReasonerException, that happens when I call isConsistent after adding any axiom. I'm using owlapi 5.1.5 and openllet-owlapi 2.6.5-SNAPSHOT / 9c5928a.

Relevant code:

reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY);

reasoner.instances(CLASS_PROCESSMODEL).forEach(p -> {
    manager.addAxiom(ont, factory.getOWLDataPropertyAssertionAxiom(DATA_PROPERTY_HASMODELCOMPONENTID, p, "AddingEdgeTest"));
});

reasoner.flush();

if (!reasoner.isConsistent()) { // throws InternalReasonerException
    throw new InternalError("inconsistent after adding a ModelID!");
}

Stacktrace:

openllet.core.exceptions.InternalReasonerException: Adding edge to a pruned _node anon(1) hasSourceState state89971606167054
        at openllet.core.boxes.abox.Individual.addEdge(Individual.java:1080)
        at openllet.core.tableau.completion.CompletionStrategy.addEdge(CompletionStrategy.java:516)
        at openllet.core.rules.ContinuousRulesStrategy.addEdge(ContinuousRulesStrategy.java:84)
        at openllet.core.rules.rete.ProductionNode$Edge.activate(ProductionNode.java:158)
        at openllet.core.rules.rete.BetaNode.activateChildren(BetaNode.java:28)
        at openllet.core.rules.rete.BetaMemoryNode.activate(BetaMemoryNode.java:74)
        at openllet.core.rules.rete.BetaNode.activateChildren(BetaNode.java:28)
        at openllet.core.rules.rete.BetaMemoryNode.activate(BetaMemoryNode.java:74)
        at openllet.core.rules.rete.BetaNode.activateChildren(BetaNode.java:28)
        at openllet.core.rules.rete.BetaMemoryNode.activate(BetaMemoryNode.java:74)
        at openllet.core.rules.rete.BetaNode.activateChildren(BetaNode.java:28)
        at openllet.core.rules.rete.BetaMemoryNode.activate(BetaMemoryNode.java:74)
        at openllet.core.rules.rete.BetaNode.activateChildren(BetaNode.java:28)
        at openllet.core.rules.rete.BetaTopNode.activate(BetaTopNode.java:33)
        at openllet.core.rules.rete.AlphaNode.lambda$activate$1(AlphaNode.java:49)
        at java.util.ArrayList.forEach(ArrayList.java:1257)
        at openllet.core.rules.rete.AlphaNode.activate(AlphaNode.java:49)
        at openllet.core.rules.rete.AlphaTypeNode.activate(AlphaTypeNode.java:60)
        at openllet.core.rules.rete.AlphaNetwork.activateType(AlphaNetwork.java:150)
        at openllet.core.rules.rete.AlphaNetwork.activateIndividual(AlphaNetwork.java:133)
        at java.util.Iterator.forEachRemaining(Iterator.java:116)
        at openllet.core.rules.rete.AlphaNetwork.activateAll(AlphaNetwork.java:119)
        at openllet.core.rules.rete.Interpreter.run(Interpreter.java:60)
        at openllet.core.rules.ContinuousRulesStrategy.applyRete(ContinuousRulesStrategy.java:145)
        at openllet.core.rules.ContinuousRulesStrategy.complete(ContinuousRulesStrategy.java:224)
        at openllet.core.boxes.abox.ABoxImpl.lambda$isConsistent$12(ABoxImpl.java:1417)
        at openllet.core.utils.Timers.execute(Timers.java:118)
        at openllet.core.boxes.abox.ABoxImpl.isConsistent(ABoxImpl.java:1417)
        at openllet.core.boxes.abox.ABoxImpl.isConsistent(ABoxImpl.java:1269)
        at openllet.core.KnowledgeBaseImpl.consistency(KnowledgeBaseImpl.java:1802)
        at openllet.core.KnowledgeBaseImpl.isConsistent(KnowledgeBaseImpl.java:1877)
        at openllet.core.KnowledgeBaseImplFullSync.isConsistent(KnowledgeBaseImplFullSync.java:403)
        at openllet.owlapi.PelletReasoner.isConsistent(PelletReasoner.java:1032)
        at de.athalis.owl.PrunedNode.printProcesses(PrunedNode.java:75)
        at de.athalis.owl.PrunedNode.main(PrunedNode.java:29)

This happens with both the default reasoner and also with the buffering one. I generated seven minimal ontologies with a modified SearchMinimalBug: it calls addAxiom and tests specifically for this InternalReasonerException, and also doesn't perform the anonymization to keep the ontologies understandable / comparable. I uploaded the files along the Java code here: https://github.com/Locke/pruned_node

Locke commented 6 years ago

Note: the error doesn't occur when I set OpenlletOptions.TRACK_BRANCH_EFFECTS = true;