You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 75f6e8f
Browse filesBrowse the repository at this point in the historyBrowse files
The derived-datatype guard names the SPARQL evaluator as its cause, now that the store keeps the datatype (#335)
Cause. `datatype_is_indistinguishable_in_store` and every skip it drives
(the direct sh:datatype constraint on node and property shapes, the sh:or,
sh:not and qualified members, the sh:node compiler) said the STORE does not
preserve the twelve integer-derived XSD types and xsd:dateTimeStamp. Since
the previous commit it does. Re-derived by measurement on the new pin
(every XSD datatype inserted, DATATYPE() and STR() read back, and the term
read back by projection): the store keeps all of them; DATATYPE() in the
unpatched evaluator still answers xsd:integer for exactly the twelve and
xsd:dateTime for xsd:dateTimeStamp, for stored and query-text literals.
Every check here is a DATATYPE() test, so the guard is still needed, for
exactly the same thirteen IRIs, and no skip can be removed.
Change. Wording only, no verdict or set changes:
- the function's doc states the evaluator cause, the #335 history, and the
measured set;
- the skip reason (shared `unpreserved_datatype_skip` and the node-level
one) now reads "the SPARQL evaluator reads this datatype IRI as the type it
derives from, so DATATYPE() cannot tell a value carrying it from one
carrying that type; the constraint was not evaluated";
- the in-code comments at each guard, the indistinguishable test file's
module doc, adversarial_shacl_test's control (whose `contains` check moves
from "does not preserve" to "DATATYPE() cannot tell"), and decision 0018's
control paragraph say the same.
Verification. tests/datatype_preservation_test.rs (previous commit) pins the
thirteen in both directions against DATATYPE(); the indistinguishable,
adversarial, or/not/qualified/node tests all pass unchanged in verdict.
Full cargo test on this tree: 2075 passed, 0 failed, 2 ignored. cargo
clippy --all-features --all-targets -D warnings: clean. W3C: gated 61, full
tuple 53, report match 51 of 56; baseline byte-identical. Python suite
(pyoxigraph 0.5.13, pyshacl 0.40.1, rdflib 7.6.0) against this binary, with
tests/test_align.py and test_align_failed_insertion.py left out because numpy
crashes on import on this machine: 253 passed, 17 skipped (missing optional
extras, and the three-way file's release-binary lookup); then the three-way
horn differential with the binary linked where it looks: 16 passed, 1
opt-in skip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/shacl.rs
+32-26Lines changed: 32 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -556,7 +556,7 @@ impl ShaclValidator {
556
556
"shape": strip_angle_brackets(&shape_iri),
557
557
"constraint":"sh:datatype",
558
558
"reason": format!(
559
-
"the store does not preserve <{dt}>; a conforming value and a widened one are the same term, so this cannot be decided"
559
+
"the SPARQL evaluator reads <{dt}> as the type it derives from, so DATATYPE() cannot tell a conforming value from one of that type; this cannot be decided"
560
560
),
561
561
}));
562
562
continue;
@@ -796,7 +796,7 @@ impl ShaclValidator {
796
796
// and the run came back CLEAN. Same defect in sh:in and sh:not.
0 commit comments