refactor unsat object-checking to leverage object hierarchy, for reasoners that support that#1100
Merged
jamesaoverton merged 3 commits intoontodev:masterfrom May 3, 2023
Conversation
…for reasoners that support that - also, factoring unsat object-property checking into a separate function
cmungall
approved these changes
Feb 28, 2023
matentzn
reviewed
Mar 1, 2023
| if (unsatPs.size() > 0) { | ||
| logger.error("There are {} unsatisfiable properties in the ontology.", unsatPs.size()); | ||
| for (OWLObjectProperty p : unsatPs) { | ||
| logger.error(" unsatisfiable property: " + p.getIRI()); |
Contributor
There was a problem hiding this comment.
Isnt this log output redundant with the one in the end of getUnsatisfiableObjectProperties?
Contributor
Author
There was a problem hiding this comment.
Thanks @matentzn - yes indeed. Fixed in a new commit.
Member
|
Sorry for the long delay with this. The code looks good and I got major speed improvements in my tests. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1096
docs/have been added/updated - N/Amvn verifysays all tests passmvn sitesays all JavaDocs correctCHANGELOG.mdhas been updatedSummary
Here, I've modified the way the reasoner validate step checks for unsatisfiable object properties.
Before, an algorithm was implemented (by @cmungall in #133) that was needed for reasoners (like Elk) that don't support computation of the object-property hierarchy. That method is maintained here, but wrapped in a new method
ReasonerHelper.getUnsatisfiableObjectProperties(), which uses the old technique only for reasoners that don't report that they can pre-compute the object-property hierarchy.Reasoners that can pre-compute that hierarchy use a new simpler technique: computation of the object-property hierarchy, followed by checking of the bottom node for any named object-properties other than the OWL bottomObjectProperty - those are unsatisfiable.
Regardless of the technique used, the method returns the unsatisfiable properties to the main validate() method, where they are reported as before.
Testing
I've updated the tests for unsat properties (added as part of #133) to check behavior under the HermiT and Elk reasoners, as representative examples of reasoners that use each of the two main branches of
getUnsatisfiableObjectProperties()(before, the tests only covered use of Elk).