Repository navigation
v1.1.0 — Rules, inference, and notebooks
A new chapter on SHACL-AF rules, three runnable notebooks, and two corrections found by reviewing the SHACL engine — run rather than read.
📄 SemOps-Manual-v1.1.0-A4.pdf — 87 pages, A4.
New: Chapter 11 — Rules and inference
The manual treated SHACL as validation only. Rules are inference, and they change what your gate sees.
- Three ways to derive a triple — transformation, RDFS closure, SHACL-AF rules — and when each is right.
- Triple rules, SPARQL rules,
sh:declare/sh:prefixes. - The four hazards that produce silence rather than an error, each reproduced from independent fixtures: a rule under
sh:propertynever fires; one pass does not close transitively; rules at equalsh:ordercannot see each other's output; negation is not monotonic under iteration. - Rules at scale, measured: 11.9s to derive and validate over 690k triples at 100k instances, 18.7s with
--iterate-rules 5, against 2.7s validate-only. - Rule accuracy proven by construction: exactly 1,000 and 100,000 inferences for the two datasets — every focus node, once, no misses or duplicates.
The significant gap it documents: the WebAssembly build has no rules at all. On a shapes graph the native engine rejects at compile time, WASM returns conforms = true with zero results. One says "I could not check this", the other says "this is fine" — so browser and editor validation is validation-only.
Corrections
--engine is not a speed switch. Measured on the same fixture, same registry, same --own-namespace:
--engine |
Findings | Severity | |
|---|---|---|---|
native |
4 | 1V / 3W | misses QUA-004, a SPARQL-only check |
sparql |
5 | 1V / 4W | the numbers this manual reports |
native+sparql |
6 | 2V / 4W | union — LOG-001 reported twice |
both |
6 | 5V / 1W | same findings, wrong severities |
Neither formulation is complete alone; the union double-reports LOG-001 with no deduplication; and the pySHACL sh:severity bug shows up as five Violations against two on identical input — which under --fail-on Violation is a red build against a green one. Chapter 7 now covers this, and Chapter 9 says why --engine sparql is pinned in every command it shows.
Named graphs are flattened. Quad syntaxes parse, then every named graph and the default graph are merged before validation — verified: a TriG file across two named graphs gives a report identical to the flattened Turtle, and there is no graph-selection option. Chapters 3 and 13 recommended per-partner named graphs without saying validation cannot be scoped to one. Both now state the limit and point at extract-then-validate.
New: notebooks
Three self-contained notebooks, each writing its own fixtures to a temp directory:
| Covers | |
|---|---|
| 1 — Validation and the gate | The unscoped gate, the flag that fixes it, and the near-miss filter that returns a confidently empty report |
| 2 — Rules and inference | Every rule form, and all four silent-failure hazards |
| 3 — Release and change | Evidence-based semver, change impact, and a repair applying itself — including the comment it mangles |
All three were verified by extracting their code cells and executing them in order: zero errors.
Verified, unchanged
418/426 W3C conformance reproduced; all 175 crate tests pass; the pySHACL benchmark reproduced at 75×/122×/114× across 1k–100k with result counts identical at every size.
Full changelog: v1.0.3...v1.1.0