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

missing inference (equivalent to bottomObjectProperty) #85

Open
tobiaswjohn opened this issue Oct 7, 2024 · 1 comment
Open

missing inference (equivalent to bottomObjectProperty) #85

tobiaswjohn opened this issue Oct 7, 2024 · 1 comment

Comments

@tobiaswjohn
Copy link

I am using openllet to infer axioms given an ontology and I think there is an axiom missing in some cases. I am not 100% sure if the axiom should be inferred, but HermiT does infer the "missing" equivalence axiom. Here is a minimal example for reproduction:
ontology:

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<r> rdfs:range <B> .   
<r> rdfs:range <C> . 
<B> owl:disjointWith <C> .    

call from program:

OWLOntology ont = loadTurtle(ontFile);
OWLReasoner openllet = OpenlletReasonerFactory.getInstance().createReasoner(ont);

List<InferredAxiomGenerator<? extends OWLAxiom>> gens = new ArrayList<>();
gens.add( new InferredEquivalentObjectPropertyAxiomGenerator());

InferredOntologyGenerator iog = new InferredOntologyGenerator(openllet, gens);
OWLOntology infOnt = manager.createOntology();
iog.fillOntology(ont.getOWLOntologyManager().getOWLDataFactory(), infOnt);

Openllet does not infer any axiom, but the following should be inferred:

EquivalentObjectProperties(<r> owl:bottomObjectProperty)
@tobiaswjohn
Copy link
Author

tobiaswjohn commented Nov 19, 2024

I discovered a similar case for dataProperties. I add the details here as I assume this is related to the same root cause.
For the following ontology, Openllet classifies the ontology as consistent although it is not. This is caused by the fact that the assertion EquivalentObjectProperties(:d owl:bottomDataProperty) is (wrongly) not inferred.

Ontology:

Prefix(:=<http://www.example.org/reasonerTester#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)

Ontology (

  Declaration(NamedIndividual(:a))
  Declaration(DataProperty(:d))
  Declaration(DataProperty(:ds))
  
  # this assertion triggers the inconsistency
  ClassAssertion( 
      DataSomeValuesFrom(
          :d
          DataIntersectionOf(
              rdfs:Literal
              DataOneOf("data") 
          )
      ) 
      :a
  )
  
  # next two axioms should lead to the inference that :dp=bottomDataProperty, but Openllet does not infer this
  
  DisjointClasses( 
      DataSomeValuesFrom(:d rdfs:Literal) 
      DataSomeValuesFrom(:ds rdfs:Literal) 
  )
  EquivalentDataProperties( :d :ds ) 
)

Call from program:

OWLOntologyDocumentSource source = new FileDocumentSource(ontFile, new FunctionalSyntaxDocumentFormat());
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
ont = manager.loadOntologyFromOntologyDocument(source);
OWLReasoner openllet = OpenlletReasonerFactory.getInstance().createReasoner(ont);

openllet.isConsistent()

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