Skip to content

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

@gouttegd

Description

@gouttegd

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:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions