fibo2023Q3 / src /etc /testing /hygiene_parameterized /testHygiene_properties_punning_equivalent.sparql
wikipunk's picture
add FIBO Q3 2023 release to src
38b6321
raw
history blame
925 Bytes
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
##
# banner We should avoid punning object and datatype properties
SELECT DISTINCT ?error ?property1 ?property2
WHERE
{
?property1 owl:equivalentProperty ?property2.
FILTER (regex(str(?property1), <HYGIENE_TESTS_FILTER_PARAMETER>) || regex(str(?property2), <HYGIENE_TESTS_FILTER_PARAMETER>))
{
?property1 rdfs:subPropertyOf*/rdf:type owl:DatatypeProperty.
?property2 rdfs:subPropertyOf*/rdf:type owl:ObjectProperty.
}
UNION
{
?property2 rdfs:subPropertyOf*/rdf:type owl:DatatypeProperty.
?property1 rdfs:subPropertyOf*/rdf:type owl:ObjectProperty.
}
BIND (concat ("ERROR: Equivalent property axiom for ", str(?property1), str(?property2), " mixes up object and datatype properties.") AS ?error)
}