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

New ROBOT report checks for problematic assertions about built-ins #835

Closed
jamesaoverton opened this issue Mar 2, 2021 · 12 comments · Fixed by #867
Closed

New ROBOT report checks for problematic assertions about built-ins #835

jamesaoverton opened this issue Mar 2, 2021 · 12 comments · Fixed by #867

Comments

@jamesaoverton
Copy link
Member

In #833 we found a case where rdf:type was being asserted to be an OWL Annotation Property. This can lead to bad behaviour in any OWL processing tool. I don't want ROBOT to fail in that case, but we should let users know that this could be a problem.

So I think we should add a ROBOT report check for this sort of thing.

But beyond this specific case, I'm not sure what to check. Suggestions?

@cmungall
Copy link
Contributor

cmungall commented Mar 2, 2021

I think we'd want to go further. Basic annotation metadata e.g. IAO properties shouldn't be redefined

what about undeclared types? warning?

is this where having a closed world schema (over the RDF, not the OWL interpretation) can help? E.g. shex or linkml

I guess just adding to sparql queries is good for now, but we may want to have a mode to query over the direct RDF graph, as the OWLAPI can introduce things that mask the original problems

We could also have a punning warning. We can permit punning but often it is unintentional and a sign something has gone wrong.

@matentzn
Copy link
Contributor

matentzn commented Mar 3, 2021

The owl2dl profile validator in the OWL API has a lot of these implemented very efficiently; so we could look there.

As for the more general shex question: yeah, we need that.. But Maybe that is best addressed in an OMO ticket first - to get some community agreement.

@jamesaoverton
Copy link
Member Author

We have robot validate-profile but it is not catching the specific error I'm worried about. For DL it complains about missing operands, but I don't know what that means here. For Full it passes.

