protegeproject / explanation-workbench

A plug-in that adds explanation facilities to the Protege Desktop ontology editor.
3 stars 9 forks source link

Explanation for equivalence from reciprocal subclasses doesn't load with ELK #14

Open balhoff opened 7 years ago

balhoff commented 7 years ago

If two classes are inferred by ELK to be equivalent due to being reciprocal subclasses, trying to get an explanation will result in a blank window. This does work with HermiT. You must try with ELK before trying with HermiT, because if HermiT has already provided an explanation, it will simply be shown again when you repeat with ELK. Here is an example ontology:

Prefix(:=<http://example.org/>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)

Ontology(<http://example.org/>

Declaration(Class(<http://example.org/#A>))
Declaration(Class(<http://example.org/#B>))
Declaration(Class(<http://example.org/#C>))
Declaration(Class(<http://example.org/#D>))

EquivalentClasses(<http://example.org/#A> <http://example.org/#D>)

EquivalentClasses(<http://example.org/#B> <http://example.org/#C>)

SubClassOf(<http://example.org/#B> <http://example.org/#A>)

SubClassOf(<http://example.org/#D> <http://example.org/#C>)

)

Run the reasoner, select term A, then get explanation for equivalence with B.

@matthewhorridge this is the issue I mentioned.

ykazakov commented 7 years ago

When getting explanations with ELK, it issues a warning: [reasoner.indexing.IndexedObjectUnionOf]ELK does not support positive occurrences of ObjectUnionOf. Reasoning might be incomplete! You can see this warning in the Protege log if you have ELK warnings disabled. The warning happens because the explanation workbench transforms the entailment queries to concepts with negations and ELK does not support full negation. So it should be an explanation workbench issue.

F.Y.I., the latest snapshot of ELK can provide native proof-based explanations. They are much faster to compute and could be easier to understand because every derivation step is shown. You can try it by downloading ELK from here and the proof explanation plugin from here. Unzip the files and put all jar files to the Protege plugins folder. Here is a paper describing these plugins. Your feedback will be welcomed! The projects are hosted on github: https://github.com/liveontologies/elk-reasoner https://github.com/liveontologies/protege-proof-explanation