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

Protege 5.0b15 doesn't update the Object Property Description view #105

Closed
tsarkov opened this issue Jan 6, 2015 · 2 comments
Closed

Protege 5.0b15 doesn't update the Object Property Description view #105

tsarkov opened this issue Jan 6, 2015 · 2 comments

Comments

@tsarkov
Copy link
Contributor

tsarkov commented Jan 6, 2015

A simple ontology

P domain A
A ⊑ =1 P.⊤
Q ⊑ P
A ⊑ =1 Q.⊤

entails

P ≡ Q
.

HermiT is able to perform that inference and it is correctly shown in the 'Object Property Hierarchy (inferred)' view. However this does not show up on the 'Description' view of the 'Object Property' tab. One would expected the same behaviour as on the Classes tab, when newly inferred equivalent classes appear on the 'Description' view highlighted.

@ykazakov
Copy link
Contributor

I tried your example briefly. I think it is indeed a bug (I can reproduce). Clearly not related to #128.

I looked at the sources, specifically at OWLEquivalentObjectPropertiesAxiomFrameSection where equivalent object properties are handled (both stated and inferred). For some unclear to me reason, the logic here is different from OWLEquivalentClassesAxiomFrameSection which similarly handles equivalent classes axioms.

Specifically, I think, similarly to the implementation of OWLEquivalentClassesAxiomFrameSection the field "added" should be a set of OWLObjectPropertyExpression rather than OWLEquivalentObjectPropertiesAxiom: before displaying inferred equivalent properties (see refillInferred()), the code checks if the equivalence axiom consisting of all inferred equivalent properties is stated. If it is not stated, it is displayed. Clearly, this is not as intended: we want to display equivalent properties that are not part of the stated equivalence axioms. But that is not directly related to your example.

For your example, if I choose, say property P the description should display the inferred equivalent property Q. It does not happen because in the method refillInferred(), first all equivalent properties of the root object (in our case P) are computed (equivs=[P,Q]), then the root object is removed (equivs=[Q]) after which the equivalence axiom for equivs is displayed provided equivs.size() > 1, which is not the case here. A quick fix here is comment the line with equivs.remove(getRootObject()); (line 70), after which Q gets correctly displayed (I think the code for displaying the equivalence axiom already takes care of removing the root object anyway). However, the displayed row for the inference is for some reason editable (there are buttons with x and o), so I think there are some other problems here.

So I think someone more knowledgeable about the internals of Protege should take a closer look at this. I think, some refactoring here should be necessary. Ideally, the code for displaying equivalent classes and equivalent object properties should be somehow unified, because the logic seems the same to me. Likewise the code for displaying stated and inferred sub-classes, sub- object properties, sub- data properties etc. also should probably be unified.

@ykazakov
Copy link
Contributor

Here is the screenshot for your example after commenting line 70 in OWLEquivalentObjectPropertiesAxiomFrameSection

screen shot 2015-02-25 at 16 18 59

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

2 participants