source · output · proof · check · playground
The question
Which reading exceeds ten metres per second after unit conversion?
Historical background
SHACL standardized property paths and numeric constraints for validating RDF in 2017. Measurement vocabularies also have to represent the units in which values were taken. The example brings these two concerns together by converting speed readings before checking the limit on a path through the graph. W3C, 2017 SHACL Recommendation · QUDT overview
What we tell eyemind
QUDT conversion runs before the SHACL shape follows a sequence path into the generated quantity. Both readings enter in kilometres per hour. The conventions follow QUDT.org, CDT and W3C SHACL.
What eyemind concludes
The bicycle normalizes to 10 m/s and passes. The car normalizes to 15 m/s and produces one MaxInclusiveConstraintComponent result. The report retains the sequence path and its numeric value.
One conclusion in the JavaScript check report is:
result_rdf(iri('https://example.org/readings#car'), iri('https://eyereasoner.github.io/eyemind/qudt#normalizedCdtLiteral'), literal('15.0 m/s', datatype('https://w3id.org/cdt/speed')), 'default_graph')
What the proof establishes
The saved proof is checked against the compiled LS program. It establishes the reported conclusions from the supplied data and rules. Validation and conflict reports are conclusions too; exit code 0 means evaluation completed.
Try it
node bin/eyemind.js --qudt --shacl examples/measurement-shacl.ttl
node bin/eyemind.js --qudt --shacl --program examples/measurement-shacl.ttl > /tmp/measurement-shacl.js
node bin/eyemind.js --to turtle /tmp/measurement-shacl.js
node bin/eyemind.js --qudt --shacl --check-proof examples/proof/measurement-shacl.js examples/measurement-shacl.ttl
Change the car reading to 36 km/h: both readings pass. Remove --qudt: neither reading has a normalized value, so both fail the required count.
