Skip to content

ConcurrentModificationException when Precomputing Inferences #94

Description

@tobiaswjohn

I am using Openllet to compute the class hierarchy of an ontology. I discovered a case, where Openllet sometimes throws an exception. This behavior is non-deterministic on my machine, so one may need to test it several times to reproduce the bug.

  • The input ontology for which the exception occurs is too large to add it in the text here, but can be found in the following github repository
  • Here is the call from my program:
OWLOntologyDocumentSource source = new FileDocumentSource(ontFile, new FunctionalSyntaxDocumentFormat());
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OwlOntology ont = manager.loadOntologyFromOntologyDocument(source);

OpenlletReasonerFactory rf = new OpenlletReasonerFactory();
OWLReasoner openllet = rf.createReasoner(ont);

/// precomputation for class hierarchy
if (openllet.isConsistent()) {
 openllet.precomputeInferences(InferenceType.CLASS_HIERARCHY);
}
  • the following exception is thrown:
Exception in thread "main" java.util.ConcurrentModificationException
	at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1597)
	at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1620)
	at openllet.core.el.SimplifiedELClassifier.addSuccessor(SimplifiedELClassifier.java:143)
	at openllet.core.el.SimplifiedELClassifier.addSuperClass(SimplifiedELClassifier.java:245)
	at openllet.core.el.SimplifiedELClassifier.processQueue(SimplifiedELClassifier.java:483)
	at openllet.core.el.SimplifiedELClassifier.lambda$classify$1(SimplifiedELClassifier.java:116)
	at openllet.core.utils.Timers.execute(Timers.java:118)
	at openllet.core.el.SimplifiedELClassifier.classify(SimplifiedELClassifier.java:116)
	at openllet.core.KnowledgeBaseImpl.classify(KnowledgeBaseImpl.java:1919)
	at openllet.core.KnowledgeBaseImplFullSync.classify(KnowledgeBaseImplFullSync.java:385)
	at openllet.owlapi.PelletReasoner.precomputeInferences(PelletReasoner.java:1289)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions