-
Notifications
You must be signed in to change notification settings - Fork 35
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
UCO semi-open vocabularies need to become enumerations of xsd:string
s
#629
Comments
This proposal also has an impact on the implementation of Issue 549, as that issue adds a new vocabulary. |
A follow-on patch will regenerate Make-managed files. References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This partially undoes commit `aea0c04`, because of the introduction of `sh:targetObjectsOf` usage that would have a broad impact. This will return for review later. A follow-on patch will regenerate Make-managed files. References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
While UCO Issue 629 is in progress, the warnings cannot be satisfied in the data at the same time that CASE 1.3.0's rules are satisfied. A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This patch introduces a name scheme that does not align with a previous occurrence of this export, `observable:regionalInternetRegistry-shape-value-not-vocabulary-member`. This patch also does not apply the exporting pattern to `core:objectStatus`, because in that case the vocabulary is closed. A follow-on patch will regenerate Make-managed files. References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
References: * ucoProject/UCO#629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
No effects were observed on Make-managed files. References: * #629 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
The implementation has been completed and tested throughout the CASE example-sets, and an announcement is going out momentarily to the CDO ontologies list for a Solutions Approval vote. The summary of changes follows, provided for help because the PRs contain many changes, mostly but not all cookie-cutter:
And last, there is one group double-checking on backwards compatibility. With this bugfix merged:
Notes below describe some of the summarized points a bit further. There are two requests for feedback on code-style points. Object status(Feedback request)
Property shape IRI(Feedback request) The pattern of IRIs used for reviewing One occurrence of moving https://github.com/ucoProject/UCO/blob/1.3.0/ontology/uco/observable/observable.ttl#L12601-L12620 If there are requests to go with one IRI pattern over the other, please note so. Alternative shape designI'd suggested a pattern for moving the # ...
[
a sh:ValidationResult ;
sh:focusNode "SHA-1" ;
sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ;
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:InConstraintComponent ;
sh:sourceShape types:Hash-hashMethod-in-shape ;
sh:value "SHA-1" ;
]
# ... ... instead of this: # ...
[
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/hash-af4b0c85-b042-4e2d-a213-210b3d7f115c> ; # <-- Needed to find triple
sh:resultMessage "Value is not member of the vocabulary HashNameVocab." ;
sh:resultPath types:hashMethod ; # <-- Needed to find triple
sh:resultSeverity sh:Info ;
sh:sourceConstraintComponent sh:InConstraintComponent ;
sh:sourceShape types:Hash-hashMethod-in-shape ;
sh:value "SHA-1" ;
]
# Triple can be constructed from sh:focusNode, sh:resultPath, and sh:value
# ... Moving the Datatype reviewPrior DatatypeConstraints that were able to distinguish between Member assertionsPrior to this proposal, a vocabulary non-member mistakenly declared to be a member could be recognized as a typo and have a validation error raised. With this proposal, they now only raise validation |
Background
UCO gives sets of strings that suggest values to use for certain properties. UCO has called this the "Semi-open vocabulary" design pattern: While certain strings should be used, strings not included in UCO's ontology files can still be used instead when the user knows the value they are using is not yet in UCO, and/or might never be in UCO for whatever reason (e.g., confidentiality of non-public vocabularies).
UCO uses a syntax for its semi-open vocabularies that uses what has appeared to date to be an OWL design pattern for defining a datatype as a set of typed string values. However, it turns out the pattern used by UCO is invalid OWL syntax. Issue 593 covers half of the issues raised by an externally-developed OWL syntax reviewing tool, ROBOT1. Issue 593's correction has no known impact on user data.
The other half of the syntax correction takes this form, which unfortunately differs from UCO's user data guidance since UCO's earliest examples. Given the known non-0 impact on user data, this is being treated as a non-fast-track proposal.
Here is (again, selected for its small size) the Bitness vocabulary, as implemented in UCO 1.3.0 and long before:
Issue 593 cut the triple
[] owl:onDatatype xsd:string .
. This Issue finishes the OWL syntax correction by changing the members to values typed only asxsd:string
(which is the OWL-wide (IIRC, RDF-wide) default when no other type is stated):The syntax error this addresses is that the enumeration attempted to assign a datatype to the enumeration's member-literals; but, that datatype is not yet defined at the time the enumeration is being consumed by the parsing process, because they are inside the referenced datatype's definition. ROBOT describes this as a cyclic reference in a definition, and calls it a syntax error. The "Bug description" section below goes into the details describing why the cycle is also a symptom of another syntax error.
Requirements
Requirement 1
UCO vocabularies must adhere to OWL syntactic requirements for custom datatypes.
Requirement 2
Any UCO vocabulary
X
must not use itself as a datatype in its enumerated literals, due to OWL syntax requirements (cited in "Bug description" section).Risk / Benefit analysis
Benefits
xsd:string
in vocabularies resolves a blocking design question on JSON-LD context dictionaries, on how to assign datatypes to semi-open vocabulary properties without inducing SHACL errors when a value outside the suggested set is used.Risks
Competencies demonstrated
Competency 1
A hash is being migrated from UCO 1.3.0 to UCO 1.4.0. The form in UCO 1.3.0 is:
Competency Question 1.1
How is the hash supposed to be spelled with this proposal?
Result 1.1
Note that two lines are dropped: The
"vocabulary"
prefix from the context dictionary will never be needed by users, andhashMethod
no longer needs the typed-literal JSON object in its spelling.Competency Question 1.2
How is a hash using an algorithm name not in UCO supposed to be spelled?
Result 1.2
Competency Question 1.3
How should semi-open vocabulary properties' ranges be spelled?
Result 1.3
These properties' ranges should continue to be spelled as the union of
xsd:string
and the UCO Vocabulary IRI. The OWL 2 Syntax document, Section 9.4 gives an example for a restricted string-property. UCO's semi-open vocabulary still permits generalxsd:string
, so an OWL Union'd range should be used inowl:DatatypeProperty
s, and vocabulary membership should be reviewed with SHACL.Solution suggestion
No changes are necessary to the
owl:DatatypeProperty
OWL definitions currently using the semi-open vocabulary pattern, taking for exampletypes:hashMethod
:The SHACL shapes for the semi-open vocabulary pattern have been coming as trios of property shapes. They need to be adjusted as follows for the implementing next UCO SEMVER-minor release, so current data raises SHACL warnings instead of errors. Note that the
sh:Info
-severity "gentle suggestion" shape is now the shape that bears the enumeration.(An aside: the new
sh:Warning
shape makes some new cases that previously failed now pass as warnings, like using an integer forhashMethod
's value. Given the warnings, this feels like a low-risk relaxation.)For UCO 2.0.0, the first two shapes would combine, leaving the implementation as follows.
Due to a processing efficiency issue, one final modification from current practice is suggested: The "Gentle suggestion" property shape should change from an inlined, blank-node-identified
sh:PropertyShape
to a class-independent, IRI-identifiedsh:NodeShape
that uses the targeting statement... sh:targetObjectsOf types:hashMethod .
The reason for this is that certain SHACL reporting practices, like those used in UCO's unit testing, inline all blank node property shapes in the SHACL result-sets. For some vocabularies, especially longer ones that suggest intensive extension (in particular, the 200+-membervocabulary:ObservableObjectRelationshipVocab
), this could be hopelessly obscuring in the result sets whenever users engage in local vocabulary extension.This pattern is suggested for the implementation instead, to offer users (1) a reference to an IRI they can look up on the documentation site instead of getting an inlined and long anonymous shape, and (2) the opportunity to opt out of any specific "Gentle suggestion" shapes by using
sh:deactivate
:The replacement for the class's
sh:property
links would be as follows, using anrdfs:seeAlso
to preserve some reference on the documentation website without any other mechanical impact:If a user wishes to opt out of the gentle suggestions, they can add this triple in their extension SHACL shapes:
Bug description
While at least one tool reports that the current UCO vocabulary pattern is a cyclic definition error, the OWL syntax specification and RDF mapping documents together describe the problem as an inappropriate use of an OWL structure,
DatatypeDefinition
.Looking through the OWL 2 Mapping to RDF document, Table 16 includes this mapping:
IF this pattern is in the RDF graph G:
THEN the following axiom is added to the ontology OG:
For quick reference, the smbols above mean:
*:x
is an IRIy
is either a blank node or an IRIDR(z)
is a function mapping a nodez
to aDataRange
structre in the ontology OGDR
can be IRIs or blank nodesDR(z) ≠ ε
states thatDR(z)
is defined (or equivalently, the function at the valuez
is not empty)Taken together,
owl:equivalentClass
as a predicate between two certain nodes pertaining toDataRange
s imply aDatatypeDefinition
.*:x
being in aDatatypeDefinition
imposes a certain constraint on*:x
, with which UCO has been incongruous to date. Section 9.4 of the OWL 2 Syntax document defines that in the structureDatatypeDefinition ( DT DR )
, theDatatype
that is the first parameter (DT
, or*:x
, oruco-vocabulary:BitnessVocab
) is a "synonym forDR
..." And: "The datatypes defined by datatype definition axioms ... have empty lexical spaces and therefore they must not occur in literals."The example in the OWL 2 syntax document that immediately follows that quote illustrates a datatype
a:SSN
, which is part of a datatype definition that would be spelled like this in Turtle:Note the end of the example block states "there can be no literals of datatype a:SSN".
In UCO's case, there can be no literals of datatype
vocabulary:BitnessVocab
,vocabulary:HashNameVocab
, etc.Coordination
develop
for the next releasedevelop
state with backwards-compatible implementation merged intodevelop-2.0.0
develop-2.0.0
(or N/A)develop
branch updated to track UCO's updateddevelop
branchdevelop-2.0.0
branch updated to track UCO's updateddevelop-2.0.0
branchFootnotes
Disclaimer: Participation by NIST in the creation of the documentation of mentioned software is not intended to imply a recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that any specific software is necessarily the best available for the purpose. ↩ ↩2
The text was updated successfully, but these errors were encountered: