-
Notifications
You must be signed in to change notification settings - Fork 34
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
Authoritative IRI prefixes #457
Comments
I disagree with the premise of this proposed change. In short, I believe that this proposed change is:
|
@sbarnum This was a pretty surprising proposal for me to work through. I think at least it identifies a potential behavioral bug stemming from usage of I won't argue hard for or against this proposal, as I see technical benefits paired with non-trivial maintenance cost. |
SHACL Specification Section 5.2.1 specifies a "viral" behavior of `sh:declare` throughout an OWL transitive closure. This patch removes usage of `sh:declare` as a matter of lack of authority for non-UCO prefixes. It just so happens the only place this was used was in the introduction of the OWL SHACL review mechanisms of Issue 406. A follow-on patch will regenerate Make-managed files. References: * #406 * #457 Signed-off-by: Alex Nelson <[email protected]>
References: * #406 * #457 Signed-off-by: Alex Nelson <[email protected]>
I'm pulling this off of today's agenda. I think the JSON-LD context can survive without this proposal. |
The new typo checking feature of `case_validate` flags usage of the IRI serving as the `uco-core:` prefix as an unrecognized concept. Rather than determine how to encode a definition for the prefix IRI within the ontology, this patch removes usage of `sh:declare`, due to downstream side-effects noted during development of UCO Issue 457. No effects were observed on Make-managed files. References: * casework/CASE-Utilities-Python#77 * ucoProject/UCO#457 Signed-off-by: Alex Nelson <[email protected]>
Background
RDF graphs tend to include a mechanism for declaring namespace prefixes. JSON-LD context dictionaries are one way of specifying a set of prefixes to be used within individual graph files.
@kfairbanks, in developing context dictionaries for UCO, has had to make an assumption about how to pick the prefixes for namespaces (i.e.
uco-action
forhttps://ontology.unifiedcyberontology.org/uco/action/
). This means a decision implemented in the scope of JSON-LD context construction is the authoritative set of prefixes for UCO JSON and JSON-LD users. This feels (to the submitter) like not quite the right scope, and UCO should instead make an encoding on the ontologies as the authoritative prefix.By luck, each of the ontologies where this is relevant (i.e. supplies a class, property, or datatype) already kind of has that encoding, in an
rdfs:label
. However,rdfs:label
doesn't quite fit the needs:xsd:string
(without language label) orrdf:langString
(bearing language label).rdf:langString
s.rdfs:label
should be written for people or written for automated consumption."UCO Action Ontology"@en
is a legitimate label style.To support at least the context dictionaries, UCO should add one or both of these features to each ontology in UCO (and likewise for CASE):
skos:notation
that contains the authoritative prefix, datatypedxsd:string
.sh:declare
is another mechanism that enables a prefix declaration.However, by a consequence of the SHACL spec, this appears to be ... "virally" authoritative.
The scope of a SHACL
sh:PrefixDeclaration
expands beyond the ontology file in which it's declared, and is instead the entirety of importers' OWL transitive closure. SHACL Spec, 5.2.1:sh:PrefixDeclaration
s are optional mechanisms that assist with SHACL-SPARQL. It is possible to avoid their use, and instead usePREFIX
SPARQL statements in any SHACL-SPARQL constraints.The proposed UCO MIME Taxonomy includes SHACL shapes that enact constraints on
skos:notation
. Interpretations of SHACL severity are based on informal language from the SKOS Reference document. From [Section 6.5.2], it appears there should only be oneskos:notation
on a concept per datatype on the notation's literal---but, the descriptive language falls short of making this a "MUST"-level requirement.Requirements
Requirement 1
CDO ontologies (that is, each
owl:Ontology
) must each declare a namespace prefix for its usage.Requirement 2
CDO ontologies must not create
sh:PrefixDeclaration
s for any namespaces over which they do not have authority (i.e. not having domain*.unifiedcyberontology.org
,*.caseontology.org
, etc.).Risk / Benefit analysis
Benefits
skos:notation
is meant to bear only one value per datatype.A. However, this is not a "MUST"-level requirement.
sh:PrefixDeclaration
makes an expansive stake to a prefix among downstream adopters of UCO. The expansiveness of this greatly assists with UCO settling the question of whether its prefixes could eschew the "uco-" pre-prefix: No, they shouldn't, because of conflicts with existing ontologies (such as UCO'stime
vs. OWLtime
).sh:PrefixDeclaration
mimics the effect of needing to do chaining imports of JSON-LD context dictionaries.sh:PrefixDeclaration
andskos:notation
embrace mechanisms from existing standards, saving on design. Combining the two leads to a stronger UCO review mechanism (illustrated in Competency Question 1.2 below).Risks
skos:notation
could entail UCO needing askos:ConceptScheme
inuco.ttl
. ThisConceptScheme
would have each UCO-developed ontology as a member.A. While this would give the benefit of a SKOS-based uniqueness test, it would be an additional piece of technical debt passed to downstream ontologies (e.g. CASE) that would need their own
ConceptScheme
, largely duplicative, due to scope of authority.skos:notation
, currently housed in the UCO MIME Taxonomy, can be brought into UCO, without necessitating aowl:import
of all of SKOS.sh:declare
would make any importer (usingowl:imports
) of UCO need to not use any prefix UCO uses for a different namespace. This led to Requirement 2.A risk not necessarily scoped to this proposal is there is now another review step for using
owl:imports
statements: The OWL transitive closure needs to be reviewed forsh:declare
s causing conflicting prefixes. Theoretically SHACL-SHACL (SHACL used to review a SHACL graph) would handle this review of a monolithic ontology build.Competencies demonstrated
Competency 1
A knowledge base has imported an ontology that imported CASE (which imports UCO). The knowledge base includes these statements:
Competency Question 1.1
A user is interested in knowing what ontology prefixes are in the knowledge base.
Result 1.1
With the current state of UCO's
develop
, these would be the results:As a development aid,
sh:prefix
was used in the OWL SHACL review mechanism. This proposal would nix those shapes.Competency Question 1.2
A user is interested in knowing what ontology prefixes are defined authoritatively in the knowledge base, by merit of having a
skos:notation
matching a prefix.Result 1.2
With the current state of UCO's
develop
, these would be the results:(Note also the difference in trailing slash.)
On adoption of this proposal, these could be the results:
Note that namespaces that do not provide concepts (classes, properties, or datatypes) currently do not seem like they would need a prefix declared. Hence,
uco-master
would not be given ash:PrefixDeclaration
.uco-co
anduco-owl
also do not provide concepts, but instead provide only shapes for existing concepts, so it's debatable whether they should be given ash:PrefixDeclaration
.Solution suggestion
sh:declare
block from/ontology/owl/owl.ttl
.owl:Ontology
that defines a class, property, or datatype (this would not includeuco-co
,uco-master
, oruco-owl
):sh:PrefixDeclaration
, binding the prefix currently housed inrdfs:label
but without the language tag.skos:notation
) Add askos:notation
, bearing the contents currently housed inrdfs:label
but without the language tag.rdfs:label
.skos:notation
) Import theskos:notation
shape from the UCO MIME Taxonomy.skos:notation
) Add to UCO CI a test thatsh:PrefixDeclaration
s within UCO are only used in "authoritative" scope.Coordination
develop
The text was updated successfully, but these errors were encountered: