prefix owl: prefix rdf: prefix rdfs: prefix skos: prefix xsd: ## # banner Definitions shouldn't be circular - this finds direct circularities therein. SELECT DISTINCT ?error ?definition ?label WHERE { ?subject rdfs:label ?label . FILTER NOT EXISTS {?subject owl:deprecated "true"^^xsd:boolean} . ?subject skos:definition ?definition . FILTER NOT EXISTS {?subject a owl:NamedIndividual} . FILTER (REGEX(?definition, "\\W"+?label+"\\W")) FILTER regex(str(?subject), ) BIND ( concat ("PRODERROR: Definition of ", str(?subject), " is immediately circular ") AS ?error ) }