ucoProject / UCO

This repository is for development of the Unified Cyber Ontology.
Apache License 2.0
74 stars 34 forks source link

Current SHACL-SPARQL syntax has erroneous value-variable reference #499

Closed ajnelson-nist closed 1 year ago

ajnelson-nist commented 1 year ago

I recently observed some redundant-looking SHACL error reports from the UCO-OWL review shapes. On review of the examples in the SHACL specification, the spelling pattern used in some SHACL-SPARQL components of UCO has been observed to be incorrect. The SPARQL variable spelling pattern, spelled in Sections 5.3.1 and 5.3.2, showed an error in how certain variables have been designated in UCO.

Section 5.3.1 designates pre-bound SPARQL variables, spelled with a leading $. 5.3.2 designates specially-interpreted, but regularly-spelled SPARQL variables, to be spelled with a leading ?.

$value is currently used in UCO SHACL-SPARQL selectors, and is also not included in SPARQL SELECT clauses. Either of these effects mean that the generated sh:ValidationResult will be slightly incorrect.

The correct practice is to use ?value (question mark instead of dollar sign) as the variable, and to include that variable in the SELECT clause.

Current behavior of the SHACL-SPARQL constraints is that they do find constraints, but the sh:value component of the sh:ValidationResult is unbound, and defaults to the sh:focusNode. This makes addressing the reported issues unnecessarily difficult.

This Issue is being posted as a bugfix, not requiring a committee vote to implement.

Coordination