> robot validate-profile -i eupath.owl --profile DL
OWL 2 DL Profile Report: Ontology and imports closure NOT in profile. The following violations are present:
Not enough operands; at least two needed: ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000136> <http://purl.obolibrary.org/obo/ENVO_01000744>)) [EquivalentClasses(<http://purl.obolibrary.org/obo/EUPATH_0000093> ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000136> <http://purl.obolibrary.org/obo/ENVO_01000744>)) ) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/eupath.owl>) VersionIRI(<http://purl.obolibrary.org/obo/eupath/2021-01-08/eupath.owl>))]
Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf(<http://purl.obolibrary.org/obo/OBI_0000272> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/RO_0000058> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/BFO_0000054> <http://purl.obolibrary.org/obo/OBI_0600047>)))) [EquivalentClasses(<http://purl.obolibrary.org/obo/EUPATH_0000603> ObjectIntersectionOf(ObjectIntersectionOf(<http://purl.obolibrary.org/obo/OBI_0000272> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/RO_0000058> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/BFO_0000054> <http://purl.obolibrary.org/obo/OBI_0600047>)))) ) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/eupath.owl>) VersionIRI(<http://purl.obolibrary.org/obo/eupath/2021-01-08/eupath.owl>))]
Not enough operands; at least two needed: ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000136> ObjectIntersectionOf(<http://purl.obolibrary.org/obo/STATO_0000139> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/BFO_0000055> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/RO_0000059> <http://purl.obolibrary.org/obo/OBI_0002624>))))) [EquivalentClasses(<http://purl.obolibrary.org/obo/EUPATH_0010002> ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000136> ObjectIntersectionOf(<http://purl.obolibrary.org/obo/STATO_0000139> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/BFO_0000055> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/RO_0000059> <http://purl.obolibrary.org/obo/OBI_0002624>))))) ) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/eupath.owl>) VersionIRI(<http://purl.obolibrary.org/obo/eupath/2021-01-08/eupath.owl>))]
Not enough operands; at least two needed: ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000136> ObjectUnionOf(<http://purl.obolibrary.org/obo/ENVO_00010483> <http://purl.obolibrary.org/obo/ENVO_01000254>))) [EquivalentClasses(<http://purl.obolibrary.org/obo/EUPATH_0000587> ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000136> ObjectUnionOf(<http://purl.obolibrary.org/obo/ENVO_00010483> <http://purl.obolibrary.org/obo/ENVO_01000254>))) ) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/eupath.owl>) VersionIRI(<http://purl.obolibrary.org/obo/eupath/2021-01-08/eupath.owl>))]
Not enough operands; at least two needed: ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000136> <http://purl.obolibrary.org/obo/OMRSE_00000146>)) [EquivalentClasses(<http://purl.obolibrary.org/obo/EUPATH_0000342> ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000136> <http://purl.obolibrary.org/obo/OMRSE_00000146>)) ) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/eupath.owl>) VersionIRI(<http://purl.obolibrary.org/obo/eupath/2021-01-08/eupath.owl>))]
Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf(<http://purl.obolibrary.org/obo/EUPATH_0000309> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000142> <http://purl.obolibrary.org/obo/HP_0032178>))) [EquivalentClasses(<http://purl.obolibrary.org/obo/EUPATH_0015120> ObjectIntersectionOf(ObjectIntersectionOf(<http://purl.obolibrary.org/obo/EUPATH_0000309> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/IAO_0000142> <http://purl.obolibrary.org/obo/HP_0032178>))) ) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/eupath.owl>) VersionIRI(<http://purl.obolibrary.org/obo/eupath/2021-01-08/eupath.owl>))]

PROFILE VIOLATION ERROR http://purl.obolibrary.org/obo/eupath.owl violates profile DL
For details see: http://robot.obolibrary.org/validate-profile#profile-violation-error
Use the -vvv option to show the stack trace.
Use the --help option to see usage information.
> robot validate-profile -i eupath.owl --profile Full
OWL 2 Full Profile Report: [Ontology and imports closure in profile]

@matentzn
Copy link
Contributor

matentzn commented Mar 3, 2021

Hmm.. Maybe because its annotations and OWL 2 profiles only prescribe stuff on the logical axioms..

some check like

SELECT ?s ?o ?p
WHERE {
?s ?o ?p
FILTER(?s in [list of buildings]])
}

Would probably go some way towards catching the worst instances of the "illegal use of built in signature" problem?

@jamesaoverton
Copy link
Member Author

Ok. Where do we get a list of built-ins?

@matentzn
Copy link
Contributor

matentzn commented Mar 3, 2021

@matentzn
Copy link
Contributor

matentzn commented Mar 3, 2021

But does not cover owl language, will keep looking.

@matentzn
Copy link
Contributor

matentzn commented Mar 3, 2021

maybe everything in the owl, rdf, rdfs, skos namespaces?

@jamesaoverton
Copy link
Member Author

@zhengj2007 found this list of ontologies asserting rdf:type as an AnnotatationProperty. It's a lot ☹️ .

http://www.ontobee.org/ontology/OBIB?iri=http://www.w3.org/1999/02/22-rdf-syntax-ns%23type

OSCI
CLO
CIDO
SWO
OPMI
EUPATH
HTN
PSDO
APOLLO_SV
OHMI
LABO
OAE
FBBT
STATO
ORNASEQ
SDGIO
OHPI
LTHIDO (obo?)
TSO
CTO
ONS
KTAO
VIO
ICEO

@matentzn
Copy link
Contributor

!

@matentzn matentzn self-assigned this Apr 13, 2021
@matentzn
Copy link
Contributor

I would like to progress on this! I suggest to introduce at least a WARN for now, but eventually I would like this be moved to ERROR level

@matentzn
Copy link
Contributor

I implemented a very conservative first solution here, but only covering rdf:type. The problem with the rest is that its just too annoying to run these tests on merged ontologies, where IAO is, say merged in, and then you just see the IAO definitions. The rdf:type is a clear violation that should be avoided at all costs. We can add concrete other predicates to the check, but I would restrict this for now to language-internal stuff, rather than to the much larger use case of: don't redefine stuff from upper ontologies. This merrits a hole other approach.

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

Successfully merging a pull request may close this issue.

3 participants