andrewdbate / Sequoia

Sequoia is a consequence-based OWL 2 DL Reasoner supporting multithreaded reasoning
GNU General Public License v3.0
11 stars 2 forks source link

Missing classes/subsumptions in classification result #2

Open andreas-steigmiller opened 6 years ago

andreas-steigmiller commented 6 years ago

I did a few smaller tests with the latest available version (7e4466673ded1c689e4ceeb28652cb1a9cccf78f) of Sequoia (to be more precise, by using the OWL API 4.5.x and the fat-jar obtained by compiling/assembling the reasoner-owl-api sub-project with sbt) and it seems that Sequoia is not always outputting all subsumptions/classes. For example, with the following code

OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(new File("study_protocol-A.owl.xml"));
OWLReasoner reasoner = SequoiaReasonerFactory.getInstance().createNonBufferingReasoner(ontology);
reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY);
OWLClass owlThingClass = manager.getOWLDataFactory().getOWLThing();
for (Node<OWLClass> classNode : reasoner.getSubClasses(owlThingClass, true)) {
    System.out.println(classNode.getEntities());
}

and the attached study_protocol-A.owl.xml ontology, I get the following output for Sequoia:

[main] INFO com.sequoiareasoner.owlapi.SequoiaReasoner - Starting structural transformation...
[main] INFO com.sequoiareasoner.owlapi.SequoiaReasoner - Done structural transformation.
[CSOWorker-16] INFO com.sequoiareasoner.owlapi.SequoiaReasoner - Saturation completed in 52.
[http://purl.org/net/OCRe/study_protocol.owl#OCRE300012]
[http://purl.org/net/OCRe/study_protocol.owl#OCRE300010]
[http://purl.org/net/OCRe/study_protocol.owl#OCRE300011]

In contrast, if I use HermiT instead of Sequoia, then I get the following output:

[<http://purl.org/net/OCRe/OCRe.owl#OCRE400055>]
[<http://purl.org/net/OCRe/OCRe.owl#OCRE400057>]
[<http://purl.org/net/OCRe/study_protocol.owl#OCRE300010>]
[<http://purl.org/net/OCRe/study_protocol.owl#OCRE300012>]
[<http://purl.org/net/OCRe/study_protocol.owl#OCRE300001>]
[<http://purl.org/net/OCRe/study_protocol.owl#OCRE300011>]
[<http://purl.org/net/OCRe/study_protocol.owl#OCRE300000>]
[<http://purl.org/net/OCRe/study_protocol.owl#OCRE307000>]

The missing classes are also not returned if I request all indirect subclasses of owl:Thing. For most ontologies, I get the same results as with other reasoners, but for a few ontologies such trivial subclasses of owl:Thing seem to be missing.

andrewdbate commented 6 years ago

Hi Andreas. Thanks for reporting this. I will try to reproduce this locally and then get back to you as soon as time permits.

andrewdbate commented 4 years ago

@1030617255 It should would fine, but please be aware that you will need to use the OWL API version 4.5.0 or higher in the 4.x series with Sequoia.