Closed ajnelson-nist closed 5 months ago
Update: This proposal initially included several shapes using sh:targetObjectsOf
on OWL sequence-valued predicates. In this comment on the PR, I concluded that it would be better for issue remediation to use sh:targetSubjectsOf
instead, so the PR now implements shapes targeting predicates' subjects.
Bug description
As part of reviewing UCO's syntax for semi-open vocabularies before UCO 1.0.0 (done in Issue 406), some shapes were written to check the syntax for OWL definitions of custom datatypes. Those shapes recognized some requirements OWL makes on
rdf:List
, but incorrectly scoped them to apply to allrdf:List
s. This causes some issues with review of certain OWL "A-Box" review (used for representing individuals, i.e. instances of the classes and users of properties from the "T-Box"), as well as SHACL review.The shapes around
rdf:List
,rdf:first
, andrdf:rest
currently in the UCO OWL shapes file need to be revised to be scoped to OWL. This will mean going with a more strict enumeration style, following the rule-matching in the OWL 2 Web Ontology Language Mapping to RDF Graphs (Second Edition).This Issue houses a bug report and a remediating Change Proposal. It appears complex enough to me to need a Requirements Review vote.
Steps to reproduce
These RDF snippets should not cause UCO's SHACL validation to fail, but currently they do:
The above instance-data snippet is drawn from Example 41 in the SKOS reference Section 9.3.
The above SHACL supplementary snippet is drawn from DASH Data Shapes Vocabulary Section 8.1, where the prescribed usage of the shape follows this general form:
As an aside, a sibling shape snippet,
dash:StringOrLangString
, could support a goal in the CASE backlog (ONT-6) of supporting language strings without universally requiring language string annotations. (I was informed of this shape in discussion on this pySHACL issue.)Requirements
Requirement 1
UCO's OWL review must not prevent other RDF idioms that are not necessarily within OWL's purview (e.g. instance-data
rdf:List
s and SHACL constructs).Risk / Benefit analysis
Benefits
Risks
sh:PropertyShape
s will likely need to remainsh:PropertyShape
s when reduced to a deactivated stub, in order to continue satisfying any incorporations by thesh:property
predicate.rdf:List
s used in support of UCO's semi-open vocabulary design pattern. Unfortunately, while the SHACL-specific lists can now be given IRIs and incorporated by IRI reference, the OWL custom-datatype definitions are still affected, so there may be only a few cases where ardf:List
can be de-duplicated in support of semi-open vocabularies.Competencies demonstrated
UCO's OWL review should not raise any issues for the DASH and SKOS usage patterns described above. The examples are encoded in updated unit tests accompanying this Issue.
Solution suggestion
uco-owl:List-shape
; split its functionality into three other shapes.uco-owl:Sequence-shape
houses review rules for OWL Sequences, narrower in scope thanrdf:List
s.rdf:List
s.sh:node
.uco-owl:rdf-first-subjects-shape
anduco-owl:rdf-rest-subjects-shape
perform structural review that is generalizable tordf:List
- that if either predicate is used on some subject node N, then N has both of the predicates exactly once.uco-owl:List-shape
is retained, untargeting and deactivated, to maintain IRI availability as part of backwards compatibility.sh:node
.For instance, for
owl:oneOf
, this new shape is defined:This issue leaves the following out of scope, to remain focused on fixing the overly-broad review bug:
owl:oneOf
should be further constrained based on whether it is being used for anObjectOneOf
orDataOneOf
construct. That will come in a future proposal.)owl:Restriction
s.)Coordination
develop
for the next releasedevelop
state with backwards-compatible implementation merged intodevelop-2.0.0
develop-2.0.0
(N/A)develop
branch updated to track UCO's updateddevelop
branchdevelop-2.0.0
branch updated to track UCO's updateddevelop-2.0.0
branch