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

remove --axioms external is removing transitivity axioms from in-base properties #1108

Closed
Tracked by #794
gouttegd opened this issue Apr 3, 2023 · 3 comments · Fixed by #1187
Closed
Tracked by #794

remove --axioms external is removing transitivity axioms from in-base properties #1108

gouttegd opened this issue Apr 3, 2023 · 3 comments · Fixed by #1187
Assignees

Comments

@gouttegd
Copy link
Contributor

gouttegd commented Apr 3, 2023

When using robot remove --base-iri <BASE_IRI> --axioms external to remove axioms relative to “external” entities (entities that are not in the <BASE_IRI> namespace), all object properties within the base IRI namespace lose their transitive characteristic.

Minimal example to reproduce:

Prefix(owl:=<http://www.w3.org/2002/07/owl#>)

Ontology(<http://example.org/untitled-ontology/>

Declaration(ObjectProperty(<http://example.org/UO_0001>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/IAO_0000589>))

AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000589> <http://example.org/UO_0001> "example_property"@en)
TransitiveObjectProperty(<http://example.org/UO_0001>)
SubObjectPropertyOf(<http://example.org/UO_0001> owl:topObjectProperty)

)

Observe that the http://example.org/UO_0001 property is declared to be transitive.

Using the following command to remove any entity outside of the http://example.org/UO_ namespace:

$ robot remove -i input.ofn --base-iri http://example.org/UO_ --axioms external -o output.ofn

yields an output ontology where the http://example.org/UO_0001 property is still present (as expected since it belongs to the specified base IRI namespace) but is no longer transitive:

Prefix(owl:=<http://www.w3.org/2002/07/owl#>)

Ontology(<http://example.org/untitled-ontology/>

Declaration(ObjectProperty(<http://example.org/UO_0001>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/IAO_0000589>))

AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000589> <http://example.org/UO_0001> "example_property"@en)
SubObjectPropertyOf(<http://example.org/UO_0001> owl:topObjectProperty)

)

As explicitly confirmed by a robot diff:

$ robot diff --left input.ofn --right output.ofn
1 axioms in left ontology but not in right ontology:
- TransitiveObjectProperty(<http://example.org/UO_0001>)

0 axioms in right ontology but not in left ontology:
@gouttegd
Copy link
Contributor Author

gouttegd commented Apr 3, 2023

Observed with ROBOT-1.9.1, ROBOT-1.9.2, and with a locally built version from the tip of the master branch as of March 28.

@matentzn matentzn self-assigned this Apr 3, 2023
@matentzn
Copy link
Contributor

matentzn commented Apr 3, 2023

I remember this issue from long ago, and I think I know how to fix it.

@matentzn
Copy link
Contributor

matentzn commented Mar 2, 2024

Ok this is constituted the last major issue on my ODK testing spree. It is not a disaster, but for ontologies that coin object property characteristics and axioms (including domain/range!), they will never be included in the base release until this is fixed.

I have put in hotfix for RO (oborel/obo-relations#793) for now, and anyone who is harmed by that issue can feel free to do the same.

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

Successfully merging a pull request may close this issue.

2 participants