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

Create an option to dump a list of explanations for unsatisfiable classes #329

Closed
5 of 6 tasks
cmungall opened this issue Aug 1, 2018 · 11 comments
Closed
5 of 6 tasks

Comments

@cmungall
Copy link
Contributor

cmungall commented Aug 1, 2018

A complement to #174

Analogous owltools option: -e or run-reasoner command. owltools dumps a flat list of axioms in the explanation rendering IRIs as IRI-label pairs.

For robot, it would be super-awesome to have something similar, but more user friendly

  • ability to render as markdown, for easy pasting into tickets (I have made probably 100s of github tickets with protege UI explanation screenshots, which are not very searchable)
  • use of nesting, as in the Protege explanation UI
  • option to render source ontology(s) of each axiom [v useful for debugging where an errant import is often to blame]

Protege will find all explanations but will allow you to interrupt its search. I personally think the choice of explanation is abitrary and would be happy for the tool to include just one.

  • Maybe an option to find max N.

  • Bonus: in an ontology with multiple unsats, it can be useful to start with the one with the most minimal explanation, typically the MRCAs of all unsats in the asserted hierarchy. It may even be possible to combine explanations to find the most likely offending axiom.

  • Bonus bonus: plug in kboom to use probabilistic OWL inference to find the most likely overall resolution...

I believe @matentzn is working on something like this. I am neutral as to whether this is part of robot or a separate dependency on maven central that robot can include.

@balhoff
Copy link
Contributor

balhoff commented Aug 1, 2018

ability to render as markdown, for easy pasting into tickets

This would be awesome.

option to render source ontology(s) of each axiom

Would be nice as a title attribute to show as tooltip (not sure how to do that in markdown). Protege is supposed to show this but it seems to have broken a while back (the tooltips claim all the axioms have source "inferred").

@beckyjackson
Copy link
Contributor

Does the explain command meet this request?

@balhoff
Copy link
Contributor

balhoff commented Jan 30, 2019

I think this could reuse the functionality in ExplainOperation, but it would be a little more specific. It would need to get the list of unsatisfiable classes "Xs" and then ask for the explanation for each axiom of the form X EquivalentTo owl:Nothing. This could potentially be thousands of computations and very slow, so adding an algorithm to guess at the most general problem class would probably be important. So, I think there is more work to do before closing this.

@cmungall
Copy link
Contributor Author

cmungall commented Feb 2, 2019

not sure what you mean, I do this manually in Protege all the time, the first explanation is always fine

@balhoff
Copy link
Contributor

balhoff commented Feb 2, 2019

I mean what you wrote in your “bonus” above. We can take just one explanation for each, but I frequently see thousands of unsatisfiable classes at once.

@matentzn
Copy link
Contributor

matentzn commented Feb 4, 2019

FYI The algorithm for computing the most general unsatisfiable classes is called root unsatisfiable classes; https://www.sciencedirect.com/science/article/pii/S1570826805000260
https://pdfs.semanticscholar.org/87f3/7150aedbfd59b772241081ef81edc1249158.pdf
Maybe there even is something in the @matthewhorridge explanation framework that does it by now.

@balhoff
Copy link
Contributor

balhoff commented Feb 4, 2019

Nice, thanks @matentzn!

@matthewhorridge
Copy link

There is some – possibly shoddy ;) – code in the explanation package for computing root/derived unsatisfiable classes. See this interface and this implementation.

I do recall there being some basic problems with original definitions of root/derived unsatisfiable classes but, right now, I'm struggling to remember the exact problems, other than that they were broken. I also can't find my notes from 10 years ago. I think the formal definition, that was couched in terms of justifications, was broken as I came up with some counter examples. If I think of them, I'll post them.

@matentzn
Copy link
Contributor

matentzn commented Feb 3, 2020

I would like to mention that I would be veeeery interested in this ticket to be implemented. I am currently faced with huge ontologies and unsats all the time, and I would like a way I can dump a random (ideally root) justification for x unsatisfiable classes as markdown (some parameter to say: dump unsat explanations, if any, and another to restrict the number, in case there are thousands).

@matentzn
Copy link
Contributor

@balhoff and I have implemented most of what this ticket is asking for now in #779

I wont consider the kboom request as part of this ticket, but I will do the "source ontology" one.

beckyjackson pushed a commit that referenced this issue Jan 20, 2021
* Updated explain command

Various updates

* Update CHANGELOG.md

* Render source ontology of axioms in Markdown

see #329 (comment)

* Added new option for unsats: most_general

see #686 (comment)

Another method for avoiding redundant explanations.

* Create uvula_multiple_unsat_all_explanation.md

Added because missing for CI testing

* Added missing examples

* Adding a bit of determinism to subset unsat

* Regularise order of axiom summary

* Regularise list of unsat order

* Some last fixes
@beckyjackson
Copy link
Contributor

I believe #779 resolved this, but please reopen if you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants