Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SubClassAxiom missing when using reflexive property #93

Open
tobiaswjohn opened this issue Feb 7, 2025 · 0 comments
Open

SubClassAxiom missing when using reflexive property #93

tobiaswjohn opened this issue Feb 7, 2025 · 0 comments

Comments

@tobiaswjohn
Copy link

I am using Openllet to compute the class hierarchy of an ontology. I discovered a case, where Openllet does not infer a SubClass axiom, although it is entailed. I cross-checked with HermiT and ELK, which both infer the axiom.

  • Here is a minimal example:
Prefix(:=<http://example.org#>)
Ontology(
    Declaration(Class(:A))
    Declaration(Class(:B))
    Declaration(ObjectProperty(:p))
    
    ReflexiveObjectProperty(:p)
    EquivalentClasses( :B ObjectSomeValuesFrom(:p :A) )
)
  • The problem: The axiom SubClassOf(:A :B) is entailed but not inferred by Openllet.

  • 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);

// compute class hierarchy
InferredSubClassAxiomGenerator subClassGenerator = new InferredSubClassAxiomGenerator();
if (openllet.isConsistent()) {
  openllet.precomputeInferences(InferenceType.CLASS_HIERARCHY);
  Set<OWLSubClassOfAxiom> subClassAxioms = subClassGenerator.createAxioms(manager.getOWLDataFactory(), openllet);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant