owlcs/owlapi

Declared reserved entities not visited by UseOfReservedVocabularyForAnnotationPropertyIRI

hkir-dev opened this issue · 2 comments

Only declaring an illegal annotation property is not triggering UseOfReservedVocabularyForAnnotationPropertyIRI violation.

<?xml version="1.0"?>
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/fbbt/fbbt-simple.owl#"
     xml:base="http://purl.obolibrary.org/obo/fbbt/fbbt-simple.owl"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
    <owl:Ontology rdf:about="http://purl.obolibrary.org/obo/test.owl">
    </owl:Ontology>
    
    <!-- THIS AXIOM IS ILLEGAL --> 
    <owl:AnnotationProperty rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>

</rdf:RDF>

Violation is raised only if the illegal annotation is used by other ontology elements.

<?xml version="1.0"?>
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/fbbt/fbbt-simple.owl#"
     xml:base="http://purl.obolibrary.org/obo/fbbt/fbbt-simple.owl"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
    <owl:Ontology rdf:about="http://purl.obolibrary.org/obo/test.owl">
    </owl:Ontology>
    
    <!-- THIS AXIOM IS ILLEGAL --> 
    <owl:AnnotationProperty rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
    
    <owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasDbXref">
        <rdfs:label>database_cross_reference</rdfs:label>
        <rdfs:subPropertyOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
    </owl:AnnotationProperty>

</rdf:RDF>

Fixing the issue as described here is easy, but when I looked at whether declaration axioms for annotation properties should be checked I found the following:

owlcs/argo#2

There's a long list of arguments in favor of ignoring violations related to annotation properties. Sounds like this change might go against those arguments. @matentzn what do you think?

I don't believe we ever got to do anything with warnings versus violations.

The main argument is it seems that only violations that threaten reasoner guarantees are important, but we do have other concerns, for example well defined serialisations. And in this case we are talking about a logically meaningful property (RDF:type) which is not only used illegal, but implicitly punned, and illegal pinning is reported, usually. I think the profile violation checker should stick with the spec. I am not arguing here for draconian error handling in parsing. I don't see a concrete risk for this particular profile check..