From a2b28d73e66863d96a81e561bee516b507097b22 Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 13:09:18 +0200 Subject: [PATCH 01/11] PMAT-3509: file ONT-4b2 (extract:code + extract:lean, the W3C cases, the oracle differential) against #3509 Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Opus 5 (1M context) --- docs/roadmaps/entries/PMAT-3509.yaml | 19 +++++++++++++++++++ docs/roadmaps/roadmap.yaml | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 docs/roadmaps/entries/PMAT-3509.yaml diff --git a/docs/roadmaps/entries/PMAT-3509.yaml b/docs/roadmaps/entries/PMAT-3509.yaml new file mode 100644 index 0000000000..37ce15dab8 --- /dev/null +++ b/docs/roadmaps/entries/PMAT-3509.yaml @@ -0,0 +1,19 @@ +- id: PMAT-3509 + github_issue: 3509 + item_type: task + title: 'ONT-4b2: extract:code (syn module-tree walk over the bound symbols) and extract:lean (the in-tree theorems) into contracts.nt under the symbol/ and world/ roots; 32 vendored W3C SHACL-Core cases run by the shapes gate (w3c_cases_passed); tests/oracle/ scratch crate + make oracle writing tests/oracle/differential.json (release gate only, R-13); Unknown{Differential} on disagreement' + status: planned + priority: medium + assigned_to: null + created: 2026-09-19T11:07:51Z + updated: 2026-09-19T11:07:51Z + spec: null + acceptance_criteria: [] + phases: [] + subtasks: [] + estimated_effort: null + labels: + - kind:code + - orch:fable + - orch-basis:state + notes: null diff --git a/docs/roadmaps/roadmap.yaml b/docs/roadmaps/roadmap.yaml index 9454eacbd3..166390d66a 100644 --- a/docs/roadmaps/roadmap.yaml +++ b/docs/roadmaps/roadmap.yaml @@ -18605,6 +18605,25 @@ roadmap: - orch:fable - orch-basis:state notes: null +- id: PMAT-3509 + github_issue: 3509 + item_type: task + title: 'ONT-4b2: extract:code (syn module-tree walk over the bound symbols) and extract:lean (the in-tree theorems) into contracts.nt under the symbol/ and world/ roots; 32 vendored W3C SHACL-Core cases run by the shapes gate (w3c_cases_passed); tests/oracle/ scratch crate + make oracle writing tests/oracle/differential.json (release gate only, R-13); Unknown{Differential} on disagreement' + status: planned + priority: medium + assigned_to: null + created: 2026-09-19T11:07:51Z + updated: 2026-09-19T11:07:51Z + spec: null + acceptance_criteria: [] + phases: [] + subtasks: [] + estimated_effort: null + labels: + - kind:code + - orch:fable + - orch-basis:state + notes: null - id: PMAT-3515 github_issue: 3515 item_type: task From 9fb6a510f8fa192a15c2ea96d5a33e9ce5d2bc0d Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 14:16:51 +0200 Subject: [PATCH 02/11] PMAT-3509 / ONT-4b2: extract:code + extract:lean into contracts.nt (symbol/ and world/ roots), 16 vendored W3C SHACL-Core cases run by the gate, the pinned oracle differential out of gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extract:code walks the BOUND symbols only — every module_path + function a binding.yaml declares — through a syn module-tree walk (inline mods, file mods, #[path], one re-export hop, impl methods, both [package] and [lib] crate names, a facade and the crate it re-exports tried in order). Fail-closed IN THE GRAPH: a symbol the walk cannot find is still an ont:Symbol with sym:resolved false and sym:unresolvedReason naming the file and the segment, so a ghost binding is a violation naming the symbol instead of a smaller graph. Measured on this tree: 270 bound symbols, 169 resolved, 101 genuinely absent. extract:lean reads the in-tree theorems through ONT-2a's own scan and rule (a file carrying `sorry` grounds nothing), joins them to the contracts that cite them by ONT-2a's name forms, and counts references that name nothing (lean_refs_unresolved) rather than guessing. 410 statements on this tree. The W3C arm is two-sided. 16 of ONT-0's 32-case table are translated into the contract dialect and RUN BY THE GATE every time (ontology::w3c); the other 16 are listed by name with the form that puts them outside the subset, so the count is over the cases the subset claims and a case refused by design is never scored as a failure. A failing case declines Unknown{Differential} — never a corpus verdict. tests/oracle/ is a scratch crate DETACHED from the workspace with shacl pinned =0.3.21 (ONT-0's verdict ORACLE, R-13 release gate only); `make oracle` validates the ORIGINAL case files and the real corpus through it and writes the tracked tests/oracle/differential.json (17 cases, 0 disagreements). A planted sh:minCount change in shapes.ttl makes it disagree — measured. Four conformance fixes the cases and the oracle found in the in-house validator: - sh:class and targetClass use the rdfs:subClassOf closure (SHACL 2.1.1; W3C class-001), through one index per validate() instead of a scan per node — the corpus gate went 27.2s -> 6.9s in the same commit. - sh:datatype checks the lexical form is WELL FORMED for the type ("300"^^xsd:byte is a violation; W3C datatype-ill-formed). - sh:node reports ONE result per failing value on the outer path, with the nested findings as its detail (W3C node-001/-002). - sh:in is TERM equality: an entry carries the datatype its YAML scalar gives it and the export writes it typed. Before, `in: ["true"]` accepted "true"^^xsd:boolean, which the oracle refuses — 490 results of difference on the real corpus, which is how it was found. Sigma: code and lean implemented: true, concepts Symbol and Statement. The shapes bound-symbols-resolve and lean-statements-grounded ship COMPUTED AND REPORTED, not armed (§3.9): 101 ghosts and three admitted theorem files exist on main today, and a gate red on its own target the day it merges trains bypass. Arming is one string in lint-baseline.json for the release that cleans them. check_ont_ratchet.sh, two defects fixed with rows that go red without the fix: entity_types_registered and extractors_implemented grepped the Rust for `EntityType::` and `impl Extractor`, two forms this codebase has never used, so both measured 0 while the baseline carried 1 and 1 from an older tree — they now read Sigma; and `--write` DELETED formal_prose and legacy_unresolved_depends_on, two shrink-only ratchets the sigma and relations gates read from that same file, so updating one ratchet disarmed two others. Self-test 17 -> 23 rows. Known red, all three the same inherited assertion and none of them this row's: lint_passes_on_real_contracts, ont4b_shapes_gate::the_repo_corpus_passes_..., ont4c1_model_receipts::the_repo_corpus_reports_... assert the real corpus PASSES, and the armed ladder-measured finds 0 witnesses until the re-measured receipts of #3523 are on main (#3526's waiting note). Proven by measurement: with ladder-measured unarmed for one run the same corpus is Pass, 0 violations, 113 reported. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Opus 5 (1M context) --- Cargo.lock | 1 + Makefile | 18 + ...der-contracts-cli-ont4b2-code-lean-w3c.cmd | 1 + contracts/lint-baseline.json | 10 +- contracts/ont-code-symbols-v1.yaml | 156 + contracts/ontology.yaml | 10 +- contracts/shapes.ttl | 57 + .../src/commands/lint.rs | 157 +- .../tests/ont4b2_code_lean_w3c.rs | 216 ++ .../tests/ont4b_shapes_gate.rs | 4 +- .../tests/ont_extract_json.rs | 2 +- crates/aprender-contracts/Cargo.toml | 1 + crates/aprender-contracts/src/lint/mod.rs | 20 + .../src/lint/shapes_gate.rs | 37 +- .../src/ontology/extract/code.rs | 822 +++++ .../src/ontology/extract/lean.rs | 401 +++ .../src/ontology/extract/mod.rs | 22 +- crates/aprender-contracts/src/ontology/mod.rs | 1 + crates/aprender-contracts/src/ontology/rdf.rs | 25 +- .../aprender-contracts/src/ontology/shapes.rs | 272 +- crates/aprender-contracts/src/ontology/w3c.rs | 531 +++ crates/aprender-contracts/src/proof_status.rs | 4 +- .../w3c/node-closed-002.yaml | 23 + .../w3c/property-class-001.yaml | 35 + .../w3c/property-datatype-001.yaml | 23 + .../w3c/property-datatype-002.yaml | 24 + .../w3c/property-datatype-ill-formed.yaml | 21 + .../w3c/property-in-001.yaml | 22 + .../w3c/property-maxCount-001.yaml | 22 + .../w3c/property-maxCount-002.yaml | 20 + .../w3c/property-maxLength-001.yaml | 22 + .../w3c/property-minCount-001.yaml | 20 + .../w3c/property-minCount-002.yaml | 16 + .../w3c/property-minLength-001.yaml | 22 + .../w3c/property-node-001.yaml | 43 + .../w3c/property-node-002.yaml | 26 + .../w3c/property-pattern-001.yaml | 24 + .../w3c/targets-targetClass-001.yaml | 23 + scripts/check_ont_ratchet.sh | 55 +- tests/fixtures/ont/code-bound/Cargo.toml | 2 + .../ont/code-bound/contracts/binding.yaml | 33 + .../code-bound/contracts/lint-baseline.json | 5 + .../contracts/ont-code-shape-v1.yaml | 23 + .../ont/code-bound/contracts/ontology.yaml | 7 + .../contracts/softmax-kernel-v1.yaml | 25 + .../ont/code-bound/crates/kern/Cargo.toml | 8 + .../ont/code-bound/crates/kern/src/lib.rs | 6 + .../ont/code-bound/crates/kern/src/nn.rs | 5 + .../crates/kern/src/nn/functional.rs | 5 + tests/fixtures/ont/code-ghost/Cargo.toml | 2 + .../ont/code-ghost/contracts/binding.yaml | 13 + .../code-ghost/contracts/lint-baseline.json | 5 + .../contracts/ont-code-shape-v1.yaml | 17 + .../ont/code-ghost/contracts/ontology.yaml | 7 + .../contracts/softmax-kernel-v1.yaml | 25 + .../ont/code-ghost/crates/kern/Cargo.toml | 8 + .../ont/code-ghost/crates/kern/src/lib.rs | 6 + .../ont/code-ghost/crates/kern/src/nn.rs | 5 + .../crates/kern/src/nn/functional.rs | 5 + .../lean-sorry/contracts/lint-baseline.json | 5 + .../ont/lean-sorry/contracts/ontology.yaml | 12 + .../contracts/softmax-kernel-v1.yaml | 29 + .../ProvableContracts/Theorems/Relu/Core.lean | 5 + .../Theorems/Softmax/Core.lean | 6 + tests/oracle/Cargo.lock | 2914 +++++++++++++++++ tests/oracle/Cargo.toml | 22 + tests/oracle/differential.json | 31 + tests/oracle/src/main.rs | 282 ++ tests/oracle/w3c/node/class-001.ttl | 70 + tests/oracle/w3c/node/class-002.ttl | 62 + tests/oracle/w3c/node/class-003.ttl | 105 + tests/oracle/w3c/node/closed-001.ttl | 64 + tests/oracle/w3c/node/closed-002.ttl | 58 + tests/oracle/w3c/node/datatype-001.ttl | 64 + tests/oracle/w3c/node/datatype-002.ttl | 53 + tests/oracle/w3c/node/in-001.ttl | 63 + tests/oracle/w3c/node/maxLength-001.ttl | 87 + tests/oracle/w3c/node/minLength-001.ttl | 79 + tests/oracle/w3c/node/node-001.ttl | 55 + tests/oracle/w3c/node/nodeKind-001.ttl | 43 + tests/oracle/w3c/node/pattern-001.ttl | 76 + tests/oracle/w3c/node/pattern-002.ttl | 45 + tests/oracle/w3c/property/class-001.ttl | 91 + tests/oracle/w3c/property/datatype-001.ttl | 76 + tests/oracle/w3c/property/datatype-002.ttl | 71 + tests/oracle/w3c/property/datatype-003.ttl | 69 + .../w3c/property/datatype-ill-formed-data.ttl | 6 + .../property/datatype-ill-formed-shapes.ttl | 8 + .../w3c/property/datatype-ill-formed.ttl | 43 + tests/oracle/w3c/property/in-001.ttl | 69 + tests/oracle/w3c/property/maxCount-001.ttl | 64 + tests/oracle/w3c/property/maxCount-002.ttl | 57 + tests/oracle/w3c/property/maxLength-001.ttl | 61 + tests/oracle/w3c/property/minCount-001.ttl | 62 + tests/oracle/w3c/property/minCount-002.ttl | 41 + tests/oracle/w3c/property/minLength-001.ttl | 61 + tests/oracle/w3c/property/node-001.ttl | 113 + tests/oracle/w3c/property/node-002.ttl | 75 + tests/oracle/w3c/property/nodeKind-001.ttl | 371 +++ tests/oracle/w3c/property/pattern-001.ttl | 74 + tests/oracle/w3c/property/pattern-002.ttl | 66 + tests/oracle/w3c/targets/targetClass-001.ttl | 62 + 102 files changed, 9083 insertions(+), 108 deletions(-) create mode 100644 ci/explicit-test-commands.d/340-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd create mode 100644 contracts/ont-code-symbols-v1.yaml create mode 100644 crates/aprender-contracts-cli/tests/ont4b2_code_lean_w3c.rs create mode 100644 crates/aprender-contracts/src/ontology/extract/code.rs create mode 100644 crates/aprender-contracts/src/ontology/extract/lean.rs create mode 100644 crates/aprender-contracts/src/ontology/w3c.rs create mode 100644 crates/aprender-contracts/w3c/node-closed-002.yaml create mode 100644 crates/aprender-contracts/w3c/property-class-001.yaml create mode 100644 crates/aprender-contracts/w3c/property-datatype-001.yaml create mode 100644 crates/aprender-contracts/w3c/property-datatype-002.yaml create mode 100644 crates/aprender-contracts/w3c/property-datatype-ill-formed.yaml create mode 100644 crates/aprender-contracts/w3c/property-in-001.yaml create mode 100644 crates/aprender-contracts/w3c/property-maxCount-001.yaml create mode 100644 crates/aprender-contracts/w3c/property-maxCount-002.yaml create mode 100644 crates/aprender-contracts/w3c/property-maxLength-001.yaml create mode 100644 crates/aprender-contracts/w3c/property-minCount-001.yaml create mode 100644 crates/aprender-contracts/w3c/property-minCount-002.yaml create mode 100644 crates/aprender-contracts/w3c/property-minLength-001.yaml create mode 100644 crates/aprender-contracts/w3c/property-node-001.yaml create mode 100644 crates/aprender-contracts/w3c/property-node-002.yaml create mode 100644 crates/aprender-contracts/w3c/property-pattern-001.yaml create mode 100644 crates/aprender-contracts/w3c/targets-targetClass-001.yaml create mode 100644 tests/fixtures/ont/code-bound/Cargo.toml create mode 100644 tests/fixtures/ont/code-bound/contracts/binding.yaml create mode 100644 tests/fixtures/ont/code-bound/contracts/lint-baseline.json create mode 100644 tests/fixtures/ont/code-bound/contracts/ont-code-shape-v1.yaml create mode 100644 tests/fixtures/ont/code-bound/contracts/ontology.yaml create mode 100644 tests/fixtures/ont/code-bound/contracts/softmax-kernel-v1.yaml create mode 100644 tests/fixtures/ont/code-bound/crates/kern/Cargo.toml create mode 100644 tests/fixtures/ont/code-bound/crates/kern/src/lib.rs create mode 100644 tests/fixtures/ont/code-bound/crates/kern/src/nn.rs create mode 100644 tests/fixtures/ont/code-bound/crates/kern/src/nn/functional.rs create mode 100644 tests/fixtures/ont/code-ghost/Cargo.toml create mode 100644 tests/fixtures/ont/code-ghost/contracts/binding.yaml create mode 100644 tests/fixtures/ont/code-ghost/contracts/lint-baseline.json create mode 100644 tests/fixtures/ont/code-ghost/contracts/ont-code-shape-v1.yaml create mode 100644 tests/fixtures/ont/code-ghost/contracts/ontology.yaml create mode 100644 tests/fixtures/ont/code-ghost/contracts/softmax-kernel-v1.yaml create mode 100644 tests/fixtures/ont/code-ghost/crates/kern/Cargo.toml create mode 100644 tests/fixtures/ont/code-ghost/crates/kern/src/lib.rs create mode 100644 tests/fixtures/ont/code-ghost/crates/kern/src/nn.rs create mode 100644 tests/fixtures/ont/code-ghost/crates/kern/src/nn/functional.rs create mode 100644 tests/fixtures/ont/lean-sorry/contracts/lint-baseline.json create mode 100644 tests/fixtures/ont/lean-sorry/contracts/ontology.yaml create mode 100644 tests/fixtures/ont/lean-sorry/contracts/softmax-kernel-v1.yaml create mode 100644 tests/fixtures/ont/lean-sorry/lean/ProvableContracts/Theorems/Relu/Core.lean create mode 100644 tests/fixtures/ont/lean-sorry/lean/ProvableContracts/Theorems/Softmax/Core.lean create mode 100644 tests/oracle/Cargo.lock create mode 100644 tests/oracle/Cargo.toml create mode 100644 tests/oracle/differential.json create mode 100644 tests/oracle/src/main.rs create mode 100644 tests/oracle/w3c/node/class-001.ttl create mode 100644 tests/oracle/w3c/node/class-002.ttl create mode 100644 tests/oracle/w3c/node/class-003.ttl create mode 100644 tests/oracle/w3c/node/closed-001.ttl create mode 100644 tests/oracle/w3c/node/closed-002.ttl create mode 100644 tests/oracle/w3c/node/datatype-001.ttl create mode 100644 tests/oracle/w3c/node/datatype-002.ttl create mode 100644 tests/oracle/w3c/node/in-001.ttl create mode 100644 tests/oracle/w3c/node/maxLength-001.ttl create mode 100644 tests/oracle/w3c/node/minLength-001.ttl create mode 100644 tests/oracle/w3c/node/node-001.ttl create mode 100644 tests/oracle/w3c/node/nodeKind-001.ttl create mode 100644 tests/oracle/w3c/node/pattern-001.ttl create mode 100644 tests/oracle/w3c/node/pattern-002.ttl create mode 100644 tests/oracle/w3c/property/class-001.ttl create mode 100644 tests/oracle/w3c/property/datatype-001.ttl create mode 100644 tests/oracle/w3c/property/datatype-002.ttl create mode 100644 tests/oracle/w3c/property/datatype-003.ttl create mode 100644 tests/oracle/w3c/property/datatype-ill-formed-data.ttl create mode 100644 tests/oracle/w3c/property/datatype-ill-formed-shapes.ttl create mode 100644 tests/oracle/w3c/property/datatype-ill-formed.ttl create mode 100644 tests/oracle/w3c/property/in-001.ttl create mode 100644 tests/oracle/w3c/property/maxCount-001.ttl create mode 100644 tests/oracle/w3c/property/maxCount-002.ttl create mode 100644 tests/oracle/w3c/property/maxLength-001.ttl create mode 100644 tests/oracle/w3c/property/minCount-001.ttl create mode 100644 tests/oracle/w3c/property/minCount-002.ttl create mode 100644 tests/oracle/w3c/property/minLength-001.ttl create mode 100644 tests/oracle/w3c/property/node-001.ttl create mode 100644 tests/oracle/w3c/property/node-002.ttl create mode 100644 tests/oracle/w3c/property/nodeKind-001.ttl create mode 100644 tests/oracle/w3c/property/pattern-001.ttl create mode 100644 tests/oracle/w3c/property/pattern-002.ttl create mode 100644 tests/oracle/w3c/targets/targetClass-001.ttl diff --git a/Cargo.lock b/Cargo.lock index 81f4d1e072..e99d1f5de4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -492,6 +492,7 @@ dependencies = [ "serde_json", "serde_yaml", "sha2 0.10.9", + "syn 2.0.118", "tempfile", "thiserror 2.0.18", ] diff --git a/Makefile b/Makefile index 1bbe2b585f..fb7ef5d689 100644 --- a/Makefile +++ b/Makefile @@ -1361,3 +1361,21 @@ ont-ratchet: ont-ratchet-check: @bash scripts/check_ont_ratchet.sh --check + +# ONT-001 §5 ONT-4b2 / R-13 — the out-of-gate SHACL differential oracle. +# +# NOT a PR check, by the rule that puts it here: `shacl` is 316 crates and pinned at ONE version (ONT-0's +# ledger), so it lives in tests/oracle/ — a crate DETACHED from the workspace — and runs in the release gate +# only. It validates the same graph twice (the pinned processor and the in-house validator) and writes +# tests/oracle/differential.json, which is TRACKED: the row's probe reads `cases>0 and disagreements==0`, and +# a tracked file nobody regenerated is caught by `oracle-check` diffing it. +.PHONY: oracle oracle-check +oracle: + @echo "== W3C cases + the real corpus through the pinned oracle (shacl 0.3.21, out of gate) ==" + @. scripts/pv_bin.sh && "$$PV" lint contracts --gate shapes --format json > "$${TMPDIR:-/tmp}/pv-shapes.json" 2>/dev/null || true + @cd tests/oracle && cargo build --release --quiet + @"$$(cd tests/oracle && cargo metadata --no-deps --format-version 1 | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p')/release/ont-oracle" . "$${TMPDIR:-/tmp}/pv-shapes.json" + +oracle-check: oracle + @git diff --exit-code tests/oracle/differential.json \ + || { echo "FAIL: tests/oracle/differential.json differs from a fresh run — commit it"; exit 1; } diff --git a/ci/explicit-test-commands.d/340-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd b/ci/explicit-test-commands.d/340-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd new file mode 100644 index 0000000000..57c8911774 --- /dev/null +++ b/ci/explicit-test-commands.d/340-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd @@ -0,0 +1 @@ +cargo test -p aprender-contracts-cli --test ont4b2_code_lean_w3c diff --git a/contracts/lint-baseline.json b/contracts/lint-baseline.json index 91047ceb77..b704796741 100644 --- a/contracts/lint-baseline.json +++ b/contracts/lint-baseline.json @@ -4,14 +4,14 @@ "armed_shapes": ["ont-shapes-v1", "ladder-measured"], "ont": { "consumer_present": false, - "contracts_total": 1837, - "entity_types_registered": 1, - "extractors_implemented": 1, + "contracts_total": 1852, + "entity_types_registered": 9, + "extractors_implemented": 6, "contracts_anchored": 3, - "contracts_shaped": 2, + "contracts_shaped": 3, "unanchored_but_bindable": 297, "formal_prose": 1464, "legacy_unresolved_depends_on": 8, - "shapes_unarmed": 1 + "shapes_unarmed": 3 } } diff --git a/contracts/ont-code-symbols-v1.yaml b/contracts/ont-code-symbols-v1.yaml new file mode 100644 index 0000000000..2240e234e2 --- /dev/null +++ b/contracts/ont-code-symbols-v1.yaml @@ -0,0 +1,156 @@ +# ───────────────────────────────────────────────────────────────────────────── +# ont-code-symbols-v1 — `extract:code` + `extract:lean`: the bound Rust symbols and the in-tree Lean theorems +# as focus nodes (ONT-001 §3.7, §5 ONT-4b2; aprender#3509, PMAT-3509) +# +# WHAT IT GOVERNS +# provable_contracts::ontology::extract::code — every `module_path` + `function` a binding.yaml declares, +# resolved by a `syn` module-tree walk → ont:Symbol. +# provable_contracts::ontology::extract::lean — every `theorem` under ProvableContracts/Theorems → ont:Statement. +# provable_contracts::ontology::w3c — the vendored W3C SHACL-Core cases, run by the gate. +# tests/oracle/ — the pinned out-of-gate differential (R-13, release gate only). +# +# WHY THE BOUND SYMBOLS AND NOT THE WORKSPACE. 3.9 M lines of Rust would be a second copy of the tree in RDF, +# and no contract constrains a symbol nothing binds. The bindings are the corpus's OWN claim about which code +# its equations name — ONT-3a already makes that claim falsifiable one binding at a time; this row puts the +# claim in the graph, where a SHAPE says it, and where `sym:attribute "kernel"` is what ONT-4c3 will type. +# +# WHY AN UNRESOLVED SYMBOL IS STILL A NODE. A walker that silently dropped what it could not find would shrink +# the graph exactly where the defect is: the corpus would conform because the ghost was never a focus node. +# `sym:resolved false` + `sym:unresolvedReason` is the fail-closed form — measured on this tree: 169 of 270 +# bound symbols resolve, and the 101 that do not name modules and functions that are genuinely absent. +# +# WHY THE SHAPES SHIP UNARMED. §3.9: a gate red on its own target the day it merges trains bypass. 101 ghosts +# exist on main today; `bound-symbols-resolve` is COMPUTED AND REPORTED at this row (under `not_armed_shapes`) +# and the release that cleans the bindings arms it by adding one string to lint-baseline.json's `armed_shapes`. +# Same for `lean-statements-grounded`: three theorem files carry `sorry`. +# +# KIND: pattern. Two extractors, their vocabularies, and the shapes they feed. +# ───────────────────────────────────────────────────────────────────────────── +name: ont-code-symbols +version: "1.0.0" +scope: > + How a bound Rust symbol and an in-tree Lean theorem become RDF, what `sym:*` and `lean:*` carry, and what the + two shapes over them assert. Out of scope: symbols no binding names (not focus nodes at v1alpha1), Lean + `formalization.yaml` (PVL EV-8b's file, not in this tree), and proof CHECKING — `lean:sorryFree` is a + property of the file's text, never a claim that `lake` succeeded. +status: active + +metadata: + version: "1.0.0" + kind: pattern + created: '2026-09-19' + last_modified: '2026-09-19' + author: PAIML Engineering + description: > + extract:code — the bound symbols by a syn module-tree walk (inline mods, file mods, #[path], one re-export + hop, impl methods), fail-closed with the reason in the graph; extract:lean — theorems from the in-tree + Theorems tree, sorry-free files only grounding, joined to the contracts that cite them by ONT-2a's name + forms; 16 vendored W3C SHACL-Core cases run every gate run; the oracle differential in the release gate. + references: + - 'paiml/infra docs/specifications/paiml-ontology.md §3.6 (the subset), §3.7 (extractors), §5 ONT-4b2, R-13, R-15, R-18' + - 'paiml/infra docs/specifications/ont-oracle-ledger.md (ONT-0: the 32-case table and the pinned oracle)' + - 'crates/aprender-contracts/src/ontology/extract/{code,lean}.rs, ontology/w3c.rs, tests/oracle/' + - 'ONT-2a: crates/aprender-contracts/src/proof_status.rs — the same theorem scan this extractor reuses' + +relations: + depends_on: [ont-shapes-v1, ont-sigma-v1] + +equations: + resolve_symbol: + formula: "resolve(module_path, function) = walk(crate_root(head), tail) ▷ (fn function ∨ impl::function ∨ use → resolve(target))" + domain: "every (module_path, function) a binding.yaml under contracts/ declares with a function" + codomain: "Resolved{file, visibility, kind, attributes} or Unresolved{reason naming the file and the segment}" + invariants: + - "only the files on the walk are parsed: cost is bindings × depth, never the workspace" + - "a symbol that does not resolve is still a focus node, with sym:resolved false" + - "a re-export is followed at most 8 hops, so a cycle terminates with a reason" + preconditions: + - "the workspace's Cargo.toml files name their crates ([package] name and [lib] name, both indexed)" + postconditions: + - "two extractions of the same tree are byte-identical (R-15)" + lean_theorem: none — L4 not declared + ground_theorem: + formula: "grounded(t) ⇔ ¬contains(file(t), \"sorry\") ; modelOf(t) = { c | ref ∈ refs(c) ∧ ref ∈ acceptedNames(t) }" + domain: "every `theorem` declaration under /ProvableContracts/Theorems//*.lean" + codomain: "an ont:Statement node with lean:sorryFree, lean:discharge and one lean:modelOf edge per citing contract" + invariants: + - "a file carrying `sorry` grounds nothing — the same rule ONT-2a's L4 credit uses, from the same scan" + - "a contract reference that names no theorem, file or domain is counted (lean_refs_unresolved), never guessed" + preconditions: + - "the Lean tree is the first of proof_status::LEAN_THEOREM_BASES that exists under the repo root" + postconditions: + - "what the graph says about a theorem and what `pv proof-status` credits agree by construction" + lean_theorem: none — L4 not declared + +invariants: + - id: SYM-INV-001 + property: deterministic, no blank nodes + formal: '∀ tree: extract(tree) = extract(tree) ∧ ∀ t ∈ extract(tree): subject(t) ∈ IRI' + prose: false + - id: SYM-INV-002 + property: fail-closed — an unresolved binding is a node with a reason, never an absence + formal: '¬resolves(b) ⇒ (b, sym:resolved, false) ∈ graph ∧ (b, sym:unresolvedReason, r) ∈ graph' + prose: false + - id: SYM-INV-003 + property: an admitted proof grounds nothing + formal: 'sorry ∈ file(t) ⇒ (t, lean:sorryFree, false) ∧ discharge(t) = admitted' + prose: false + - id: SYM-INV-004 + property: the validator agrees with the standard on every form it claims + formal: '∀ c ∈ vendored W3C cases: results(c) = expected(c) ∨ verdict = Unknown{Differential}' + prose: false + - id: SYM-INV-005 + property: no third-party SHACL crate is reachable from the gate path + formal: 'shacl ∉ deps(aprender-contracts, {normal, build, dev})' + prose: false + +falsification_tests: + - id: FALSIFY-SYM-001 + rule: the module-tree walk + prediction: the walk resolves a file module, an inline module, an impl method and one `pub use … as` hop, and refuses a ghost naming the file it looked in and the segment it wanted + test: cargo test -p aprender-contracts --lib ontology::extract::code + if_fails: a binding that names nothing is dropped from the graph instead of reported, and a ghost passes because it was never a focus node + - id: FALSIFY-SYM-002 + rule: an admitted proof grounds nothing + prediction: a theorem file carrying `sorry` yields lean:sorryFree false and discharge "admitted"; a contract reference naming no theorem, file or domain is counted in lean_refs_unresolved, never guessed + test: cargo test -p aprender-contracts --lib ontology::extract::lean + if_fails: an admitted theorem grounds an L4 claim, or a dangling lean_theorem is silently ignored + - id: FALSIFY-SYM-003 + rule: the vendored W3C cases + prediction: all 16 vendored cases pass, the 32 of ONT-0's table are accounted for case by case (vendored or excused by name), and a mistranslated expectation fails naming the difference + test: cargo test -p aprender-contracts --lib ontology::w3c + if_fails: the subset claims a component the standard's own case refutes, or a case is quietly dropped from the count + - id: FALSIFY-SYM-004 + rule: the gate's answers on the CLI + prediction: the bound symbols are focus nodes with the counts reported; the SAME ghost is a Fail naming the symbol under an armed shape and a reported unarmed_violation under an unarmed one; a failing vendored case declines Unknown{Differential} naming it; no shacl crate is in the workspace lock + test: cargo test -p aprender-contracts-cli --test ont4b2_code_lean_w3c + if_fails: arming is ignored, a differential is graded as a corpus verdict, or the oracle leaks into the gate path + - id: FALSIFY-SYM-005 + rule: the out-of-gate differential + prediction: the pinned shacl 0.3.21 agrees with the in-house validator on all 16 cases and on the real corpus's violation set; a planted `sh:minCount` change in shapes.ttl makes it disagree, measured + test: make oracle + if_fails: the in-house subset has drifted from the standard and nobody outside it noticed + +qa_gate: + required_checks: + - "cargo test -p aprender-contracts --lib ontology::" + - "cargo test -p aprender-contracts-cli --test ont4b2_code_lean_w3c" + +shapes: + # REPORTED, not armed (see the header): 101 of 270 bound symbols on this tree name code that is not there. + - id: bound-symbols-resolve + targetClass: ont:Symbol + properties: + - {path: sym:crate, minCount: 1, maxCount: 1} + - {path: sym:module, minCount: 1, maxCount: 1} + - {path: sym:name, minCount: 1, maxCount: 1} + - {path: sym:implements, minCount: 1, nodeKind: IRI, class: ont:Contract} + - {path: sym:resolved, minCount: 1, maxCount: 1, in: [true]} + # REPORTED, not armed: three theorem files carry `sorry`. + - id: lean-statements-grounded + targetClass: ont:Statement + properties: + - {path: lean:name, minCount: 1, maxCount: 1} + - {path: lean:file, minCount: 1, maxCount: 1} + - {path: lean:discharge, minCount: 1, maxCount: 1, in: [grounded, admitted]} + - {path: lean:sorryFree, minCount: 1, maxCount: 1, in: [true]} diff --git a/contracts/ontology.yaml b/contracts/ontology.yaml index 82e9049cf9..e8ad447c68 100644 --- a/contracts/ontology.yaml +++ b/contracts/ontology.yaml @@ -23,6 +23,8 @@ concepts: Test: {doc: "a test function a contract cites as its falsifier"} Proof: {doc: "a Kani harness or Lean theorem discharging an obligation"} Doc: {doc: "a prose document under contract (README.md, CLAUDE.md)"} + Symbol: {doc: "a Rust symbol a binding names — a free fn or an impl method; the focus node of extract:code (ONT-4b2: ont:Symbol with sym:crate, sym:module, sym:resolved)"} + Statement: {doc: "a Lean theorem in the in-tree Theorems tree; the focus node of extract:lean (ONT-4b2: ont:Statement with lean:sorryFree, lean:modelOf)"} Model: {doc: "a model file — an .apr container or a GGUF; the ladder's rungs are the ones the release measures (ONT-4c1: model:Model, model:RequiredModel, model:Receipt)"} Dataset: {doc: "a CSV or corpus file"} @@ -131,8 +133,8 @@ agents: entity_types: - {name: pv-contract, extractor: pv_contract, implemented: true} - {name: json, extractor: json, implemented: true} - - {name: code, extractor: code, implemented: false} - - {name: lean, extractor: lean, implemented: false} + - {name: code, extractor: code, implemented: true} + - {name: lean, extractor: lean, implemented: true} - {name: readme, extractor: readme, implemented: false} - {name: llm-context, extractor: llm_context, implemented: false} - {name: apr-model, extractor: apr_model, implemented: true} @@ -142,8 +144,8 @@ entity_types: extractors: - {name: pv_contract, reader: ontology/extract/pv_contract.rs, implemented: true} - {name: json, reader: ontology/extract/json.rs, implemented: true} - - {name: code, reader: ontology/extract/code.rs, implemented: false} - - {name: lean, reader: ontology/extract/lean.rs, implemented: false} + - {name: code, reader: ontology/extract/code.rs, implemented: true} + - {name: lean, reader: ontology/extract/lean.rs, implemented: true} - {name: readme, reader: ontology/extract/readme.rs, implemented: false} - {name: llm_context, reader: ontology/extract/llm_context.rs, implemented: false} - {name: apr_model, reader: ontology/extract/apr_model.rs, implemented: true} diff --git a/contracts/shapes.ttl b/contracts/shapes.ttl index 2ea8b8cdb9..06b73b15c7 100644 --- a/contracts/shapes.ttl +++ b/contracts/shapes.ttl @@ -2,6 +2,63 @@ @prefix xsd: . @prefix ont: . + a sh:NodeShape ; + sh:targetClass ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:class ; + sh:nodeKind sh:IRI ; + ] ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:in ( "true"^^ ) ; + ] ; +. + + a sh:NodeShape ; + sh:targetClass ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + ] ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:in ( "grounded" "admitted" ) ; + ] ; + sh:property [ + sh:path ; + sh:minCount 1 ; + sh:maxCount 1 ; + sh:in ( "true"^^ ) ; + ] ; +. + a sh:NodeShape ; sh:targetClass ; sh:property [ diff --git a/crates/aprender-contracts-cli/src/commands/lint.rs b/crates/aprender-contracts-cli/src/commands/lint.rs index d29acb9539..e05e5644e2 100644 --- a/crates/aprender-contracts-cli/src/commands/lint.rs +++ b/crates/aprender-contracts-cli/src/commands/lint.rs @@ -183,12 +183,60 @@ struct SingleGateFinding<'a> { /// ONT-2b: `--gate ` runs ONE gate and reports only it, mapping its verdict through ONT-6's lattice — /// Pass 0 · Fail 1 `reject:` · no Σ 2 `decline:` (R-2, zero is a decline) · malformed Σ 3 `error:`. fn run_single_gate(contract_dir: &Path, name: &str) -> Result<(), Box> { + let (result, findings) = decide_named_gate(contract_dir, name)?; + + let report = SingleGateReport { + gate: &result.name, + verdict: result.verdict, + passed: result.passed, + duration_ms: result.duration_ms, + extra: result.extra.as_ref(), + flat: result.extra.as_ref(), + findings: findings + .iter() + .map(|f| SingleGateFinding { + rule_id: &f.rule_id, + severity: format!("{:?}", f.severity), + message: &f.message, + file: &f.file, + }) + .collect(), + }; + println!("{}", serde_json::to_string_pretty(&report)?); + + // The exit is the gate's VERDICT, not its `passed` bit: a gate that ran and answered `Unknown{Warn}` (ONT-4b, warnings + // and no violation) is a decline, exit 2 — `passed` alone would print 0 for a corpus nobody judged clean. + match result.verdict { + provable_contracts::ontology::verdict::Verdict::Pass => Ok(()), + provable_contracts::ontology::verdict::Verdict::Unknown(reason) => { + Err(LintDeclined { reason }.into()) + } + provable_contracts::ontology::verdict::Verdict::Fail => Err(LintRejected { + passed: 0, + armed: 1, + } + .into()), + } +} + +/// One gate's run, mapped to a report or to the refusal/decline that stands in its place. Every non-verdict +/// answer says WHY on stderr before it returns, because an exit code without a reason is the thing this gate +/// exists to refuse. +type NamedGateAnswer = ( + Box, + Vec, +); + +fn decide_named_gate( + contract_dir: &Path, + name: &str, +) -> Result> { use provable_contracts::lint::{ relations_gate::RelationsOutcome, shapes_gate::ShapesOutcome, sigma_gate::SigmaOutcome, NamedGateOutcome, NAMED_GATES, }; - let (result, findings) = match provable_contracts::lint::run_named_gate(contract_dir, name) { + match provable_contracts::lint::run_named_gate(contract_dir, name) { NamedGateOutcome::UnknownGate => { return Err(crate::contract_walk::UnknownGate { asked: name.to_string(), @@ -216,79 +264,70 @@ fn run_single_gate(contract_dir: &Path, name: &str) -> Result<(), Box { return Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) } - NamedGateOutcome::Shapes(ShapesOutcome::Unsupported(e)) => { - return Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) + NamedGateOutcome::Shapes(outcome) => decide_shapes_gate(outcome), + NamedGateOutcome::Sigma(SigmaOutcome::Ran { result, findings }) + | NamedGateOutcome::Relations(RelationsOutcome::Ran { result, findings }) + | NamedGateOutcome::Ran { result, findings } => Ok((result, findings)), + } +} + +/// The `shapes` gate's answers (ONT-4b, ONT-4c1, ONT-4b2). Only `Ran` is a verdict about the corpus; every +/// other arm prints what could not be checked before it returns its decline or refusal. +fn decide_shapes_gate( + outcome: provable_contracts::lint::shapes_gate::ShapesOutcome, +) -> Result> { + use provable_contracts::lint::shapes_gate::ShapesOutcome; + use provable_contracts::ontology::verdict::Reason; + + match outcome { + ShapesOutcome::Unsupported(e) => { + Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) } - NamedGateOutcome::Shapes(ShapesOutcome::ExtractFailed(e)) => { - return Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) + ShapesOutcome::ExtractFailed(e) => { + Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) } - NamedGateOutcome::Shapes(ShapesOutcome::NoShapes { .. }) => { - return Err(LintDeclined { - reason: provable_contracts::ontology::verdict::Reason::NoShapes, - } - .into()) + ShapesOutcome::NoShapes { .. } => Err(LintDeclined { + reason: Reason::NoShapes, } - NamedGateOutcome::Shapes(ShapesOutcome::NoFocus { .. }) => { - return Err(LintDeclined { - reason: provable_contracts::ontology::verdict::Reason::NoFocus, - } - .into()) + .into()), + ShapesOutcome::NoFocus { .. } => Err(LintDeclined { + reason: Reason::NoFocus, } - NamedGateOutcome::Shapes(ShapesOutcome::NoReceipts { shapes_n, dir }) => { + .into()), + ShapesOutcome::NoReceipts { shapes_n, dir } => { // ONT-4c1: the WHY travels with the decline — the lattice has no ReceiptUnmeasured element (ONT-6's // 15 reasons), so the reason is NoCheckable and this line says what could not be checked. eprintln!( "shapes: {shapes_n} shape(s) resolve receipts and the tree holds none under {dir}/" ); - return Err(LintDeclined { - reason: provable_contracts::ontology::verdict::Reason::NoCheckable, + Err(LintDeclined { + reason: Reason::NoCheckable, } - .into()); + .into()) } - NamedGateOutcome::Shapes(ShapesOutcome::PositiveControlFailed { which, .. }) => { + ShapesOutcome::PositiveControlFailed { which, .. } => { eprintln!("shapes: positive control {which} did not fire"); - return Err(LintDeclined { - reason: provable_contracts::ontology::verdict::Reason::PositiveControlFailed, + Err(LintDeclined { + reason: Reason::PositiveControlFailed, } - .into()); - } - NamedGateOutcome::Sigma(SigmaOutcome::Ran { result, findings }) - | NamedGateOutcome::Relations(RelationsOutcome::Ran { result, findings }) - | NamedGateOutcome::Shapes(ShapesOutcome::Ran { result, findings }) - | NamedGateOutcome::Ran { result, findings } => (result, findings), - }; - - let report = SingleGateReport { - gate: &result.name, - verdict: result.verdict, - passed: result.passed, - duration_ms: result.duration_ms, - extra: result.extra.as_ref(), - flat: result.extra.as_ref(), - findings: findings - .iter() - .map(|f| SingleGateFinding { - rule_id: &f.rule_id, - severity: format!("{:?}", f.severity), - message: &f.message, - file: &f.file, - }) - .collect(), - }; - println!("{}", serde_json::to_string_pretty(&report)?); - - // The exit is the gate's VERDICT, not its `passed` bit: a gate that ran and answered `Unknown{Warn}` (ONT-4b, warnings - // and no violation) is a decline, exit 2 — `passed` alone would print 0 for a corpus nobody judged clean. - match result.verdict { - provable_contracts::ontology::verdict::Verdict::Pass => Ok(()), - provable_contracts::ontology::verdict::Verdict::Unknown(reason) => { - Err(LintDeclined { reason }.into()) + .into()) } - provable_contracts::ontology::verdict::Verdict::Fail => Err(LintRejected { - passed: 0, - armed: 1, + ShapesOutcome::Differential { + passed, n, failed, .. + } => { + // ONT-4b2: the validator failed a vendored W3C case for a form it claims — no corpus verdict. + eprintln!( + "shapes: W3C SHACL-Core differential — {passed} of {n} vendored case(s) pass" + ); + for f in &failed { + eprintln!(" {f}"); + } + Err(LintDeclined { + reason: Reason::Differential, + } + .into()) } - .into()), + ShapesOutcome::Ran { result, findings } => Ok((result, findings)), } } diff --git a/crates/aprender-contracts-cli/tests/ont4b2_code_lean_w3c.rs b/crates/aprender-contracts-cli/tests/ont4b2_code_lean_w3c.rs new file mode 100644 index 0000000000..1e10bba108 --- /dev/null +++ b/crates/aprender-contracts-cli/tests/ont4b2_code_lean_w3c.rs @@ -0,0 +1,216 @@ +//! ONT-4b2 (PMAT-3509) — bound Rust symbols and in-tree Lean theorems as focus nodes, on the CLI. +//! +//! ONT-001 §5 ONT-4b2 RED, through `pv lint --gate shapes` and `pv extract`: the bound symbols of every +//! `binding.yaml` are `ont:Symbol` nodes under the `symbol/` IRI root, resolved by the `syn` walk or carrying +//! the reason they were not; the in-tree theorems are `ont:Statement` nodes under `world/`, and a file with +//! `sorry` grounds nothing; both arms report their counts; the vendored W3C SHACL-Core cases run every time +//! and a failing one declines `Unknown{Differential}` instead of grading the corpus. +//! +//! DISCRIMINATION, both directions: `code-ghost/` must FAIL naming the unresolved symbol (a build that drops +//! what it cannot resolve passes it, silently), and `code-bound/` — the SAME ghost with the shape unarmed — +//! must PASS with the violation reported under `unarmed_violations` (a build that ignores arming fails it). + +use std::path::{Path, PathBuf}; +use std::process::Command; + +fn pv_bin() -> PathBuf { + PathBuf::from(env!("CARGO_BIN_EXE_pv")) +} + +struct Run { + code: i32, + stdout: String, + stderr: String, +} + +fn pv_in(cwd: &Path, args: &[&str]) -> Run { + let out = Command::new(pv_bin()) + .current_dir(cwd) + .args(args) + .output() + .expect("failed to spawn pv"); + Run { + code: out.status.code().unwrap_or(-1), + stdout: String::from_utf8_lossy(&out.stdout).into_owned(), + stderr: String::from_utf8_lossy(&out.stderr).into_owned(), + } +} + +fn show(r: &Run) -> String { + format!( + "exit {}\n--- stdout\n{}\n--- stderr\n{}", + r.code, r.stdout, r.stderr + ) +} + +fn fixture(name: &str) -> PathBuf { + Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../../tests/fixtures/ont") + .join(name) +} + +fn json_of(r: &Run) -> serde_json::Value { + serde_json::from_str(&r.stdout).unwrap_or_else(|e| panic!("stdout is JSON: {e}\n{}", show(r))) +} + +/// The gate, run FROM the fixture root: `extract:code` resolves the workspace at the contract dir's parent and +/// `extract:lean` looks for the Lean tree there, so the cwd is part of the fixture. +fn gate(name: &str) -> Run { + pv_in( + &fixture(name), + &["lint", "contracts", "--gate", "shapes", "--format", "json"], + ) +} + +#[test] +fn the_bound_symbols_are_focus_nodes_and_the_walk_reports_what_it_resolved() { + let r = gate("code-bound"); + assert_eq!(r.code, 0, "{}", show(&r)); + let v = json_of(&r); + assert_eq!(v["verdict"], "Pass", "{}", show(&r)); + assert_eq!(v["by_entity_type"]["code"], 6, "{}", show(&r)); + assert_eq!(v["symbols_resolved"], 5, "{}", show(&r)); + assert_eq!(v["symbols_unresolved"], 1, "{}", show(&r)); + assert_eq!(v["pc_extract"]["code"], "fired", "{}", show(&r)); + assert_eq!(v["pc_extract"]["lean"], "fired", "{}", show(&r)); +} + +#[test] +fn an_unarmed_shape_reports_the_ghost_and_an_armed_one_fails_on_it() { + // The same ghost binding, the same shape, two arming declarations. + let reported = gate("code-bound"); + let vr = json_of(&reported); + assert_eq!(reported.code, 0, "{}", show(&reported)); + assert_eq!(vr["unarmed_violations"], 1, "{}", show(&reported)); + assert_eq!(vr["violations"], 0, "{}", show(&reported)); + assert!( + vr["not_armed_shapes"] + .as_array() + .is_some_and(|a| a.iter().any(|s| s == "bound-symbols-resolve")), + "{}", + show(&reported) + ); + + let armed = gate("code-ghost"); + assert_eq!(armed.code, 1, "{}", show(&armed)); + let va = json_of(&armed); + assert_eq!(va["verdict"], "Fail", "{}", show(&armed)); + assert_eq!(va["violations"], 1, "{}", show(&armed)); + let findings = va["findings"].as_array().expect("findings").clone(); + assert!( + findings + .iter() + .any(|f| f["message"].as_str().is_some_and(|m| m + .contains("symbol/kern::nn::functional::no_such_function") + && m.contains("bound-symbols-resolve"))), + "the violation names the symbol and the shape: {}", + show(&armed) + ); +} + +#[test] +fn a_theorem_file_carrying_sorry_grounds_nothing_and_the_shape_says_so() { + let r = gate("lean-sorry"); + assert_eq!(r.code, 1, "{}", show(&r)); + let v = json_of(&r); + assert_eq!(v["lean_statements"], 2, "{}", show(&r)); + assert_eq!(v["by_entity_type"]["lean"], 2, "{}", show(&r)); + let findings = v["findings"].as_array().expect("findings").clone(); + assert!( + findings + .iter() + .any(|f| f["message"].as_str().is_some_and(|m| { + m.contains("world/Softmax.Core.softmax_sums_to_one") + && m.contains("lean-statements-grounded") + })), + "the violation names the admitted theorem: {}", + show(&r) + ); +} + +#[test] +fn a_lean_reference_naming_no_theorem_is_counted_not_guessed() { + let r = gate("lean-sorry"); + let v = json_of(&r); + // `Theorems.NothingOfTheSort` resolves to nothing in the fixture's tree. + assert_eq!(v["lean_refs_unresolved"], 1, "{}", show(&r)); +} + +#[test] +fn the_vendored_w3c_cases_run_every_gate_run_and_all_pass() { + let r = gate("code-bound"); + let v = json_of(&r); + let n = v["w3c_cases_n"].as_u64().expect("w3c_cases_n"); + let passed = v["w3c_cases_passed"].as_u64().expect("w3c_cases_passed"); + assert!(n >= 16, "at least the 16 vendored cases: {}", show(&r)); + assert_eq!(passed, n, "every vendored case passes: {}", show(&r)); +} + +#[test] +fn extract_writes_symbol_and_world_nodes_with_no_blank_node() { + let dir = fixture("code-bound"); + let r = pv_in(&dir, &["extract", "contracts"]); + assert_eq!(r.code, 0, "{}", show(&r)); + let nt = std::fs::read_to_string(dir.join("contracts/contracts.nt")).expect("contracts.nt"); + assert!( + nt.contains("/symbol/kern::nn::functional::softmax>"), + "{nt}" + ); + assert!(nt.contains("/sym/attribute> \"kernel\""), "{nt}"); + assert!(!nt.contains("_:"), "no blank node"); + // Written by the same walk the gate grades (R-18): a second extraction is byte-identical. + let again = pv_in(&dir, &["extract", "contracts"]); + assert_eq!(again.code, 0, "{}", show(&again)); + let nt2 = std::fs::read_to_string(dir.join("contracts/contracts.nt")).expect("contracts.nt"); + assert_eq!(nt, nt2); + // The fixture's tracked graph is not part of the fixture: leave the tree as it was found. + let _ = std::fs::remove_file(dir.join("contracts/contracts.nt")); + let _ = std::fs::remove_file(dir.join("contracts/shapes.ttl")); +} + +#[test] +fn the_lean_tree_is_found_under_the_repo_root_never_the_process_cwd() { + // Run from a scratch cwd with an ABSOLUTE contract dir: the Lean tree must still be the fixture's. + let scratch = tempfile::tempdir().expect("scratch"); + let dir = fixture("lean-sorry").join("contracts"); + let r = pv_in( + scratch.path(), + &[ + "lint", + dir.to_str().expect("utf-8"), + "--gate", + "shapes", + "--format", + "json", + ], + ); + let v = json_of(&r); + assert_eq!(v["lean_statements"], 2, "{}", show(&r)); +} + +#[test] +fn the_oracle_crate_is_outside_the_workspace_and_no_shacl_crate_is_reachable() { + // R-13 / F-20, the falsifier ONT-0's ledger states: the pinned oracle may never enter the gate path. + let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); + let oracle = + std::fs::read_to_string(root.join("tests/oracle/Cargo.toml")).expect("oracle manifest"); + assert!( + oracle.contains("[workspace]"), + "the oracle crate detaches itself from the workspace" + ); + assert!( + oracle.contains("shacl = { version = \"=0.3.21\""), + "{oracle}" + ); + let lock = std::fs::read_to_string(root.join("Cargo.lock")).expect("workspace lock"); + for forbidden in [ + "name = \"shacl\"", + "name = \"rudof_rdf\"", + "name = \"oxigraph\"", + ] { + assert!( + !lock.contains(forbidden), + "{forbidden} is in the WORKSPACE lock — the oracle leaked into the gate path (R-13)" + ); + } +} diff --git a/crates/aprender-contracts-cli/tests/ont4b_shapes_gate.rs b/crates/aprender-contracts-cli/tests/ont4b_shapes_gate.rs index 55c5af79b3..25c6931414 100644 --- a/crates/aprender-contracts-cli/tests/ont4b_shapes_gate.rs +++ b/crates/aprender-contracts-cli/tests/ont4b_shapes_gate.rs @@ -218,8 +218,8 @@ fn the_tracked_repo_graph_is_fresh() { assert!(v["triples"].as_u64().unwrap_or(0) > 5000, "{}", show(&r)); assert_eq!( v["shapes_n"], - 3, - "ont-shapes-v1 + ladder-measured + ladder-green (ONT-4c1)\n{}", + 5, + "ont-shapes-v1 + ladder-measured + ladder-green (ONT-4c1) + bound-symbols-resolve + lean-statements-grounded (ONT-4b2)\n{}", show(&r) ); } diff --git a/crates/aprender-contracts-cli/tests/ont_extract_json.rs b/crates/aprender-contracts-cli/tests/ont_extract_json.rs index 353835cea0..cd15c71524 100644 --- a/crates/aprender-contracts-cli/tests/ont_extract_json.rs +++ b/crates/aprender-contracts-cli/tests/ont_extract_json.rs @@ -106,7 +106,7 @@ fn an_undeclared_key_and_a_value_outside_in_are_each_a_violation_naming_focus_an show(&r) ); assert!( - r.stdout.contains("broken is not one of"), + r.stdout.contains("broken") && r.stdout.contains("is not one of"), "the in: violation names the value\n{}", show(&r) ); diff --git a/crates/aprender-contracts/Cargo.toml b/crates/aprender-contracts/Cargo.toml index 8f8a5608ae..1870e8fc46 100644 --- a/crates/aprender-contracts/Cargo.toml +++ b/crates/aprender-contracts/Cargo.toml @@ -22,6 +22,7 @@ name = "provable_contracts" provable-contracts-macros = { path = "../aprender-contracts-macros", version = "0.68.1", package = "aprender-contracts-macros" } regex = "1" sha2 = { workspace = true } +syn = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } serde_yaml = { workspace = true } diff --git a/crates/aprender-contracts/src/lint/mod.rs b/crates/aprender-contracts/src/lint/mod.rs index f9593d7a6b..f40082149a 100644 --- a/crates/aprender-contracts/src/lint/mod.rs +++ b/crates/aprender-contracts/src/lint/mod.rs @@ -235,6 +235,15 @@ pub enum GateExtra { hex_mismatches: usize, /// Receipt rows without a `sha256` (never a witness). unmeasured_rows: usize, + /// ONT-4b2: vendored W3C SHACL-Core cases that passed this run, and how many are vendored. + w3c_cases_passed: usize, + w3c_cases_n: usize, + /// ONT-4b2: bound Rust symbols the `syn` walk resolved / could not resolve. + symbols_resolved: usize, + symbols_unresolved: usize, + /// ONT-4b2: Lean theorems extracted, and contract `lean_theorem:` references naming none of them. + lean_statements: usize, + lean_refs_unresolved: usize, }, } @@ -689,6 +698,17 @@ fn shapes_result(contract_dir: &Path, validation_passed: bool) -> (GateResult, V skipped_gate("shapes", &format!("positive control {which} did not fire ({shapes_n} shape(s), {focus_nodes_n} focus node(s)) — the gate cannot reject")), Vec::new(), ), + shapes_gate::ShapesOutcome::Differential { shapes_n, focus_nodes_n, passed, n, failed } => { + let mut g = skipped_gate( + "shapes", + &format!( + "W3C SHACL-Core differential: {passed} of {n} vendored case(s) pass; failed: {} ({shapes_n} shape(s), {focus_nodes_n} focus node(s)) — the validator disagrees with the standard, so no corpus verdict", + failed.join(" | ") + ), + ); + g.verdict = Verdict::Unknown(crate::ontology::verdict::Reason::Differential); + (g, Vec::new()) + } } } diff --git a/crates/aprender-contracts/src/lint/shapes_gate.rs b/crates/aprender-contracts/src/lint/shapes_gate.rs index 931cd0bb7d..e813127d18 100644 --- a/crates/aprender-contracts/src/lint/shapes_gate.rs +++ b/crates/aprender-contracts/src/lint/shapes_gate.rs @@ -30,11 +30,12 @@ use std::path::Path; use std::time::Instant; use crate::ontology::arming::ArmedShapes; -use crate::ontology::extract::{self, apr_model, gguf, pv_contract, ExtractFailure}; +use crate::ontology::extract::{self, apr_model, code, gguf, lean, pv_contract, ExtractFailure}; use crate::ontology::rdf::{iri, Graph, Term, RDF_TYPE}; use crate::ontology::receipts; use crate::ontology::shapes::{self, NodeShape, Report, Severity, ShapeError}; use crate::ontology::verdict::Reason; +use crate::ontology::w3c; use super::finding::LintFinding; use super::rules::RuleSeverity; @@ -64,6 +65,15 @@ pub enum ShapesOutcome { focus_nodes_n: usize, which: String, }, + /// A vendored W3C SHACL-Core case did not pass (ONT-4b2): the validator disagrees with the standard on a + /// form it claims, so no corpus verdict is trusted until it agrees — `Unknown{Differential}`. + Differential { + shapes_n: usize, + focus_nodes_n: usize, + passed: usize, + n: usize, + failed: Vec, + }, /// Shapes ran over the corpus, and the controls fired. Ran { result: Box, @@ -167,6 +177,19 @@ pub fn run_shapes_gate(contract_dir: &Path) -> ShapesOutcome { ) { return d; } + // ONT-4b2: the vendored W3C cases, every run. A validator that fails the standard's own case for a form + // it claims has no standing to grade the corpus. + let w3c_run = w3c::run_all(); + let w3c_failed = w3c_run.failed(); + if !w3c_failed.is_empty() { + return ShapesOutcome::Differential { + shapes_n: shapes.len(), + focus_nodes_n: report.focus_nodes_n, + passed: w3c_run.passed(), + n: w3c_run.results.len(), + failed: w3c_failed, + }; + } let counted = findings_of( &report, @@ -186,7 +209,7 @@ pub fn run_shapes_gate(contract_dir: &Path) -> ShapesOutcome { let mut by_shape: Vec = shapes .iter() .map(|s| { - let n = graph.instances_of(&s.target_class).len(); + let n = shapes::instances_closed(&graph, &s.target_class).len(); format!("{}={}", s.id, n) }) .collect(); @@ -207,6 +230,8 @@ pub fn run_shapes_gate(contract_dir: &Path) -> ShapesOutcome { extraction.gguf.rungs.len() + extraction.gguf.files_read, ), ("apr-model", extraction.apr_model.files_read), + ("code", extraction.code.symbols), + ("lean", extraction.lean.statements), ] .into_iter() .map(|(k, v)| (k.to_string(), v)) @@ -247,6 +272,12 @@ pub fn run_shapes_gate(contract_dir: &Path) -> ShapesOutcome { witnesses: extraction.resolve.witnesses, hex_mismatches: extraction.resolve.hex_mismatches, unmeasured_rows: extraction.resolve.unmeasured_rows, + w3c_cases_passed: w3c_run.passed(), + w3c_cases_n: w3c_run.results.len(), + symbols_resolved: extraction.code.resolved, + symbols_unresolved: extraction.code.unresolved, + lean_statements: extraction.lean.statements, + lean_refs_unresolved: extraction.lean.refs_unresolved.len(), }), }; ShapesOutcome::Ran { @@ -294,6 +325,8 @@ fn extract_controls() -> BTreeMap { [ ("gguf", gguf::positive_control()), ("apr-model", apr_model::positive_control(&apr_sample)), + ("code", code::positive_control()), + ("lean", lean::positive_control()), ] .into_iter() .map(|(k, fired)| { diff --git a/crates/aprender-contracts/src/ontology/extract/code.rs b/crates/aprender-contracts/src/ontology/extract/code.rs new file mode 100644 index 0000000000..8d03028a5c --- /dev/null +++ b/crates/aprender-contracts/src/ontology/extract/code.rs @@ -0,0 +1,822 @@ +//! ONT-001 §3.7, §5 ONT-4b2 — `extract:code`: the Rust symbols the bindings name become `ont:Symbol` nodes. +//! +//! The focus objects are the **bound** symbols — every `module_path` + `function` a `binding.yaml` under the +//! contract dir declares — not every function in the workspace (3.9 M lines; a graph of every `fn` would be a +//! second copy of the tree, and no contract constrains a symbol nothing binds). Each is resolved by a `syn` +//! **module-tree walk**: the crate root from the workspace's `Cargo.toml`s (`[package] name` and `[lib] name`, +//! both spellings), then one `mod` per path segment — inline, `mod x;` as `x.rs` / `x/mod.rs` / `#[path]`, or a +//! `pub use` re-export followed once — and finally a free `fn` or an `impl` method of that name. Only the files +//! on the walk are parsed, so the cost is bindings × depth, not the workspace. +//! +//! **Fail-closed, said in the graph.** A symbol the walk cannot find is still a node — `sym:resolved false` +//! with `sym:unresolvedReason` naming the file and the segment — so a shape can require `sym:resolved true` +//! and a ghost binding (ONT-3a's thesis) is a violation naming the symbol, not a silently smaller graph. +//! Nothing is inferred: the module path is the binding's own text, normalized only by dropping a trailing +//! segment equal to the function (the registries write both `a::b::f` + `f` and `a::b` + `f`). +//! +//! IRI: `https://ont.paiml.dev/v1alpha1/symbol/::::`. Vocabulary `sym:*`. Attributes +//! are recorded by path (`inline`, `kernel`, …) so ONT-4c3 can type a `#[kernel]` symbol `ont:Kernel` from the +//! same walk. Deterministic: registries and bindings are visited in byte order and the graph is a set (R-15). + +use std::collections::BTreeMap; +use std::path::{Path, PathBuf}; + +use crate::binding::{parse_binding, BindingRegistry, ImplStatus}; +use crate::ontology::rdf::{iri, ont, Graph, Term, PROV_ENTITY, RDF_TYPE}; + +/// A `sym:*` vocabulary term. +#[must_use] +pub fn sym(name: &str) -> String { + ont(&format!("sym/{name}")) +} + +/// What the walk found for one bound symbol. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Resolved { + /// Repo-relative file the item is defined in. + pub file: String, + /// `pub`, `pub(crate)`, `pub(super)`, `pub(in …)` or `private`. + pub visibility: String, + /// `fn` or `method`. + pub kind: String, + /// Attribute paths on the item, in source order (`inline`, `kernel`, `cfg`, …). + pub attributes: Vec, +} + +/// Why the walk stopped. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Unresolved { + pub reason: String, +} + +/// Counts the extractor reports beside the graph. +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct CodeStats { + pub registries: usize, + pub symbols: usize, + pub resolved: usize, + pub unresolved: usize, + pub files_parsed: usize, +} + +/// One bound symbol as a registry states it. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Bound { + pub contract: String, + pub equation: String, + pub module_path: String, + pub function: String, + pub status: ImplStatus, +} + +/// Every `binding.yaml` under `contract_dir` (any depth, byte order), parsed. Walked here, not through +/// `collect_yaml_files`, which excludes registries by name because they are not contracts. A file that does not +/// parse as a registry is skipped: registries are validated by `pv validate` (BINDING-001..006), not here. +#[must_use] +pub fn registries(contract_dir: &Path) -> Vec<(PathBuf, BindingRegistry)> { + let mut files = Vec::new(); + let mut stack = vec![contract_dir.to_path_buf()]; + while let Some(dir) = stack.pop() { + let Ok(entries) = std::fs::read_dir(&dir) else { + continue; + }; + for path in entries.flatten().map(|e| e.path()) { + if path.is_dir() { + stack.push(path); + } else if path.file_name().is_some_and(|n| n == "binding.yaml") { + files.push(path); + } + } + } + files.sort(); + files + .into_iter() + .filter_map(|f| parse_binding(&f).ok().map(|r| (f, r))) + .collect() +} + +/// The bound symbols of one registry, with the module path normalized (a trailing segment equal to the function +/// is dropped). Bindings without a `function` bind nothing and are skipped. +#[must_use] +pub fn bound_of(registry: &BindingRegistry) -> Vec { + registry + .bindings + .iter() + .filter_map(|b| { + let function = b.function.clone()?; + let mut module_path = b + .module_path + .clone() + .unwrap_or_else(|| registry.target_crate.clone()); + // `function: tokenize::run` under `module_path: apr_cli::commands::tokenize` — the registries + // also write a qualified function; the qualifier joins the module path (once, if it is not + // already its tail) and the function is the last segment. + let function = match function.rsplit_once("::") { + Some((qualifier, name)) => { + if !module_path.ends_with(&format!("::{qualifier}")) && module_path != qualifier + { + module_path = format!("{module_path}::{qualifier}"); + } + name.to_string() + } + None => function, + }; + let module_path = module_path + .strip_suffix(&format!("::{function}")) + .unwrap_or(&module_path) + .to_string(); + Some(Bound { + contract: crate::binding::normalize_contract_id(&b.contract).to_string(), + equation: b.equation.clone(), + module_path, + function, + status: b.status, + }) + }) + .collect() +} + +/// The crates of a workspace: every `Cargo.toml` under `root` (skipping build and vcs dirs), keyed by both the +/// package name and the `[lib] name`, `-` spelled `_`, mapped to the crate root files that claim the name — +/// more than one when a facade package and the library it re-exports share it (aprender's root `aprender` +/// is `pub use aprender_ml::*` over `crates/aprender-core`, whose `[lib] name` is also `aprender`). The walk +/// tries each in byte order of the manifest path and keeps the first that resolves. +#[derive(Debug, Default)] +pub struct Workspace { + pub root: PathBuf, + pub crates: BTreeMap>, +} + +impl Workspace { + /// Scan `root` for manifests. A manifest without a `[package]` name (a virtual workspace root) contributes + /// nothing. + #[must_use] + pub fn scan(root: &Path) -> Self { + let mut ws = Self { + root: root.to_path_buf(), + crates: BTreeMap::new(), + }; + let mut stack = vec![root.to_path_buf()]; + while let Some(dir) = stack.pop() { + let Ok(entries) = std::fs::read_dir(&dir) else { + continue; + }; + let mut children: Vec = entries.flatten().map(|e| e.path()).collect(); + children.sort(); + for path in children { + if path.is_dir() { + let skip = matches!( + path.file_name().and_then(|n| n.to_str()), + Some("target" | ".git" | ".lake" | "node_modules") + ); + if !skip { + stack.push(path); + } + } else if path.file_name().is_some_and(|n| n == "Cargo.toml") { + ws.index_manifest(&path); + } + } + } + ws + } + + fn index_manifest(&mut self, manifest: &Path) { + let Ok(text) = std::fs::read_to_string(manifest) else { + return; + }; + let m = manifest_names(&text); + let dir = manifest.parent().unwrap_or(manifest); + let lib_path = m + .lib_path + .map_or_else(|| dir.join("src/lib.rs"), |p| dir.join(p)); + for name in [m.package, m.lib].into_iter().flatten() { + let roots = self.crates.entry(name.replace('-', "_")).or_default(); + if !roots.contains(&lib_path) { + roots.push(lib_path.clone()); + } + } + } +} + +#[derive(Debug, Default)] +struct ManifestNames { + package: Option, + lib: Option, + lib_path: Option, +} + +/// `[package] name`, `[lib] name` and `[lib] path` by a section-aware line scan — the two keys this walk needs, +/// read without a TOML crate. +fn manifest_names(text: &str) -> ManifestNames { + let mut out = ManifestNames::default(); + let mut section = String::new(); + for line in text.lines() { + let t = line.trim(); + if t.starts_with('[') && t.ends_with(']') { + section = t.trim_matches(['[', ']']).trim().to_string(); + continue; + } + let Some((k, v)) = t.split_once('=') else { + continue; + }; + let k = k.trim(); + let v = v.trim().trim_matches('"').to_string(); + match (section.as_str(), k) { + ("package", "name") => out.package = Some(v), + ("lib", "name") => out.lib = Some(v), + ("lib", "path") => out.lib_path = Some(v), + _ => {} + } + } + out +} + +/// The `syn` walker with a per-file parse cache. +pub struct Resolver<'a> { + ws: &'a Workspace, + cache: BTreeMap>>, +} + +/// One module on the walk: its items, the file they came from, and the directory its child files live in. +struct Module { + items: Vec, + file: PathBuf, + child_dir: PathBuf, +} + +impl<'a> Resolver<'a> { + #[must_use] + pub fn new(ws: &'a Workspace) -> Self { + Self { + ws, + cache: BTreeMap::new(), + } + } + + /// Files parsed so far (each once). + #[must_use] + pub fn files_parsed(&self) -> usize { + self.cache.values().filter(|f| f.is_some()).count() + } + + fn parse(&mut self, file: &Path) -> Option> { + if let Some(hit) = self.cache.get(file) { + return hit.clone(); + } + let parsed = std::fs::read_to_string(file) + .ok() + .and_then(|src| syn::parse_file(&src).ok()) + .map(std::rc::Rc::new); + self.cache.insert(file.to_path_buf(), parsed.clone()); + parsed + } + + /// The crate root files that claim `krate`, in manifest order. + fn crate_roots(&self, krate: &str) -> Result, Unresolved> { + let roots: Vec = self + .ws + .crates + .get(&krate.replace('-', "_")) + .cloned() + .unwrap_or_default(); + if roots.is_empty() { + return Err(Unresolved { + reason: format!("crate `{krate}` is not a workspace member"), + }); + } + Ok(roots) + } + + fn file_module(&mut self, file: &Path, child_dir: PathBuf) -> Result { + let Some(ast) = self.parse(file) else { + return Err(Unresolved { + reason: format!("`{}` is missing or does not parse", self.rel(file)), + }); + }; + Ok(Module { + items: ast.items.clone(), + file: file.to_path_buf(), + child_dir, + }) + } + + /// Resolve `module_path::function` to its definition. `depth` bounds re-export chasing. + pub fn resolve(&mut self, module_path: &str, function: &str) -> Result { + self.resolve_depth(module_path, function, 0) + } + + fn resolve_depth( + &mut self, + module_path: &str, + function: &str, + depth: usize, + ) -> Result { + if depth > 8 { + return Err(Unresolved { + reason: format!("`{module_path}::{function}`: re-export chain deeper than 8"), + }); + } + let mut segs = module_path.split("::").filter(|s| !s.is_empty()); + let Some(krate) = segs.next() else { + return Err(Unresolved { + reason: "empty module path".to_string(), + }); + }; + let segs: Vec<&str> = segs.collect(); + let mut last = Unresolved { + reason: String::new(), + }; + for root in self.crate_roots(krate)? { + match self.resolve_in_root(&root, &segs, function, depth) { + Ok(r) => return Ok(r), + Err(e) => last = e, + } + } + Err(last) + } + + /// The walk from one crate root file. + fn resolve_in_root( + &mut self, + root: &Path, + segs: &[&str], + function: &str, + depth: usize, + ) -> Result { + let mut module = self.file_module(root, root.parent().unwrap_or(root).to_path_buf())?; + for (i, seg) in segs.iter().enumerate() { + match self.step(&module, seg)? { + Step::Module(next) => module = next, + Step::ReExport(target) => { + let rest = segs[i + 1..].join("::"); + let path = if rest.is_empty() { + target + } else { + format!("{target}::{rest}") + }; + return self.resolve_depth(&path, function, depth + 1); + } + } + } + match find_item(&module.items, function) { + Some(mut r) => { + r.file = self.rel(&module.file); + Ok(r) + } + None => match use_target(&module.items, function) { + Some(target) => { + let target = absolute_use(&target, &module, self.ws); + self.resolve_by_use(&target, depth) + } + None => Err(Unresolved { + reason: format!( + "no `fn {function}` (free or in an impl) in `{}`", + self.rel(&module.file) + ), + }), + }, + } + } + + fn resolve_by_use(&mut self, target: &str, depth: usize) -> Result { + let (path, name) = target.rsplit_once("::").ok_or_else(|| Unresolved { + reason: format!("re-export `{target}` has no module path"), + })?; + self.resolve_depth(path, name, depth + 1) + } + + fn step(&mut self, module: &Module, seg: &str) -> Result { + for item in &module.items { + if let syn::Item::Mod(m) = item { + if m.ident != seg { + continue; + } + if let Some((_, content)) = &m.content { + return Ok(Step::Module(Module { + items: content.clone(), + file: module.file.clone(), + child_dir: module.child_dir.join(seg), + })); + } + let (file, child_dir) = child_file(&module.child_dir, seg, &m.attrs)?; + return self.file_module(&file, child_dir).map(Step::Module); + } + } + if let Some(target) = use_target(&module.items, seg) { + let target = absolute_use(&target, module, self.ws); + return Ok(Step::ReExport(target)); + } + Err(Unresolved { + reason: format!( + "no `mod {seg}` or `use … {seg}` in `{}`", + self.rel(&module.file) + ), + }) + } + + fn rel(&self, file: &Path) -> String { + file.strip_prefix(&self.ws.root) + .unwrap_or(file) + .to_string_lossy() + .replace('\\', "/") + } +} + +enum Step { + Module(Module), + ReExport(String), +} + +/// `mod seg;` → `#[path = "…"]` relative to the child dir, else `seg.rs`, else `seg/mod.rs`. The child dir of +/// the new module is `/seg/` either way. +fn child_file( + child_dir: &Path, + seg: &str, + attrs: &[syn::Attribute], +) -> Result<(PathBuf, PathBuf), Unresolved> { + for a in attrs { + if a.path().is_ident("path") { + if let syn::Meta::NameValue(nv) = &a.meta { + if let syn::Expr::Lit(syn::ExprLit { + lit: syn::Lit::Str(s), + .. + }) = &nv.value + { + let f = child_dir.join(s.value()); + return Ok((f.clone(), f.parent().unwrap_or(&f).to_path_buf())); + } + } + } + } + let flat = child_dir.join(format!("{seg}.rs")); + if flat.is_file() { + return Ok((flat, child_dir.join(seg))); + } + let nested = child_dir.join(seg).join("mod.rs"); + if nested.is_file() { + return Ok((nested, child_dir.join(seg))); + } + Err(Unresolved { + reason: format!( + "`mod {seg};` declared but neither `{}` nor `{}` exists", + flat.display(), + nested.display() + ), + }) +} + +/// A free `fn name` or an `impl … { fn name }` among `items`. +fn find_item(items: &[syn::Item], name: &str) -> Option { + items.iter().find_map(|item| match item { + syn::Item::Fn(f) if f.sig.ident == name => Some(found("fn", &f.vis, &f.attrs)), + syn::Item::Impl(im) => find_method(&im.items, name), + _ => None, + }) +} + +/// The `fn name` of one `impl` block. +fn find_method(items: &[syn::ImplItem], name: &str) -> Option { + items.iter().find_map(|ii| match ii { + syn::ImplItem::Fn(f) if f.sig.ident == name => Some(found("method", &f.vis, &f.attrs)), + _ => None, + }) +} + +/// A resolution with the file filled in by the caller that knows it. +fn found(kind: &str, vis: &syn::Visibility, attrs: &[syn::Attribute]) -> Resolved { + Resolved { + file: String::new(), + visibility: visibility_of(vis), + kind: kind.to_string(), + attributes: attr_paths(attrs), + } +} + +/// The path a `use` item binds `name` to, as written (`crate::a::b`, `self::x`, `super::y`, `other::z`), when +/// one does; renames (`as`) are honoured. +fn use_target(items: &[syn::Item], name: &str) -> Option { + for item in items { + if let syn::Item::Use(u) = item { + if let Some(t) = use_tree_target(&u.tree, name, "") { + return Some(t); + } + } + } + None +} + +fn use_tree_target(tree: &syn::UseTree, name: &str, prefix: &str) -> Option { + let join = |p: &str, s: &str| { + if p.is_empty() { + s.to_string() + } else { + format!("{p}::{s}") + } + }; + match tree { + syn::UseTree::Path(p) => { + use_tree_target(&p.tree, name, &join(prefix, &p.ident.to_string())) + } + syn::UseTree::Name(n) if n.ident == name => Some(join(prefix, &n.ident.to_string())), + syn::UseTree::Rename(r) if r.rename == name => Some(join(prefix, &r.ident.to_string())), + syn::UseTree::Group(g) => g + .items + .iter() + .find_map(|t| use_tree_target(t, name, prefix)), + _ => None, + } +} + +/// Make a `use` path absolute from the crate root: `crate::` → the crate's name; `self::` → this module; +/// `super::` → its parent; a bare leading segment is first tried as a workspace crate, else as a sibling module. +fn absolute_use(target: &str, module: &Module, ws: &Workspace) -> String { + let here = module_path_of(module, ws); + let krate = here.split("::").next().unwrap_or_default().to_string(); + let (head, rest) = target.split_once("::").unwrap_or((target, "")); + let base = match head { + "crate" => krate, + "self" => here.clone(), + "super" => here + .rsplit_once("::") + .map_or(here.clone(), |(p, _)| p.to_string()), + other if ws.crates.contains_key(&other.replace('-', "_")) => other.to_string(), + other => format!("{here}::{other}"), + }; + if rest.is_empty() { + base + } else { + format!("{base}::{rest}") + } +} + +/// The module path of a module on the walk, from its child dir relative to the crate's `src/`: +/// `` for the root, `::a::b` below it. +fn module_path_of(module: &Module, ws: &Workspace) -> String { + // The crate whose `src/` is the LONGEST prefix of the module's dir owns it (a workspace root package's + // `src/` is a prefix of nothing under `crates/`, but nested crates exist). + let mut best: Option<(usize, String)> = None; + for (name, roots) in &ws.crates { + for root in roots { + let Some(src) = root.parent() else { continue }; + let Ok(rel) = module.child_dir.strip_prefix(src) else { + continue; + }; + let depth = src.components().count(); + if best.as_ref().is_some_and(|(d, _)| *d >= depth) { + continue; + } + let tail: Vec = rel + .components() + .map(|c| c.as_os_str().to_string_lossy().to_string()) + .collect(); + let path = if tail.is_empty() { + name.clone() + } else { + format!("{name}::{}", tail.join("::")) + }; + best = Some((depth, path)); + } + } + best.map(|(_, p)| p).unwrap_or_default() +} + +fn visibility_of(v: &syn::Visibility) -> String { + match v { + syn::Visibility::Public(_) => "pub".to_string(), + syn::Visibility::Restricted(r) => { + let p = r + .path + .segments + .iter() + .map(|s| s.ident.to_string()) + .collect::>() + .join("::"); + format!("pub({p})") + } + syn::Visibility::Inherited => "private".to_string(), + } +} + +fn attr_paths(attrs: &[syn::Attribute]) -> Vec { + attrs + .iter() + .map(|a| { + a.path() + .segments + .iter() + .map(|s| s.ident.to_string()) + .collect::>() + .join("::") + }) + .collect() +} + +/// The symbol IRI of a bound symbol. +#[must_use] +pub fn symbol_iri(b: &Bound) -> String { + iri("symbol", &format!("{}::{}", b.module_path, b.function)) +} + +/// One bound symbol into `g`, resolved or not. +pub fn emit(g: &mut Graph, b: &Bound, found: &Result) { + let s = symbol_iri(b); + g.insert(s.clone(), RDF_TYPE, Term::iri(ont("Symbol"))); + g.insert(s.clone(), RDF_TYPE, Term::iri(PROV_ENTITY)); + let krate = b.module_path.split("::").next().unwrap_or_default(); + g.insert(s.clone(), sym("crate"), Term::string(krate)); + g.insert(s.clone(), sym("module"), Term::string(&b.module_path)); + g.insert(s.clone(), sym("name"), Term::string(&b.function)); + g.insert( + s.clone(), + sym("implements"), + Term::iri(iri("contract", &b.contract)), + ); + g.insert(s.clone(), sym("equation"), Term::string(&b.equation)); + g.insert( + s.clone(), + sym("bindingStatus"), + Term::string(format!("{:?}", b.status).to_lowercase()), + ); + match found { + Ok(r) => { + g.insert(s.clone(), sym("resolved"), Term::boolean(true)); + g.insert(s.clone(), sym("file"), Term::string(&r.file)); + g.insert(s.clone(), sym("visibility"), Term::string(&r.visibility)); + g.insert(s.clone(), sym("kind"), Term::string(&r.kind)); + for a in &r.attributes { + g.insert(s.clone(), sym("attribute"), Term::string(a)); + } + } + Err(u) => { + g.insert(s.clone(), sym("resolved"), Term::boolean(false)); + g.insert(s, sym("unresolvedReason"), Term::string(&u.reason)); + } + } +} + +/// Every bound symbol of every registry under `contract_dir`, resolved against the workspace at the contract +/// dir's parent, into `g`. +pub fn extract(contract_dir: &Path, g: &mut Graph) -> CodeStats { + let root_buf = super::repo_root(contract_dir); + let root = root_buf.as_path(); + let ws = Workspace::scan(root); + let mut resolver = Resolver::new(&ws); + let mut stats = CodeStats::default(); + for (_file, registry) in registries(contract_dir) { + stats.registries += 1; + for b in bound_of(®istry) { + let found = resolver.resolve(&b.module_path, &b.function); + if found.is_ok() { + stats.resolved += 1; + } else { + stats.unresolved += 1; + } + stats.symbols += 1; + emit(g, &b, &found); + } + } + stats.files_parsed = resolver.files_parsed(); + stats +} + +/// Positive control (`pc_extract.code`, run in memory every gate run): the resolver must find a function that +/// is there and must refuse one that is not — a walker that resolved everything would make every ghost binding +/// a Pass. +#[must_use] +pub fn positive_control() -> bool { + let src = "pub mod m { pub fn present() {} }\npub use m::present as alias;"; + let Ok(ast) = syn::parse_file(src) else { + return false; + }; + let present = find_item(&ast.items, "present").is_none() + && match ast.items.first() { + Some(syn::Item::Mod(m)) => m + .content + .as_ref() + .is_some_and(|(_, items)| find_item(items, "present").is_some()), + _ => false, + }; + let ghost = + find_item(&ast.items, "absent").is_none() && use_target(&ast.items, "absent").is_none(); + let aliased = use_target(&ast.items, "alias").as_deref() == Some("m::present"); + present && ghost && aliased +} + +#[cfg(test)] +mod tests { + use super::*; + + fn fixture() -> PathBuf { + Path::new(env!("CARGO_MANIFEST_DIR")).join("../../tests/fixtures/ont/code-bound") + } + + #[test] + fn the_manifest_scan_indexes_package_and_lib_names() { + let ws = Workspace::scan(&fixture()); + assert!(ws.crates.contains_key("kern"), "{:?}", ws.crates); + assert!(ws.crates.contains_key("kern_crate"), "{:?}", ws.crates); + assert!(ws.crates["kern"][0].ends_with("crates/kern/src/lib.rs")); + } + + #[test] + fn the_walk_resolves_files_inline_modules_methods_and_re_exports_and_refuses_a_ghost() { + let ws = Workspace::scan(&fixture()); + let mut r = Resolver::new(&ws); + let softmax = r + .resolve("kern::nn::functional", "softmax") + .expect("softmax"); + assert_eq!(softmax.file, "crates/kern/src/nn/functional.rs"); + assert_eq!(softmax.visibility, "pub"); + assert_eq!(softmax.kind, "fn"); + assert_eq!(softmax.attributes, vec!["inline".to_string()]); + let relu = r.resolve("kern::nn::functional", "relu").expect("relu"); + assert_eq!(relu.visibility, "pub(crate)"); + let forward = r.resolve("kern::nn", "forward").expect("forward"); + assert_eq!(forward.kind, "method"); + assert_eq!(forward.file, "crates/kern/src/nn.rs"); + let helper = r + .resolve("kern", "helper") + .expect("helper via pub use … as"); + assert_eq!(helper.file, "crates/kern/src/lib.rs"); + assert_eq!(helper.visibility, "pub"); + let kernel = r + .resolve("kern::nn::functional", "gated_rmsnorm") + .expect("kernel"); + assert_eq!(kernel.attributes, vec!["kernel".to_string()]); + let ghost = r + .resolve("kern::nn::functional", "no_such_function") + .unwrap_err(); + assert!( + ghost.reason.contains("no `fn no_such_function`"), + "{}", + ghost.reason + ); + assert!( + ghost.reason.contains("crates/kern/src/nn/functional.rs"), + "{}", + ghost.reason + ); + let no_crate = r.resolve("nowhere::x", "f").unwrap_err(); + assert!(no_crate.reason.contains("not a workspace member")); + let no_mod = r.resolve("kern::nope", "f").unwrap_err(); + assert!(no_mod.reason.contains("no `mod nope`"), "{}", no_mod.reason); + assert_eq!(r.files_parsed(), 3); + } + + #[test] + fn the_graph_carries_every_bound_symbol_resolved_or_not_and_is_deterministic() { + let dir = fixture().join("contracts"); + let mut g = Graph::new(); + let stats = extract(&dir, &mut g); + assert_eq!(stats.registries, 1); + assert_eq!(stats.symbols, 6); + assert_eq!(stats.resolved, 5); + assert_eq!(stats.unresolved, 1); + let nt = g.to_ntriples(); + assert!(nt.contains("/symbol/kern::nn::functional::softmax> \"true\""), "{nt}"); + assert!(nt.contains("/symbol/kern::nn::functional::no_such_function> \"false\""), "{nt}"); + assert!( + nt.contains("sym/unresolvedReason> \"no `fn no_such_function`"), + "{nt}" + ); + assert!( + nt.contains( + "sym/implements> " + ), + "{nt}" + ); + assert!(nt.contains("sym/attribute> \"kernel\""), "{nt}"); + assert!(!nt.contains("_:")); + let mut g2 = Graph::new(); + extract(&dir, &mut g2); + assert_eq!(nt, g2.to_ntriples()); + } + + #[test] + fn a_trailing_segment_equal_to_the_function_is_dropped_from_the_module_path() { + let reg = parse_binding(&fixture().join("contracts/binding.yaml")).expect("registry"); + let bound = bound_of(®); + let softmax = bound + .iter() + .find(|b| b.function == "softmax") + .expect("softmax"); + assert_eq!(softmax.module_path, "kern::nn::functional"); + assert_eq!( + symbol_iri(softmax), + "https://ont.paiml.dev/v1alpha1/symbol/kern::nn::functional::softmax" + ); + } + + #[test] + fn the_positive_control_fires() { + assert!(positive_control()); + } + + #[test] + fn manifest_names_reads_package_and_lib_sections_only() { + let m = manifest_names("[package]\nname = \"a-b\"\n[dependencies]\nname = \"x\"\n[lib]\nname = \"ab\"\npath = \"src/x.rs\"\n"); + assert_eq!(m.package.as_deref(), Some("a-b")); + assert_eq!(m.lib.as_deref(), Some("ab")); + assert_eq!(m.lib_path.as_deref(), Some("src/x.rs")); + } +} diff --git a/crates/aprender-contracts/src/ontology/extract/lean.rs b/crates/aprender-contracts/src/ontology/extract/lean.rs new file mode 100644 index 0000000000..459df26afd --- /dev/null +++ b/crates/aprender-contracts/src/ontology/extract/lean.rs @@ -0,0 +1,401 @@ +//! ONT-001 §3.7, §5 ONT-4b2 — `extract:lean`: the in-tree Lean theorems become `ont:Statement` nodes. +//! +//! The focus objects are the `theorem` declarations under `/ProvableContracts/Theorems//*.lean` +//! — the same files, the same `sorry` rule and the same name forms ONT-2a's grounding scan reads +//! ([`crate::proof_status`]), so what the graph says about a theorem and what `proof-status` credits agree by +//! construction. The base is the first of [`crate::proof_status::LEAN_THEOREM_BASES`] that exists under the +//! repo root (the contract dir's parent), never the process cwd. +//! +//! Each statement carries `lean:name`, `lean:domain`, `lean:file`, `lean:module`, `lean:sorryFree` (a FILE with +//! `sorry` grounds nothing — an admitted proof is not a proof, ONT-2a) and `lean:discharge` (`grounded` | +//! `admitted`). `lean:modelOf` → `contract/` for every contract whose `lean_theorem:` reference (in +//! `equations.*` or `proof_obligations[]`) names this theorem, its file or its domain in one of ONT-2a's accepted +//! forms — the reference is the contract's own text, matched, never inferred. A reference matching nothing is +//! counted (`refs_unresolved`) so a shape can require every claimed theorem to exist; PVL-001's +//! `formalization.yaml` (`relation.kind`, capstones) is not read here — it does not exist in this tree yet, and +//! the row that lands it extends this reader. +//! +//! IRI: `https://ont.paiml.dev/v1alpha1/world/..`. No blank nodes; byte-ordered walk. + +use std::collections::{BTreeMap, BTreeSet}; +use std::path::{Path, PathBuf}; + +use crate::ontology::rdf::{iri, ont, Graph, Term, PROV_ENTITY, RDF_TYPE}; +use crate::proof_status::{camel_case, first_camel_word, LEAN_THEOREM_BASES}; + +/// A `lean:*` vocabulary term. +#[must_use] +pub fn lean(name: &str) -> String { + ont(&format!("lean/{name}")) +} + +/// One `theorem` declaration. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Statement { + pub domain: String, + pub stem: String, + pub name: String, + /// Repo-relative file. + pub file: String, + pub sorry_free: bool, +} + +impl Statement { + /// `ProvableContracts.Theorems..`. + #[must_use] + pub fn module(&self) -> String { + format!("ProvableContracts.Theorems.{}.{}", self.domain, self.stem) + } + + /// The names a contract may cite this theorem by — the forms ONT-2a's scan registers for its theorem, its + /// file and its domain. + #[must_use] + pub fn accepted_names(&self) -> BTreeSet { + let mut names = BTreeSet::new(); + for label in [self.domain.as_str(), self.stem.as_str()] { + names.insert(format!("Theorems.{label}")); + names.insert(label.to_string()); + names.insert(label.to_lowercase()); + } + let camel = camel_case(&self.name); + names.insert(format!("Theorems.{camel}")); + names.insert(camel.clone()); + let first = first_camel_word(&camel); + if first.len() >= 3 { + names.insert(format!("Theorems.{first}")); + names.insert(first); + } + names + } +} + +/// Counts reported beside the graph. +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct LeanStats { + /// The base directory used, repo-relative; `None` when no base exists (no `lean` triples, by measurement). + pub base: Option, + pub files: usize, + pub statements: usize, + pub sorry_free: usize, + /// Statements with at least one `lean:modelOf` edge. + pub modeled: usize, + /// `(contract stem, reference)` pairs that name no theorem, file or domain in the tree. + pub refs_unresolved: Vec<(String, String)>, +} + +/// The first Lean base that exists under `root`. +#[must_use] +pub fn base_under(root: &Path) -> Option { + LEAN_THEOREM_BASES + .iter() + .map(|b| root.join(b)) + .find(|p| p.join("ProvableContracts/Theorems").is_dir()) +} + +/// Every `theorem ` in one file's text, in order. +#[must_use] +pub fn theorems_in(content: &str) -> Vec { + let mut out = Vec::new(); + for line in content.lines() { + let Some(pos) = line.find("theorem ") else { + continue; + }; + let name: String = line[pos + 8..] + .chars() + .take_while(|c| c.is_alphanumeric() || *c == '_') + .collect(); + if !name.is_empty() { + out.push(name); + } + } + out +} + +/// The statements of one file. +#[must_use] +pub fn statements_of(domain: &str, stem: &str, rel: &str, content: &str) -> Vec { + let sorry_free = !content.contains("sorry"); + theorems_in(content) + .into_iter() + .map(|name| Statement { + domain: domain.to_string(), + stem: stem.to_string(), + name, + file: rel.to_string(), + sorry_free, + }) + .collect() +} + +/// Walk `/ProvableContracts/Theorems//*.lean` in byte order. +fn walk(root: &Path, base: &Path, stats: &mut LeanStats) -> Vec { + let theorems = base.join("ProvableContracts/Theorems"); + let mut domains: Vec = std::fs::read_dir(&theorems) + .map(|rd| { + rd.flatten() + .map(|e| e.path()) + .filter(|p| p.is_dir()) + .collect() + }) + .unwrap_or_default(); + domains.sort(); + let mut out = Vec::new(); + for domain_dir in domains { + let domain = domain_dir + .file_name() + .unwrap_or_default() + .to_string_lossy() + .to_string(); + let mut files: Vec = std::fs::read_dir(&domain_dir) + .map(|rd| { + rd.flatten() + .map(|e| e.path()) + .filter(|p| p.extension().is_some_and(|e| e == "lean")) + .collect() + }) + .unwrap_or_default(); + files.sort(); + for file in files { + let Ok(content) = std::fs::read_to_string(&file) else { + continue; + }; + stats.files += 1; + let stem = file + .file_stem() + .unwrap_or_default() + .to_string_lossy() + .to_string(); + let rel = file + .strip_prefix(root) + .unwrap_or(&file) + .to_string_lossy() + .replace('\\', "/"); + out.extend(statements_of(&domain, &stem, &rel, &content)); + } + } + out +} + +/// Every `lean_theorem:` reference a contract document makes, from `equations.*` and `proof_obligations[]`, +/// trimmed of quotes; `none` and empty are not references. +#[must_use] +pub fn references_of(doc: &serde_yaml::Value) -> Vec { + let mut refs = Vec::new(); + let mut push = |v: Option<&serde_yaml::Value>| { + if let Some(s) = v.and_then(serde_yaml::Value::as_str) { + let s = s.trim().trim_matches('"'); + if !s.is_empty() && s != "none" && !s.starts_with("none ") { + refs.push(s.to_string()); + } + } + }; + if let Some(eqs) = doc.get("equations").and_then(serde_yaml::Value::as_mapping) { + for (_, eq) in eqs { + push(eq.get("lean_theorem")); + } + } + if let Some(obs) = doc + .get("proof_obligations") + .and_then(serde_yaml::Value::as_sequence) + { + for ob in obs { + push(ob.get("lean_theorem")); + } + } + refs.sort(); + refs.dedup(); + refs +} + +/// A reference matches a statement when one of the statement's accepted names equals the reference, the +/// reference without `Theorems.`, or the reference lowercased — ONT-2a's three tries. +#[must_use] +pub fn reference_matches(reference: &str, accepted: &BTreeSet) -> bool { + accepted.contains(reference) + || accepted.contains(reference.strip_prefix("Theorems.").unwrap_or(reference)) + || accepted.contains(&reference.to_lowercase()) +} + +/// The statement IRI. +#[must_use] +pub fn statement_iri(s: &Statement) -> String { + iri("world", &format!("{}.{}.{}", s.domain, s.stem, s.name)) +} + +/// One statement into `g`, with its `modelOf` edges. +pub fn emit(g: &mut Graph, s: &Statement, model_of: &[String]) { + let n = statement_iri(s); + g.insert(n.clone(), RDF_TYPE, Term::iri(ont("Statement"))); + g.insert(n.clone(), RDF_TYPE, Term::iri(PROV_ENTITY)); + g.insert(n.clone(), lean("name"), Term::string(&s.name)); + g.insert(n.clone(), lean("domain"), Term::string(&s.domain)); + g.insert(n.clone(), lean("file"), Term::string(&s.file)); + g.insert(n.clone(), lean("module"), Term::string(s.module())); + g.insert(n.clone(), lean("sorryFree"), Term::boolean(s.sorry_free)); + g.insert( + n.clone(), + lean("discharge"), + Term::string(if s.sorry_free { "grounded" } else { "admitted" }), + ); + for stem in model_of { + g.insert(n.clone(), lean("modelOf"), Term::iri(iri("contract", stem))); + } +} + +/// The statements of the tree under `contract_dir`'s parent, joined to the contracts that cite them, into `g`. +pub fn extract(contract_dir: &Path, g: &mut Graph) -> LeanStats { + let root_buf = super::repo_root(contract_dir); + let root = root_buf.as_path(); + let mut stats = LeanStats::default(); + let Some(base) = base_under(root) else { + return stats; + }; + stats.base = Some( + base.strip_prefix(root) + .unwrap_or(&base) + .to_string_lossy() + .replace('\\', "/"), + ); + let statements = walk(root, &base, &mut stats); + let accepted: Vec> = + statements.iter().map(Statement::accepted_names).collect(); + // contract stem → its references; reference → the statements it names + let mut model_of: BTreeMap> = BTreeMap::new(); + for (stem, _rel, doc) in super::pv_contract::documents(contract_dir) { + for reference in references_of(&doc) { + let mut hit = false; + for (i, names) in accepted.iter().enumerate() { + if reference_matches(&reference, names) { + model_of.entry(i).or_default().insert(stem.clone()); + hit = true; + } + } + if !hit { + stats.refs_unresolved.push((stem.clone(), reference)); + } + } + } + for (i, s) in statements.iter().enumerate() { + let contracts: Vec = model_of + .get(&i) + .map(|set| set.iter().cloned().collect()) + .unwrap_or_default(); + stats.statements += 1; + if s.sorry_free { + stats.sorry_free += 1; + } + if !contracts.is_empty() { + stats.modeled += 1; + } + emit(g, s, &contracts); + } + stats +} + +/// Positive control (`pc_extract.lean`, in memory every gate run): a file with `sorry` must ground nothing, a +/// file without must, and a reference that names nothing must be unresolved — a reader that credited every +/// claim would make every self-declared L4 a Pass. +#[must_use] +pub fn positive_control() -> bool { + let admitted = statements_of( + "Softmax", + "Core", + "x.lean", + "theorem softmax_sums : True := by sorry\n", + ); + let grounded = statements_of( + "Softmax", + "Core", + "x.lean", + "theorem softmax_sums : True := trivial\n", + ); + let (Some(a), Some(g)) = (admitted.first(), grounded.first()) else { + return false; + }; + let names = g.accepted_names(); + !a.sorry_free + && g.sorry_free + && reference_matches("Theorems.Softmax", &names) + && reference_matches("Theorems.SoftmaxSums", &names) + && !reference_matches("Theorems.NothingOfTheSort", &names) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn theorems_and_sorry_are_read_as_ont_2a_reads_them() { + let src = "namespace X\ntheorem relu_nonneg (x : Float) : True := trivial\n theorem two_words : True := by\n sorry\n"; + let st = statements_of("Relu", "Core", "lean/Relu/Core.lean", src); + assert_eq!(st.len(), 2); + assert_eq!(st[0].name, "relu_nonneg"); + assert!( + !st[0].sorry_free, + "a file with sorry grounds nothing, whatever line the sorry is on" + ); + let names = st[0].accepted_names(); + for n in [ + "Theorems.Relu", + "Relu", + "relu", + "Theorems.Core", + "Theorems.ReluNonneg", + "ReluNonneg", + ] { + assert!(names.contains(n), "{n} missing from {names:?}"); + } + assert!(reference_matches("Theorems.ReluNonneg", &names)); + assert!(reference_matches("relu", &names)); + assert!(!reference_matches("Theorems.Gelu", &names)); + } + + #[test] + fn references_come_from_equations_and_obligations_and_none_is_not_one() { + let doc: serde_yaml::Value = serde_yaml::from_str( + "equations:\n a:\n lean_theorem: Theorems.A\n b:\n lean_theorem: none — L4 not declared\nproof_obligations:\n - lean_theorem: \"Theorems.B\"\n - lean_theorem: none\n - id: x\n", + ) + .expect("yaml"); + assert_eq!( + references_of(&doc), + vec!["Theorems.A".to_string(), "Theorems.B".to_string()] + ); + } + + #[test] + fn the_positive_control_fires() { + assert!(positive_control()); + } + + #[test] + fn a_tree_without_a_lean_base_yields_no_triples_and_says_so() { + let dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../../tests/fixtures/ont/relations-ok"); + let mut g = Graph::new(); + let stats = extract(&dir, &mut g); + assert_eq!(stats.base, None); + assert_eq!(stats.statements, 0); + assert!(g.is_empty()); + } + + #[test] + fn the_real_tree_is_extracted_deterministically_with_model_of_edges() { + // The repo's own Lean tree: the one witness the row has today. + let dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../contracts"); + let mut g = Graph::new(); + let stats = extract(&dir, &mut g); + assert_eq!( + stats.base.as_deref(), + Some("crates/aprender-contracts-staging/lean") + ); + assert!(stats.statements > 100, "{stats:?}"); + assert!(stats.modeled > 0, "{stats:?}"); + let nt = g.to_ntriples(); + assert!(nt.contains("/world/"), "{}", &nt[..200]); + assert!(nt.contains("lean/modelOf> , /// ONT-4c1: witnesses, hex mismatches, unmeasured rows, green / missing hosts. pub resolve: receipts::ResolveStats, + /// ONT-4b2: the bound Rust symbols, resolved by the `syn` walk or not. + pub code: code::CodeStats, + /// ONT-4b2: the in-tree Lean theorems and the contracts that cite them. + pub lean: lean::LeanStats, } /// What a walk could not do. Every variant is the DECLARATION's fault (exit 3), never a corpus verdict. @@ -78,5 +85,18 @@ pub fn all(contract_dir: &Path) -> Result { out.apr_model = apr_model::extract(contract_dir, &mut out.graph); out.receipts = receipts::read_all(root).map_err(ExtractFailure::Receipt)?; out.resolve = receipts::resolve(&mut out.graph, &out.gguf.rungs, &out.receipts); + out.code = code::extract(contract_dir, &mut out.graph); + out.lean = lean::extract(contract_dir, &mut out.graph); Ok(out) } + +/// The repo root an extractor resolves against: the contract dir's parent — and `.` when the contract dir is a +/// bare relative name like `contracts`, whose parent is the empty path (`read_dir("")` fails, and an extractor +/// that walked nothing would report an empty workspace as if it had measured one). +#[must_use] +pub fn repo_root(contract_dir: &Path) -> std::path::PathBuf { + match contract_dir.parent() { + Some(p) if !p.as_os_str().is_empty() => p.to_path_buf(), + _ => std::path::PathBuf::from("."), + } +} diff --git a/crates/aprender-contracts/src/ontology/mod.rs b/crates/aprender-contracts/src/ontology/mod.rs index c6a326eac5..4612f21de2 100644 --- a/crates/aprender-contracts/src/ontology/mod.rs +++ b/crates/aprender-contracts/src/ontology/mod.rs @@ -14,3 +14,4 @@ pub mod receipts; pub mod shapes; pub mod sigma; pub mod verdict; +pub mod w3c; diff --git a/crates/aprender-contracts/src/ontology/rdf.rs b/crates/aprender-contracts/src/ontology/rdf.rs index 5a7985b3ef..901dc93f06 100644 --- a/crates/aprender-contracts/src/ontology/rdf.rs +++ b/crates/aprender-contracts/src/ontology/rdf.rs @@ -153,21 +153,34 @@ impl Graph { .map(|t| t.subject.as_str()) .collect() } - /// Objects of ` ?o`, in byte order. + /// Objects of ` ?o`, in byte order. A range scan: `Triple`'s derived order is + /// (subject, predicate, object) and `Term::Iri("")` is the least term, so the block for one + /// (subject, predicate) is contiguous and starts at that bound — O(log n + k), not a pass over the graph + /// (the validator asks this once per property per focus node: 1 700 focus nodes over 15 000 triples). #[must_use] pub fn objects(&self, subject: &str, predicate: &str) -> Vec<&Term> { + let from = Triple { + subject: subject.to_string(), + predicate: predicate.to_string(), + object: Term::Iri(String::new()), + }; self.triples - .iter() - .filter(|t| t.subject == subject && t.predicate == predicate) + .range(from..) + .take_while(|t| t.subject == subject && t.predicate == predicate) .map(|t| &t.object) .collect() } - /// Every predicate used on `subject`, unique, in byte order. + /// Every predicate used on `subject`, unique, in byte order (the same range scan, over the subject). #[must_use] pub fn predicates_of(&self, subject: &str) -> BTreeSet<&str> { + let from = Triple { + subject: subject.to_string(), + predicate: String::new(), + object: Term::Iri(String::new()), + }; self.triples - .iter() - .filter(|t| t.subject == subject) + .range(from..) + .take_while(|t| t.subject == subject) .map(|t| t.predicate.as_str()) .collect() } diff --git a/crates/aprender-contracts/src/ontology/shapes.rs b/crates/aprender-contracts/src/ontology/shapes.rs index c10313826f..c39be1a455 100644 --- a/crates/aprender-contracts/src/ontology/shapes.rs +++ b/crates/aprender-contracts/src/ontology/shapes.rs @@ -26,7 +26,7 @@ //! focus node and the shape that fired, so a corpus violation is a line a person can act on. Severity is //! `Violation` unless the property shape says `severity: warning`. -use std::collections::BTreeSet; +use std::collections::{BTreeMap, BTreeSet}; use crate::ontology::rdf::{ont, Graph, Term, RDF_TYPE}; @@ -68,6 +68,39 @@ pub enum Severity { Violation, } +/// `xsd:string`, spelled once. +pub const XSD_STRING_IRI: &str = "http://www.w3.org/2001/XMLSchema#string"; + +/// One entry of a `sh:in` list, as a TERM: its lexical form and the datatype the YAML scalar gave it. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct InEntry { + pub lexical: String, + pub datatype: String, +} + +impl InEntry { + /// Does `value` (a literal's lexical form and datatype) equal this term? + #[must_use] + pub fn matches_literal(&self, value: &str, datatype: &str) -> bool { + self.lexical == value && self.datatype == datatype + } + /// Does `iri` equal this entry, taken as an IRI (prefixed or written in full)? + #[must_use] + pub fn matches_iri(&self, iri: &str) -> bool { + self.lexical == iri || expand(&self.lexical) == iri + } +} + +impl std::fmt::Display for InEntry { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + if self.datatype == XSD_STRING_IRI { + write!(f, "{:?}", self.lexical) + } else { + write!(f, "{:?}^^{}", self.lexical, short(&self.datatype)) + } + } +} + /// One `properties[]` entry: a single-predicate path and its constraints. #[derive(Debug, Clone)] pub struct PropertyShape { @@ -77,7 +110,7 @@ pub struct PropertyShape { pub datatype: Option, pub class: Option, pub node_kind: Option, - pub r#in: Option>, + pub r#in: Option>, pub pattern: Option<(String, regex::Regex)>, pub min_length: Option, pub max_length: Option, @@ -348,6 +381,12 @@ fn parse_property( shape, pm.get("nodeKind").and_then(serde_yaml::Value::as_str), )?; + // `sh:in` is TERM equality (SHACL §4.5.1), and a term carries its datatype. The YAML scalar's own type is + // what gives it one: `in: [true]` is `"true"^^xsd:boolean`, `in: [1]` is `xsd:integer`, `in: [a, b]` is + // `xsd:string`. This used to collapse every entry to its lexical form and compare strings, so a shape + // `in: ["true"]` accepted `"true"^^xsd:boolean` — which the pinned oracle refuses, and which `make oracle` + // caught on this row's own shapes (490 results of difference on the real corpus). An entry that expands to + // an IRI still matches an IRI value, because a `sh:in` over `nodeKind: IRI` is a list of IRIs. let r#in = match pm.get("in") { None => None, Some(v) => Some( @@ -355,10 +394,26 @@ fn parse_property( .ok_or_else(|| malformed("`in` is not a list".into()))? .iter() .map(|x| match x { - serde_yaml::Value::String(s) => s.clone(), - serde_yaml::Value::Number(n) => n.to_string(), - serde_yaml::Value::Bool(b) => b.to_string(), - _ => String::new(), + serde_yaml::Value::String(s) => InEntry { + lexical: s.clone(), + datatype: XSD_STRING_IRI.to_string(), + }, + serde_yaml::Value::Number(n) => InEntry { + lexical: n.to_string(), + datatype: if n.is_f64() { + format!("{XSD_NS}double") + } else { + format!("{XSD_NS}integer") + }, + }, + serde_yaml::Value::Bool(b) => InEntry { + lexical: b.to_string(), + datatype: format!("{XSD_NS}boolean"), + }, + _ => InEntry { + lexical: String::new(), + datatype: XSD_STRING_IRI.to_string(), + }, }) .collect(), ), @@ -440,13 +495,82 @@ fn parse_severity(shape: &str, v: Option<&str>) -> Result } } +/// `rdfs:subClassOf`. +pub const RDFS_SUBCLASS_OF: &str = "http://www.w3.org/2000/01/rdf-schema#subClassOf"; + +/// The SHACL instance relation: `node rdf:type T` for some `T` that is `class` or an `rdfs:subClassOf`-ancestor +/// of it (SHACL §2.1.1, the W3C `class-001` cases). A graph without `subClassOf` triples — every graph the +/// extractors emit today — reduces to a direct `rdf:type` test. +#[must_use] +pub fn is_instance(graph: &Graph, node: &str, class: &str) -> bool { + graph + .objects(node, RDF_TYPE) + .iter() + .filter_map(|t| t.as_iri()) + .any(|t| t == class || is_subclass_of(graph, t, class)) +} + +/// `sub rdfs:subClassOf* class`, cycle-safe. +fn is_subclass_of(graph: &Graph, sub: &str, class: &str) -> bool { + let mut seen: BTreeSet = BTreeSet::new(); + let mut stack = vec![sub.to_string()]; + while let Some(c) = stack.pop() { + if !seen.insert(c.clone()) { + continue; + } + for sup in graph.objects(&c, RDFS_SUBCLASS_OF) { + if let Some(s) = sup.as_iri() { + if s == class { + return true; + } + stack.push(s.to_string()); + } + } + } + false +} + +/// The focus nodes of a class: its instances under [`is_instance`] (subclass instances included), in byte order. +/// One pass: the classes at or below `class` (the inverse `subClassOf` closure), then every `rdf:type` triple +/// whose object is one of them. +#[must_use] +pub fn instances_closed(graph: &Graph, class: &str) -> Vec { + let mut subs: BTreeMap<&str, Vec<&str>> = BTreeMap::new(); + for t in graph.iter() { + if t.predicate == RDFS_SUBCLASS_OF { + if let Some(sup) = t.object.as_iri() { + subs.entry(sup).or_default().push(t.subject.as_str()); + } + } + } + let mut at_or_below: BTreeSet<&str> = BTreeSet::new(); + let mut stack = vec![class]; + while let Some(c) = stack.pop() { + if !at_or_below.insert(c) { + continue; + } + if let Some(children) = subs.get(c) { + stack.extend(children.iter().copied()); + } + } + let out: BTreeSet = graph + .iter() + .filter(|t| { + t.predicate == RDF_TYPE && t.object.as_iri().is_some_and(|o| at_or_below.contains(o)) + }) + .map(|t| t.subject.clone()) + .collect(); + out.into_iter().collect() +} + /// Validate `graph` against `shapes`. Focus nodes of a shape are the instances of its target class. #[must_use] pub fn validate(graph: &Graph, shapes: &[NodeShape]) -> Report { let mut report = Report::default(); let mut focus_seen: BTreeSet = BTreeSet::new(); for shape in shapes { - for focus in graph.instances_of(&shape.target_class) { + for focus in instances_closed(graph, &shape.target_class) { + let focus = focus.as_str(); focus_seen.insert(focus.to_string()); validate_focus(graph, shape, focus, &mut report.results); } @@ -549,14 +673,24 @@ fn check_value( if let Some(inner) = &p.node { match v.as_iri() { Some(i) => { + // One `sh:NodeConstraintComponent` result per VALUE that fails the nested shape, on the outer + // path, with the nested findings as its detail (SHACL §4.6.2; W3C property/node-001, -002). let mut nested = Vec::new(); validate_focus(graph, inner, i, &mut nested); - for r in nested { + let violations: Vec = nested + .iter() + .filter(|r| r.severity == Severity::Violation) + .map(|r| r.message.clone()) + .collect(); + if !violations.is_empty() { push( - r.severity, - r.path.as_deref(), + p.severity, + Some(&p.path), "node", - format!("value {i}: {}", r.message), + format!( + "value {i} fails the nested shape: {}", + violations.join("; ") + ), ); } } @@ -570,6 +704,68 @@ fn check_value( } } +/// Is `value` a well-formed lexical form of the XSD `datatype`? A literal typed `xsd:byte` with the lexical +/// form `300` (or `c`) is ill-formed and violates `sh:datatype` (SHACL §4.1.2; W3C `datatype-ill-formed`). The +/// types checked are the ones the corpus and the vendored cases use; any other datatype is taken as +/// well-formed, because refusing what is not understood would be a verdict about a value never measured. +#[must_use] +pub fn well_formed(value: &str, datatype: &str) -> bool { + let Some(local) = datatype.strip_prefix(XSD_NS) else { + return true; + }; + let int_in = |lo: i128, hi: i128| value.parse::().is_ok_and(|n| n >= lo && n <= hi); + match local { + "string" | "anyURI" => true, + "boolean" => matches!(value, "true" | "false" | "1" | "0"), + "integer" => value.parse::().is_ok(), + "long" => int_in(i128::from(i64::MIN), i128::from(i64::MAX)), + "int" => int_in(i128::from(i32::MIN), i128::from(i32::MAX)), + "short" => int_in(i128::from(i16::MIN), i128::from(i16::MAX)), + "byte" => int_in(i128::from(i8::MIN), i128::from(i8::MAX)), + "nonNegativeInteger" => int_in(0, i128::MAX), + "positiveInteger" => int_in(1, i128::MAX), + "nonPositiveInteger" => int_in(i128::MIN, 0), + "negativeInteger" => int_in(i128::MIN, -1), + "unsignedLong" => int_in(0, i128::from(u64::MAX)), + "unsignedInt" => int_in(0, i128::from(u32::MAX)), + "unsignedShort" => int_in(0, i128::from(u16::MAX)), + "unsignedByte" => int_in(0, i128::from(u8::MAX)), + "decimal" => { + !value.is_empty() + && value + .strip_prefix(['+', '-']) + .unwrap_or(value) + .chars() + .all(|c| c.is_ascii_digit() || c == '.') + && value.chars().filter(|c| *c == '.').count() <= 1 + && value.chars().any(|c| c.is_ascii_digit()) + } + "double" | "float" => { + matches!(value, "INF" | "-INF" | "NaN") || value.parse::().is_ok() + } + "date" => is_date(value), + "dateTime" => value + .split_once('T') + .is_some_and(|(d, t)| is_date(d) && t.len() >= 8 && t.as_bytes()[2] == b':'), + _ => true, + } +} + +/// `YYYY-MM-DD` with an optional timezone suffix. +fn is_date(s: &str) -> bool { + let core = s.split(['Z', '+']).next().unwrap_or(s); + let core = if core.len() > 10 { &core[..10] } else { core }; + let b = core.as_bytes(); + b.len() == 10 + && b[4] == b'-' + && b[7] == b'-' + && [0, 1, 2, 3, 5, 6, 8, 9] + .iter() + .all(|&i| b[i].is_ascii_digit()) + && (1..=12).contains(&core[5..7].parse::().unwrap_or(0)) + && (1..=31).contains(&core[8..10].parse::().unwrap_or(0)) +} + /// `nodeKind`, `datatype`, `class` — the constraints about what KIND of term the value is. fn check_kind_and_type( graph: &Graph, @@ -594,7 +790,13 @@ fn check_kind_and_type( } if let Some(dt) = &p.datatype { match v.as_literal() { - Some((_, actual)) if actual == dt => {} + Some((value, actual)) if actual == dt && well_formed(value, dt) => {} + Some((value, actual)) if actual == dt => push( + p.severity, + path, + "datatype", + format!("\"{value}\" is not a well-formed {}", short(dt)), + ), _ => push( p.severity, path, @@ -604,9 +806,7 @@ fn check_kind_and_type( } } if let Some(class) = &p.class { - let ok = v - .as_iri() - .is_some_and(|i| graph.instances_of(class).contains(&i)); + let ok = v.as_iri().is_some_and(|i| is_instance(graph, i, class)); if !ok { push( p.severity, @@ -630,16 +830,29 @@ fn check_lexical( Term::Literal { value, .. } => value.as_str(), }; if let Some(allowed) = &p.r#in { - let ok = allowed.iter().any(|a| a == lexical || expand(a) == lexical); + let ok = match v { + Term::Iri(i) => allowed.iter().any(|a| a.matches_iri(i)), + Term::Literal { value, datatype } => { + allowed.iter().any(|a| a.matches_literal(value, datatype)) + } + }; if !ok { // The PATH is in the message, not only in the result's `path` field: a reader who gets one line // ("quadratic is not one of …") cannot act on it without being told which property said it, and a // shape with nine properties produces nine indistinguishable lines (measured on apex's EV-21). + // The value and the list are TERMS (ONT-4b2: `sh:in` is term equality, so `"1"^^xsd:integer` and + // `"1"` are different entries), rendered as terms, not as bare lexical forms. + let listed: Vec = allowed.iter().map(ToString::to_string).collect(); push( p.severity, path, "in", - format!("{}: {lexical} is not one of {allowed:?}", short(&p.path)), + format!( + "{}: {} is not one of [{}]", + short(&p.path), + term_short(v), + listed.join(", ") + ), ); } } @@ -672,6 +885,18 @@ fn check_lexical( } } +/// A term as a message says it: `"ok"` for an xsd:string literal, `"300"^^xsd:byte` for any other typed one, +/// `ont:id` for an IRI. The datatype is shown only when it carries information — `sh:in` is term equality, so +/// a message that hid the datatype would name two different terms the same way. +#[must_use] +pub fn term_short(v: &Term) -> String { + match v { + Term::Iri(i) => short(i), + Term::Literal { value, datatype } if datatype == XSD_STRING_IRI => format!("{value:?}"), + Term::Literal { value, datatype } => format!("{value:?}^^{}", short(datatype)), + } +} + /// `` → `ont:id`, for messages. #[must_use] pub fn short(iri: &str) -> String { @@ -762,7 +987,18 @@ fn turtle_property(p: &PropertyShape) -> String { )); } if let Some(list) = &p.r#in { - let items: Vec = list.iter().map(|v| format!("\"{v}\"")).collect(); + // Typed, because `sh:in` is term equality: an untyped `"true"` is an xsd:string and would not match + // the xsd:boolean the extractor writes — the difference `make oracle` measures. + let items: Vec = list + .iter() + .map(|v| { + if v.datatype == XSD_STRING_IRI { + format!("\"{}\"", v.lexical) + } else { + format!("\"{}\"^^<{}>", v.lexical, v.datatype) + } + }) + .collect(); line(format!("sh:in ( {} )", items.join(" "))); } if let Some((src, _)) = &p.pattern { diff --git a/crates/aprender-contracts/src/ontology/w3c.rs b/crates/aprender-contracts/src/ontology/w3c.rs new file mode 100644 index 0000000000..f8127421a4 --- /dev/null +++ b/crates/aprender-contracts/src/ontology/w3c.rs @@ -0,0 +1,531 @@ +//! ONT-001 §3.6, §5 ONT-4b2 — the vendored W3C SHACL-Core cases, run by the shapes gate every time it runs. +//! +//! The originals live in `tests/oracle/w3c//.ttl` (w3c/data-shapes@gh-pages, +//! `data-shapes-test-suite/tests/core/`) for the out-of-gate oracle. The gate path has no Turtle reader (R-13, +//! §3.5), so each case runnable within the subset is **translated by hand** into `w3c/-.yaml` — +//! the shape in the contract dialect [`crate::ontology::shapes`] parses, the data as N-Triples with the case's +//! prefixes, the expected report as W3C states it — and embedded here at compile time. The translation is checked +//! by the oracle differential (`make oracle`): the same data and the exported shape through the pinned `shacl` +//! crate must agree with the expected report too, so a mistranslation is caught from the other side. +//! +//! Two translations are semantic, and each case that uses one says so in its `targeting:` line: (1) a +//! `sh:targetNode` set becomes a class — every target node is typed `#Focus` and the shape targets it, +//! which yields the same focus nodes; (2) a data blank node is skolemized to a named node under the case prefix, +//! which changes no result the case expects. What is NOT vendored is listed in [`NOT_VENDORED`], one line per +//! case with the component or form that puts it outside the subset — so the count reported is a count over the +//! cases the subset claims, and a case the validator refuses by design is never scored as a failure. +//! +//! A case fails when `conforms` or the multiset of `(focus, path, component)` differs from the expected report. +//! A failing case is a differential, not a corpus verdict: the gate declines `Unknown{Differential}` naming it. + +use std::collections::BTreeMap; + +use crate::ontology::rdf::{Graph, Term, XSD_BOOLEAN, XSD_INTEGER, XSD_STRING}; +use crate::ontology::shapes::{self, NodeShape, Severity, RDF_NS, XSD_NS}; + +/// The embedded translations: `(id, yaml)`. +pub const CASES: &[(&str, &str)] = &[ + ( + "property/class-001", + include_str!("../../w3c/property-class-001.yaml"), + ), + ( + "property/datatype-001", + include_str!("../../w3c/property-datatype-001.yaml"), + ), + ( + "property/datatype-002", + include_str!("../../w3c/property-datatype-002.yaml"), + ), + ( + "property/datatype-ill-formed", + include_str!("../../w3c/property-datatype-ill-formed.yaml"), + ), + ( + "property/minCount-001", + include_str!("../../w3c/property-minCount-001.yaml"), + ), + ( + "property/minCount-002", + include_str!("../../w3c/property-minCount-002.yaml"), + ), + ( + "property/maxCount-001", + include_str!("../../w3c/property-maxCount-001.yaml"), + ), + ( + "property/maxCount-002", + include_str!("../../w3c/property-maxCount-002.yaml"), + ), + ( + "property/in-001", + include_str!("../../w3c/property-in-001.yaml"), + ), + ( + "property/pattern-001", + include_str!("../../w3c/property-pattern-001.yaml"), + ), + ( + "property/minLength-001", + include_str!("../../w3c/property-minLength-001.yaml"), + ), + ( + "property/maxLength-001", + include_str!("../../w3c/property-maxLength-001.yaml"), + ), + ( + "property/node-001", + include_str!("../../w3c/property-node-001.yaml"), + ), + ( + "property/node-002", + include_str!("../../w3c/property-node-002.yaml"), + ), + ( + "node/closed-002", + include_str!("../../w3c/node-closed-002.yaml"), + ), + ( + "targets/targetClass-001", + include_str!("../../w3c/targets-targetClass-001.yaml"), + ), +]; + +/// The cases of ONT-0's table that the subset cannot run, each with the reason — measured at this row, not +/// guessed: ONT-0 counted 32 by component name; 16 of them use a FORM the subset does not attach. +pub const NOT_VENDORED: &[(&str, &str)] = &[ + ("node/class-001", "sh:class on the node shape itself; the subset attaches constraints to property shapes"), + ("node/class-002", "sh:class on the node shape itself"), + ("node/class-003", "sh:class on the node shape itself"), + ("node/datatype-001", "sh:datatype on the node shape itself"), + ("node/datatype-002", "sh:datatype on the node shape itself"), + ("node/in-001", "sh:in on the node shape itself"), + ("node/pattern-001", "sh:pattern on the node shape itself"), + ("node/pattern-002", "sh:pattern on the node shape itself"), + ("node/minLength-001", "sh:minLength on the node shape itself"), + ("node/maxLength-001", "sh:maxLength on the node shape itself"), + ("node/nodeKind-001", "sh:nodeKind on the node shape itself, with sh:BlankNode variants"), + ("node/node-001", "sh:node on the node shape itself"), + ("node/closed-001", "expects an rdf:type violation under sh:closed; the subset always admits rdf:type on a closed shape (every extracted node is typed, §3.6) — closed-002, with sh:ignoredProperties (rdf:type), is the vendored form"), + ("property/datatype-003", "sh:or — outside the subset, refused by name"), + ("property/nodeKind-001", "data blank nodes and sh:BlankNode / sh:IRIOrLiteral kinds — the graph has no blank node (R-15) and the subset knows IRI and Literal"), + ("property/pattern-002", "sh:flags — outside the subset, refused by name"), +]; + +/// One expected `sh:ValidationResult`, as the case states it (component as W3C's short name, lower camel). +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] +pub struct Expected { + pub focus: String, + pub path: Option, + pub component: String, +} + +/// The outcome of one case. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CaseResult { + pub id: String, + pub passed: bool, + /// What differed, when it did. + pub detail: String, +} + +/// The run over every embedded case. +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct W3cRun { + pub results: Vec, +} + +impl W3cRun { + #[must_use] + pub fn passed(&self) -> usize { + self.results.iter().filter(|r| r.passed).count() + } + #[must_use] + pub fn failed(&self) -> Vec { + self.results + .iter() + .filter(|r| !r.passed) + .map(|r| format!("{}: {}", r.id, r.detail)) + .collect() + } +} + +/// Why a case could not even be set up (a translation error, never a validator verdict). +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CaseError(pub String); + +impl std::fmt::Display for CaseError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(&self.0) + } +} + +/// A parsed case. +pub struct Case { + pub id: String, + pub prefix: String, + pub shapes: Vec, + pub graph: Graph, + pub conforms: bool, + pub expected: Vec, +} + +/// The fixed prefixes every case may use beside its own `ex:`. +fn fixed_prefix(p: &str) -> Option<&'static str> { + match p { + "rdf" => Some(RDF_NS), + "rdfs" => Some("http://www.w3.org/2000/01/rdf-schema#"), + "xsd" => Some(XSD_NS), + "owl" => Some("http://www.w3.org/2002/07/owl#"), + "sh" => Some("http://www.w3.org/ns/shacl#"), + _ => None, + } +} + +/// `ex:x` → `x`; `rdf:type` → its IRI; a full IRI as is; anything else unchanged. +fn expand_term(s: &str, prefix: &str) -> String { + if s.starts_with("http://") || s.starts_with("https://") { + return s.to_string(); + } + match s.split_once(':') { + Some(("ex", local)) => format!("{prefix}{local}"), + Some((p, local)) => { + fixed_prefix(p).map_or_else(|| s.to_string(), |ns| format!("{ns}{local}")) + } + None => s.to_string(), + } +} + +/// Expand `ex:` / `rdfs:` / `owl:` / `sh:` inside a shape document's string values, recursively, so the shape +/// parser (which knows `ont:`, `xsd:`, `rdf:`, `prov:`) sees full IRIs for the case's own terms. +fn expand_doc(v: &serde_yaml::Value, prefix: &str) -> serde_yaml::Value { + match v { + serde_yaml::Value::String(s) => { + let e = expand_term(s, prefix); + serde_yaml::Value::String(if e == *s && s.starts_with("xsd:") { + s.clone() + } else { + e + }) + } + serde_yaml::Value::Sequence(seq) => { + serde_yaml::Value::Sequence(seq.iter().map(|x| expand_doc(x, prefix)).collect()) + } + serde_yaml::Value::Mapping(m) => serde_yaml::Value::Mapping( + m.iter() + .map(|(k, x)| (k.clone(), expand_doc(x, prefix))) + .collect(), + ), + other => other.clone(), + } +} + +/// One N-Triples-shaped line with the case's prefixes: `

.` where a term is `ex:x`, `rdf:type`, a +/// full ``, `"literal"`, `"literal"^^xsd:t`, `"literal"@lang`, a bare integer, decimal or boolean. +fn parse_line(line: &str, prefix: &str) -> Result, CaseError> { + let t = line.trim(); + if t.is_empty() || t.starts_with('#') { + return Ok(None); + } + let body = t.strip_suffix('.').unwrap_or(t).trim(); + let mut it = body.splitn(3, char::is_whitespace); + let (Some(s), Some(p), Some(o)) = (it.next(), it.next(), it.next()) else { + return Err(CaseError(format!( + "data line has fewer than three terms: `{t}`" + ))); + }; + let subject = iri_term(s, prefix); + let predicate = iri_term(p, prefix); + let object = object_term(o.trim(), prefix)?; + Ok(Some((subject, predicate, object))) +} + +fn iri_term(s: &str, prefix: &str) -> String { + let s = s.trim(); + let s = s + .strip_prefix('<') + .and_then(|x| x.strip_suffix('>')) + .unwrap_or(s); + expand_term(s, prefix) +} + +fn object_term(o: &str, prefix: &str) -> Result { + if let Some(rest) = o.strip_prefix('"') { + let Some(end) = rest.rfind('"') else { + return Err(CaseError(format!("unterminated literal `{o}`"))); + }; + let value = rest[..end].to_string(); + let tail = &rest[end + 1..]; + let datatype = if let Some(dt) = tail.strip_prefix("^^") { + iri_term(dt, prefix) + } else if tail.starts_with('@') { + format!("{RDF_NS}langString") + } else { + XSD_STRING.to_string() + }; + return Ok(Term::Literal { value, datatype }); + } + if o == "true" || o == "false" { + return Ok(Term::Literal { + value: o.to_string(), + datatype: XSD_BOOLEAN.to_string(), + }); + } + if o.parse::().is_ok() { + return Ok(Term::Literal { + value: o.to_string(), + datatype: XSD_INTEGER.to_string(), + }); + } + if o.parse::().is_ok() && o.contains('.') { + return Ok(Term::Literal { + value: o.to_string(), + datatype: format!("{XSD_NS}decimal"), + }); + } + Ok(Term::iri(iri_term(o, prefix))) +} + +/// Parse one embedded case. +pub fn parse_case(id: &str, yaml: &str) -> Result { + let doc: serde_yaml::Value = + serde_yaml::from_str(yaml).map_err(|e| CaseError(format!("{id}: {e}")))?; + let prefix = doc + .get("prefix") + .and_then(serde_yaml::Value::as_str) + .ok_or_else(|| CaseError(format!("{id}: no `prefix`")))? + .to_string(); + let shapes_doc = doc + .get("shapes") + .ok_or_else(|| CaseError(format!("{id}: no `shapes`")))?; + let shapes_doc = expand_doc(shapes_doc, &prefix); + let mut wrapper = serde_yaml::Mapping::new(); + wrapper.insert("shapes".into(), shapes_doc); + let shapes = shapes::parse_shapes(id, &serde_yaml::Value::Mapping(wrapper)) + .map_err(|e| CaseError(format!("{id}: {e}")))?; + let data = doc + .get("data") + .and_then(serde_yaml::Value::as_str) + .ok_or_else(|| CaseError(format!("{id}: no `data`")))?; + let mut graph = Graph::new(); + for line in data.lines() { + if let Some((s, p, o)) = parse_line(line, &prefix)? { + graph.insert(s, p, o); + } + } + let expect = doc + .get("expect") + .ok_or_else(|| CaseError(format!("{id}: no `expect`")))?; + let conforms = expect + .get("conforms") + .and_then(serde_yaml::Value::as_bool) + .ok_or_else(|| CaseError(format!("{id}: `expect.conforms` is not a boolean")))?; + let mut expected = Vec::new(); + if let Some(list) = expect + .get("results") + .and_then(serde_yaml::Value::as_sequence) + { + for r in list { + let focus = r + .get("focus") + .and_then(serde_yaml::Value::as_str) + .unwrap_or_default(); + let path = r.get("path").and_then(serde_yaml::Value::as_str); + let component = r + .get("component") + .and_then(serde_yaml::Value::as_str) + .unwrap_or_default(); + expected.push(Expected { + focus: expand_term(focus, &prefix), + path: path.map(|p| expand_term(p, &prefix)), + component: component.to_string(), + }); + } + } + expected.sort(); + Ok(Case { + id: id.to_string(), + prefix, + shapes, + graph, + conforms, + expected, + }) +} + +/// Run one case through the in-house validator. +#[must_use] +pub fn run_case(case: &Case) -> CaseResult { + let report = shapes::validate(&case.graph, &case.shapes); + let mut got: Vec = report + .results + .iter() + .filter(|r| r.severity == Severity::Violation) + .map(|r| Expected { + focus: r.focus.clone(), + path: r.path.clone(), + component: r.component.to_string(), + }) + .collect(); + got.sort(); + let conforms = got.is_empty(); + if conforms != case.conforms { + return CaseResult { + id: case.id.clone(), + passed: false, + detail: format!( + "conforms {} (expected {}); got {}", + conforms, + case.conforms, + render(&got, &case.prefix) + ), + }; + } + if got != case.expected { + return CaseResult { + id: case.id.clone(), + passed: false, + detail: format!( + "results differ: got {} expected {}", + render(&got, &case.prefix), + render(&case.expected, &case.prefix) + ), + }; + } + CaseResult { + id: case.id.clone(), + passed: true, + detail: String::new(), + } +} + +fn render(list: &[Expected], prefix: &str) -> String { + let short = |s: &str| { + s.strip_prefix(prefix) + .map_or_else(|| s.to_string(), |l| format!("ex:{l}")) + }; + let items: Vec = list + .iter() + .map(|e| { + format!( + "({}, {}, {})", + short(&e.focus), + e.path.as_deref().map_or("-".to_string(), short), + e.component + ) + }) + .collect(); + format!("[{}]", items.join(" ")) +} + +/// Every embedded case. A case that does not parse is a failed case naming the translation error — a +/// vendored file that cannot be read must never count as passed. +#[must_use] +pub fn run_all() -> W3cRun { + let mut run = W3cRun::default(); + for (id, yaml) in CASES { + match parse_case(id, yaml) { + Ok(case) => run.results.push(run_case(&case)), + Err(e) => run.results.push(CaseResult { + id: (*id).to_string(), + passed: false, + detail: e.to_string(), + }), + } + } + run +} + +/// The per-component tally over the embedded cases, for the receipt. +#[must_use] +pub fn components_covered() -> BTreeMap { + let mut m = BTreeMap::new(); + for (id, _) in CASES { + let component = id + .rsplit('/') + .next() + .unwrap_or(id) + .split('-') + .next() + .unwrap_or(id) + .to_string(); + *m.entry(component).or_insert(0) += 1; + } + m +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn every_embedded_case_parses_and_passes() { + let run = run_all(); + assert_eq!(run.results.len(), CASES.len()); + assert_eq!(run.failed(), Vec::::new()); + assert_eq!(run.passed(), CASES.len()); + } + + #[test] + fn the_table_of_ont_0_is_accounted_for_case_by_case() { + assert_eq!( + CASES.len() + NOT_VENDORED.len(), + 32, + "ONT-0 enumerated 32 cases over the subset's components" + ); + let mut ids: Vec<&str> = CASES + .iter() + .map(|(id, _)| *id) + .chain(NOT_VENDORED.iter().map(|(id, _)| *id)) + .collect(); + ids.sort_unstable(); + ids.dedup(); + assert_eq!(ids.len(), 32, "no case is both vendored and excused"); + } + + #[test] + fn a_data_line_reads_every_term_form() { + let p = "http://x/#"; + let (s, pr, o) = parse_line("ex:a rdf:type ex:B .", p) + .expect("ok") + .expect("a triple"); + assert_eq!(s, "http://x/#a"); + assert_eq!(pr, format!("{RDF_NS}type")); + assert_eq!(o, Term::iri("http://x/#B")); + let (_, _, o) = parse_line("ex:a ex:p \"A\"@en .", p) + .expect("ok") + .expect("t"); + assert_eq!( + o.as_literal().map(|(_, d)| d), + Some(format!("{RDF_NS}langString").as_str()) + ); + let (_, _, o) = parse_line("ex:a ex:p 11.1 .", p).expect("ok").expect("t"); + assert_eq!( + o.as_literal(), + Some(("11.1", format!("{XSD_NS}decimal").as_str())) + ); + let (_, _, o) = parse_line("ex:a ex:p \"300\"^^xsd:byte .", p) + .expect("ok") + .expect("t"); + assert_eq!( + o.as_literal().map(|(_, d)| d), + Some(format!("{XSD_NS}byte").as_str()) + ); + assert!(parse_line("ex:a ex:p", p).is_err()); + assert!(parse_line("# comment", p).expect("ok").is_none()); + } + + #[test] + fn a_mistranslated_expectation_fails_the_case_and_names_the_difference() { + let (id, yaml) = CASES[0]; + let broken = yaml.replace("conforms: false", "conforms: true"); + let case = parse_case(id, &broken).expect("parses"); + let r = run_case(&case); + assert!(!r.passed); + assert!( + r.detail.contains("conforms false (expected true)"), + "{}", + r.detail + ); + } +} diff --git a/crates/aprender-contracts/src/proof_status.rs b/crates/aprender-contracts/src/proof_status.rs index 4b34080a5f..c4736793d6 100644 --- a/crates/aprender-contracts/src/proof_status.rs +++ b/crates/aprender-contracts/src/proof_status.rs @@ -394,7 +394,7 @@ fn insert_name_forms(names: &mut std::collections::HashSet, label: &str) } /// `relu_nonneg` → `ReluNonneg`. -fn camel_case(snake: &str) -> String { +pub(crate) fn camel_case(snake: &str) -> String { snake .split('_') .map(|s| { @@ -408,7 +408,7 @@ fn camel_case(snake: &str) -> String { } /// `ReluNonneg` → `Relu`: the leading word of a CamelCase name. -fn first_camel_word(camel: &str) -> String { +pub(crate) fn first_camel_word(camel: &str) -> String { camel .chars() .enumerate() diff --git a/crates/aprender-contracts/w3c/node-closed-002.yaml b/crates/aprender-contracts/w3c/node-closed-002.yaml new file mode 100644 index 0000000000..eb215ac846 --- /dev/null +++ b/crates/aprender-contracts/w3c/node-closed-002.yaml @@ -0,0 +1,23 @@ +# vendored: tests/core/node/closed-002.ttl +id: node/closed-002 +label: "Test of sh:closed at node shape 002" +prefix: "http://datashapes.org/sh/tests/core/node/closed-002.test#" +targeting: "sh:targetNode → rdf:type ex:Focus + targetClass (rdf:type is in sh:ignoredProperties, so the added typing is admitted by the case's own declaration)" +shapes: + - id: MyShape + targetClass: ex:Focus + closed: true + ignoredProperties: [rdf:type] + properties: + - {path: ex:someProperty} +data: | + ex:InvalidInstance1 rdf:type ex:Focus . + ex:ValidInstance1 rdf:type ex:Focus . + ex:InvalidInstance1 ex:otherProperty 4 . + ex:InvalidInstance1 ex:someProperty 3 . + ex:ValidInstance1 rdf:type ex:SomeClass . + ex:ValidInstance1 ex:someProperty 3 . +expect: + conforms: false + results: + - {focus: ex:InvalidInstance1, path: ex:otherProperty, component: closed} diff --git a/crates/aprender-contracts/w3c/property-class-001.yaml b/crates/aprender-contracts/w3c/property-class-001.yaml new file mode 100644 index 0000000000..46d18d2d4f --- /dev/null +++ b/crates/aprender-contracts/w3c/property-class-001.yaml @@ -0,0 +1,35 @@ +# vendored: w3c/data-shapes@gh-pages data-shapes-test-suite/tests/core/property/class-001.ttl (tests/oracle/w3c/property/class-001.ttl) +id: property/class-001 +label: "Test of sh:class at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/class-001.test#" +targeting: "sh:targetNode → rdf:type ex:Focus + targetClass; the two data blank nodes are skolemized as ex:ValidResource2-b1 / -b2" +shapes: + - id: TestShape + targetClass: ex:Focus + properties: + - {path: ex:testProperty, class: ex:SuperClass} +data: | + ex:InvalidResource1 rdf:type ex:Focus . + ex:ValidResource1 rdf:type ex:Focus . + ex:ValidResource2 rdf:type ex:Focus . + ex:InvalidResource1 rdf:type rdfs:Resource . + ex:InvalidResource1 ex:testProperty ex:InvalidResource1 . + ex:InvalidResource1 ex:testProperty "A string" . + ex:SubClass rdf:type rdfs:Class . + ex:SubClass rdfs:subClassOf ex:SuperClass . + ex:SubClassInstance rdf:type ex:SubClass . + ex:SuperClass rdf:type rdfs:Class . + ex:SuperClassInstance rdf:type ex:SuperClass . + ex:ValidResource1 rdf:type rdfs:Resource . + ex:ValidResource1 ex:testProperty ex:SubClassInstance . + ex:ValidResource1 ex:testProperty ex:SuperClassInstance . + ex:ValidResource2 rdf:type rdfs:Resource . + ex:ValidResource2 ex:testProperty ex:ValidResource2-b1 . + ex:ValidResource2-b1 rdf:type ex:SubClass . + ex:ValidResource2 ex:testProperty ex:ValidResource2-b2 . + ex:ValidResource2-b2 rdf:type ex:SuperClass . +expect: + conforms: false + results: + - {focus: ex:InvalidResource1, path: ex:testProperty, component: class} + - {focus: ex:InvalidResource1, path: ex:testProperty, component: class} diff --git a/crates/aprender-contracts/w3c/property-datatype-001.yaml b/crates/aprender-contracts/w3c/property-datatype-001.yaml new file mode 100644 index 0000000000..4f5d58a72e --- /dev/null +++ b/crates/aprender-contracts/w3c/property-datatype-001.yaml @@ -0,0 +1,23 @@ +# vendored: tests/core/property/datatype-001.ttl +id: property/datatype-001 +label: "Test of sh:datatype at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/datatype-001.test#" +targeting: "implicit class target (ex:TestShape is both rdfs:Class and sh:NodeShape) → targetClass ex:TestShape" +shapes: + - id: TestShape + targetClass: ex:TestShape + properties: + - {path: ex:dateProperty, datatype: xsd:date} + - {path: ex:integerProperty, datatype: xsd:integer} +data: | + ex:InvalidResource1 rdf:type ex:TestShape . + ex:InvalidResource1 ex:dateProperty "2011-01-01"^^xsd:dateTime . + ex:InvalidResource1 ex:integerProperty 11.1 . + ex:ValidResource1 rdf:type ex:TestShape . + ex:ValidResource1 ex:dateProperty "2011-01-01"^^xsd:date . + ex:ValidResource1 ex:integerProperty 11 . +expect: + conforms: false + results: + - {focus: ex:InvalidResource1, path: ex:dateProperty, component: datatype} + - {focus: ex:InvalidResource1, path: ex:integerProperty, component: datatype} diff --git a/crates/aprender-contracts/w3c/property-datatype-002.yaml b/crates/aprender-contracts/w3c/property-datatype-002.yaml new file mode 100644 index 0000000000..46a1224fe6 --- /dev/null +++ b/crates/aprender-contracts/w3c/property-datatype-002.yaml @@ -0,0 +1,24 @@ +# vendored: tests/core/property/datatype-002.ttl +id: property/datatype-002 +label: "Test of sh:datatype at property shape 002" +prefix: "http://datashapes.org/sh/tests/core/property/datatype-002.test#" +targeting: "sh:targetNode → rdf:type ex:Focus + targetClass" +shapes: + - id: TestShape + targetClass: ex:Focus + properties: + - {path: ex:value, datatype: xsd:string} +data: | + ex:InvalidInstance1 rdf:type ex:Focus . + ex:InvalidInstance2 rdf:type ex:Focus . + ex:ValidInstance1 rdf:type ex:Focus . + ex:ValidInstance2 rdf:type ex:Focus . + ex:InvalidInstance1 ex:value "A"@en . + ex:InvalidInstance2 ex:value 42 . + ex:ValidInstance1 ex:value "A" . + ex:ValidInstance2 ex:value "B"^^xsd:string . +expect: + conforms: false + results: + - {focus: ex:InvalidInstance1, path: ex:value, component: datatype} + - {focus: ex:InvalidInstance2, path: ex:value, component: datatype} diff --git a/crates/aprender-contracts/w3c/property-datatype-ill-formed.yaml b/crates/aprender-contracts/w3c/property-datatype-ill-formed.yaml new file mode 100644 index 0000000000..769ba5212f --- /dev/null +++ b/crates/aprender-contracts/w3c/property-datatype-ill-formed.yaml @@ -0,0 +1,21 @@ +# vendored: tests/core/property/datatype-ill-formed.ttl (+ -data.ttl, -shapes.ttl) +id: property/datatype-ill-formed +label: "Test of validation report for ill-formed literals" +prefix: "http://example.org/shacl-test/" +targeting: "a sh:PropertyShape with sh:targetNode ex:i → a node shape targeting ex:Focus with that one property" +shapes: + - id: s + targetClass: ex:Focus + properties: + - {path: ex:p, datatype: xsd:byte} +data: | + ex:i rdf:type ex:Focus . + ex:i ex:p "300"^^xsd:byte . + ex:i ex:p "55"^^xsd:integer . + ex:i ex:p "c"^^xsd:byte . +expect: + conforms: false + results: + - {focus: ex:i, path: ex:p, component: datatype} + - {focus: ex:i, path: ex:p, component: datatype} + - {focus: ex:i, path: ex:p, component: datatype} diff --git a/crates/aprender-contracts/w3c/property-in-001.yaml b/crates/aprender-contracts/w3c/property-in-001.yaml new file mode 100644 index 0000000000..27af97c1ce --- /dev/null +++ b/crates/aprender-contracts/w3c/property-in-001.yaml @@ -0,0 +1,22 @@ +# vendored: tests/core/property/in-001.ttl +id: property/in-001 +label: "Test of sh:in at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/in-001.test#" +targeting: "implicit class target (ex:ShapeClass is rdfs:Class and sh:NodeShape) → targetClass ex:ShapeClass" +shapes: + - id: ShapeClass + targetClass: ex:ShapeClass + properties: + - {path: ex:property, datatype: xsd:string, in: [A, B, C]} +data: | + ex:InvalidInstance1 rdf:type ex:ShapeClass . + ex:InvalidInstance1 ex:property "D" . + ex:ShapeClass rdf:type rdfs:Class . + ex:ValidInstance1 rdf:type ex:ShapeClass . + ex:ValidInstance1 ex:property "A" . + ex:ValidInstance1 ex:property "B" . + ex:ValidInstance1 ex:property "C" . +expect: + conforms: false + results: + - {focus: ex:InvalidInstance1, path: ex:property, component: in} diff --git a/crates/aprender-contracts/w3c/property-maxCount-001.yaml b/crates/aprender-contracts/w3c/property-maxCount-001.yaml new file mode 100644 index 0000000000..57959827aa --- /dev/null +++ b/crates/aprender-contracts/w3c/property-maxCount-001.yaml @@ -0,0 +1,22 @@ +# vendored: tests/core/property/maxCount-001.ttl +id: property/maxCount-001 +label: "Test of sh:maxCount at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/maxCount-001.test#" +targeting: "sh:targetClass ex:Person plus sh:targetNode ex:ValidResource (already a Person) → targetClass ex:Person" +shapes: + - id: PersonShape + targetClass: ex:Person + properties: + - {path: ex:firstName, datatype: xsd:string, maxCount: 1} +data: | + ex:InvalidPerson rdf:type ex:Person . + ex:InvalidPerson ex:firstName "George" . + ex:InvalidPerson ex:firstName "John" . + ex:Person rdf:type rdfs:Class . + ex:Person rdfs:subClassOf rdfs:Resource . + ex:ValidResource rdf:type ex:Person . + ex:ValidResource ex:firstName "John" . +expect: + conforms: false + results: + - {focus: ex:InvalidPerson, path: ex:firstName, component: maxCount} diff --git a/crates/aprender-contracts/w3c/property-maxCount-002.yaml b/crates/aprender-contracts/w3c/property-maxCount-002.yaml new file mode 100644 index 0000000000..aec2315c9e --- /dev/null +++ b/crates/aprender-contracts/w3c/property-maxCount-002.yaml @@ -0,0 +1,20 @@ +# vendored: tests/core/property/maxCount-002.ttl +id: property/maxCount-002 +label: "Test of sh:maxCount at property shape 002" +prefix: "http://datashapes.org/sh/tests/core/property/maxCount-002.test#" +targeting: "sh:targetNode → rdf:type ex:Focus + targetClass" +shapes: + - id: TestShape + targetClass: ex:Focus + properties: + - {path: owl:versionInfo, maxCount: 0} +data: | + ex:InvalidResource rdf:type ex:Focus . + ex:ValidResource rdf:type ex:Focus . + ex:InvalidResource rdf:type rdfs:Resource . + ex:InvalidResource owl:versionInfo "1.0" . + ex:ValidResource rdf:type rdfs:Resource . +expect: + conforms: false + results: + - {focus: ex:InvalidResource, path: owl:versionInfo, component: maxCount} diff --git a/crates/aprender-contracts/w3c/property-maxLength-001.yaml b/crates/aprender-contracts/w3c/property-maxLength-001.yaml new file mode 100644 index 0000000000..8fe3dedebe --- /dev/null +++ b/crates/aprender-contracts/w3c/property-maxLength-001.yaml @@ -0,0 +1,22 @@ +# vendored: tests/core/property/maxLength-001.ttl +id: property/maxLength-001 +label: "Test of sh:maxLength at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/maxLength-001.test#" +targeting: "implicit class target → targetClass ex:TestShape" +shapes: + - id: TestShape + targetClass: ex:TestShape + properties: + - {path: ex:testProperty, datatype: xsd:string, maxLength: 2} +data: | + ex:InvalidInstance1 rdf:type ex:TestShape . + ex:InvalidInstance1 ex:testProperty "ABC" . + ex:TestShape rdf:type rdfs:Class . + ex:ValidInstance1 rdf:type ex:TestShape . + ex:ValidInstance1 ex:testProperty "A" . + ex:ValidInstance1 ex:testProperty "AB" . + ex:ValidInstance2 rdf:type ex:TestShape . +expect: + conforms: false + results: + - {focus: ex:InvalidInstance1, path: ex:testProperty, component: maxLength} diff --git a/crates/aprender-contracts/w3c/property-minCount-001.yaml b/crates/aprender-contracts/w3c/property-minCount-001.yaml new file mode 100644 index 0000000000..9d61c8965c --- /dev/null +++ b/crates/aprender-contracts/w3c/property-minCount-001.yaml @@ -0,0 +1,20 @@ +# vendored: tests/core/property/minCount-001.ttl +id: property/minCount-001 +label: "Test of sh:minCount at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/minCount-001.test#" +targeting: "sh:targetClass ex:Person plus sh:targetNode ex:ValidResource (already a Person) → targetClass ex:Person" +shapes: + - id: PersonShape + targetClass: ex:Person + properties: + - {path: ex:firstName, datatype: xsd:string, minCount: 1} +data: | + ex:InvalidPerson rdf:type ex:Person . + ex:Person rdf:type rdfs:Class . + ex:Person rdfs:subClassOf rdfs:Resource . + ex:ValidResource rdf:type ex:Person . + ex:ValidResource ex:firstName "John" . +expect: + conforms: false + results: + - {focus: ex:InvalidPerson, path: ex:firstName, component: minCount} diff --git a/crates/aprender-contracts/w3c/property-minCount-002.yaml b/crates/aprender-contracts/w3c/property-minCount-002.yaml new file mode 100644 index 0000000000..aa9d7651b0 --- /dev/null +++ b/crates/aprender-contracts/w3c/property-minCount-002.yaml @@ -0,0 +1,16 @@ +# vendored: tests/core/property/minCount-002.ttl +id: property/minCount-002 +label: "Test of sh:minCount at property shape 002" +prefix: "http://datashapes.org/sh/tests/core/property/minCount-002.test#" +targeting: "sh:targetNode → rdf:type ex:Focus + targetClass; sh:name is not a constraint and is dropped" +shapes: + - id: TestShape + targetClass: ex:Focus + properties: + - {path: ex:property, minCount: 0} +data: | + ex:ValidResource1 rdf:type ex:Focus . + ex:ValidResource1 rdf:type rdfs:Resource . +expect: + conforms: true + results: [] diff --git a/crates/aprender-contracts/w3c/property-minLength-001.yaml b/crates/aprender-contracts/w3c/property-minLength-001.yaml new file mode 100644 index 0000000000..7cece4c9ff --- /dev/null +++ b/crates/aprender-contracts/w3c/property-minLength-001.yaml @@ -0,0 +1,22 @@ +# vendored: tests/core/property/minLength-001.ttl +id: property/minLength-001 +label: "Test of sh:minLength at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/minLength-001.test#" +targeting: "implicit class target → targetClass ex:TestShape" +shapes: + - id: TestShape + targetClass: ex:TestShape + properties: + - {path: ex:testProperty, datatype: xsd:string, minLength: 2} +data: | + ex:InvalidInstance1 rdf:type ex:TestShape . + ex:InvalidInstance1 ex:testProperty "A" . + ex:TestShape rdf:type rdfs:Class . + ex:ValidInstance1 rdf:type ex:TestShape . + ex:ValidInstance1 ex:testProperty "AB" . + ex:ValidInstance1 ex:testProperty "ABC" . + ex:ValidInstance2 rdf:type ex:TestShape . +expect: + conforms: false + results: + - {focus: ex:InvalidInstance1, path: ex:testProperty, component: minLength} diff --git a/crates/aprender-contracts/w3c/property-node-001.yaml b/crates/aprender-contracts/w3c/property-node-001.yaml new file mode 100644 index 0000000000..bf4aa91b5a --- /dev/null +++ b/crates/aprender-contracts/w3c/property-node-001.yaml @@ -0,0 +1,43 @@ +# vendored: tests/core/property/node-001.ttl +id: property/node-001 +label: "Test of sh:node at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/node-001.test#" +targeting: "two implicit class targets (ex:Issue, ex:Person); the anonymous sh:node shape is written inline; ex:Person's `ex:datatype` (a typo in the original, not sh:datatype) constrains nothing and is dropped" +shapes: + - id: Issue + targetClass: ex:Issue + properties: + - path: ex:assignedTo + class: ex:Person + node: + properties: + - {path: ex:email, minCount: 1, maxCount: 1} + - {path: ex:lastName, minCount: 1, maxCount: 1} + - {path: ex:submittedBy, class: ex:Person, minCount: 1} + - id: Person + targetClass: ex:Person + properties: + - {path: ex:email} + - {path: ex:firstName, datatype: xsd:string, minCount: 1, maxCount: 1} + - {path: ex:lastName, datatype: xsd:string} +data: | + ex:Anon rdf:type ex:Person . + ex:Anon ex:firstName "Anon" . + ex:Issue rdf:type rdfs:Class . + ex:Issue rdfs:subClassOf rdfs:Resource . + ex:Issue_1 rdf:type ex:Issue . + ex:Issue_1 ex:assignedTo ex:Anon . + ex:Issue_1 ex:submittedBy ex:Anon . + ex:Issue_2 rdf:type ex:Issue . + ex:Issue_2 ex:assignedTo ex:JohnDoeWithEmail . + ex:Issue_2 ex:submittedBy ex:Anon . + ex:JohnDoeWithEmail rdf:type ex:Person . + ex:JohnDoeWithEmail ex:email "john@doe.com" . + ex:JohnDoeWithEmail ex:firstName "John" . + ex:JohnDoeWithEmail ex:lastName "Doe" . + ex:Person rdf:type rdfs:Class . + ex:Person rdfs:subClassOf rdfs:Resource . +expect: + conforms: false + results: + - {focus: ex:Issue_1, path: ex:assignedTo, component: node} diff --git a/crates/aprender-contracts/w3c/property-node-002.yaml b/crates/aprender-contracts/w3c/property-node-002.yaml new file mode 100644 index 0000000000..08dfbdc9ef --- /dev/null +++ b/crates/aprender-contracts/w3c/property-node-002.yaml @@ -0,0 +1,26 @@ +# vendored: tests/core/property/node-002.ttl +id: property/node-002 +label: "Test of sh:node at property shape 002" +prefix: "http://datashapes.org/sh/tests/core/property/node-002.test#" +targeting: "sh:node ex:AddressShape names a shape; it is written inline (same properties); ex:AddressShape has no target of its own" +shapes: + - id: PersonShape + targetClass: ex:Person + properties: + - path: ex:address + minCount: 1 + node: + properties: + - {path: ex:postalCode, datatype: xsd:string, maxCount: 1} +data: | + ex:Bob rdf:type ex:Person . + ex:Bob ex:address ex:BobsAddress . + ex:BobsAddress ex:postalCode "1234" . + ex:Person rdf:type rdfs:Class . + ex:Reto rdf:type ex:Person . + ex:Reto ex:address ex:RetosAddress . + ex:RetosAddress ex:postalCode 5678 . +expect: + conforms: false + results: + - {focus: ex:Reto, path: ex:address, component: node} diff --git a/crates/aprender-contracts/w3c/property-pattern-001.yaml b/crates/aprender-contracts/w3c/property-pattern-001.yaml new file mode 100644 index 0000000000..f7f97f8f91 --- /dev/null +++ b/crates/aprender-contracts/w3c/property-pattern-001.yaml @@ -0,0 +1,24 @@ +# vendored: tests/core/property/pattern-001.ttl +id: property/pattern-001 +label: "Test of sh:pattern at property shape 001" +prefix: "http://datashapes.org/sh/tests/core/property/pattern-001.test#" +targeting: "implicit class target → targetClass ex:TestShape" +shapes: + - id: TestShape + targetClass: ex:TestShape + properties: + - {path: ex:property, datatype: xsd:string, pattern: "Joh"} +data: | + ex:InvalidInstance1 rdf:type ex:TestShape . + ex:InvalidInstance1 ex:property "Maria" . + ex:InvalidInstance2 rdf:type ex:TestShape . + ex:InvalidInstance2 ex:property "john" . + ex:TestShape rdf:type rdfs:Class . + ex:ValidInstance1 rdf:type ex:TestShape . + ex:ValidInstance1 ex:property "Hi Joh" . + ex:ValidInstance1 ex:property "John" . +expect: + conforms: false + results: + - {focus: ex:InvalidInstance1, path: ex:property, component: pattern} + - {focus: ex:InvalidInstance2, path: ex:property, component: pattern} diff --git a/crates/aprender-contracts/w3c/targets-targetClass-001.yaml b/crates/aprender-contracts/w3c/targets-targetClass-001.yaml new file mode 100644 index 0000000000..47ecc41225 --- /dev/null +++ b/crates/aprender-contracts/w3c/targets-targetClass-001.yaml @@ -0,0 +1,23 @@ +# vendored: tests/core/targets/targetClass-001.ttl +id: targets/targetClass-001 +label: "Test of sh:targetClass 001" +prefix: "http://datashapes.org/sh/tests/core/targets/targetClass-001.test#" +targeting: "sh:targetClass ex:MyClass as written; ex:ValidInstance2 carries no rdf:type and is no focus node" +shapes: + - id: MyShape + targetClass: ex:MyClass + properties: + - {path: ex:myProperty, maxCount: 1} +data: | + ex:InvalidInstance1 rdf:type ex:MyClass . + ex:InvalidInstance1 ex:myProperty "A" . + ex:InvalidInstance1 ex:myProperty "B" . + ex:MyClass rdf:type rdfs:Class . + ex:ValidInstance1 rdf:type ex:MyClass . + ex:ValidInstance1 ex:myProperty "A" . + ex:ValidInstance2 ex:myProperty "A" . + ex:ValidInstance2 ex:myProperty "B" . +expect: + conforms: false + results: + - {focus: ex:InvalidInstance1, path: ex:myProperty, component: maxCount} diff --git a/scripts/check_ont_ratchet.sh b/scripts/check_ont_ratchet.sh index d28cc49e5f..cc67e077f0 100755 --- a/scripts/check_ont_ratchet.sh +++ b/scripts/check_ont_ratchet.sh @@ -68,17 +68,36 @@ count_anchored() { { grep -rlE '^entity:' "$REPO_ROOT/contracts" --include='*.ya # ONT-4c1: a contract carries ONE `shape:` (id = its stem) or a `shapes:` list of named shapes; either anchors it. count_shaped() { { grep -rlE '^shapes?:' "$REPO_ROOT/contracts" --include='*.yaml' 2>/dev/null || true; } | wc -l | tr -d ' '; } -# Σ lives in crates/aprender-contracts/src/ontology/ (ONT decision 4). Absent -# directory is 0 registered, not an error — 0 is the honest reading. +# Σ IS THE REGISTRY, so Σ is what these two count (ONT-4b2, 2026-09-19). They used to grep the RUST for +# `EntityType::` and `impl Extractor` — two forms this codebase has never used: the entity types are Σ's +# `entity_types:` list and the extractors are free functions in `ontology/extract/`, declared in Σ's +# `extractors:` with `implemented:`. So both counters measured 0 while the baseline carried 1 and 1 from an +# older tree, and every `--write` since would have "ratcheted" a number nobody had measured. The names mean +# what Σ declares; that is now what they read. An absent Σ is 0 registered, not an error — 0 is the honest +# reading, and the rows in --self-test pin both directions. count_entity_types() { - local d="$REPO_ROOT/crates/aprender-contracts/src/ontology" - [ -d "$d" ] || { printf '0\n'; return 0; } - { grep -rhoE '^[[:space:]]*EntityType::[A-Za-z]+' "$d" 2>/dev/null || true; } | sort -u | wc -l | tr -d ' ' + local f="$REPO_ROOT/contracts/ontology.yaml" + [ -f "$f" ] || { printf '0\n'; return 0; } + { sed -n '/^entity_types:/,/^[a-z_]*:/p' "$f" | grep -cE '^[[:space:]]*-[[:space:]]*\{name:' || true; } | tr -d ' ' } count_extractors() { - local d="$REPO_ROOT/crates/aprender-contracts/src/ontology" - [ -d "$d" ] || { printf '0\n'; return 0; } - { grep -rlE 'impl[[:space:]]+Extractor' "$d" 2>/dev/null || true; } | wc -l | tr -d ' ' + local f="$REPO_ROOT/contracts/ontology.yaml" + [ -f "$f" ] || { printf '0\n'; return 0; } + { sed -n '/^extractors:/,/^[a-z_]*:/p' "$f" | grep -cE 'implemented:[[:space:]]*true' || true; } | tr -d ' ' +} + +# Keys under `ont` that OTHER gates own and this script does not measure: `formal_prose` (the sigma gate's +# prose-debt ratchet) and `legacy_unresolved_depends_on` (the relations gate's, PV-ONT-010). Both are read +# from this file by `lint/{sigma,relations}_gate.rs` and neither is computed here — so `--write` used to +# DELETE them, disarming two shrink-only ratchets in the act of updating a third. They ride through verbatim, +# the same rule `armed_gates` and `armed_shapes` already follow: what this script does not measure, it does +# not get to drop. +foreign_ont_keys() { # foreign_ont_keys FILE -> ` "k": v,` lines, in file order + [ -f "$1" ] || return 0 + local key + for key in formal_prose legacy_unresolved_depends_on; do + { grep -E "\"$key\"[[:space:]]*:" "$1" || true; } | head -1 | sed 's/^[[:space:]]*/ /; s/,\{0,1\}[[:space:]]*$/,/' + done } # ONT R-5, verbatim: "Only contracts that *should* be anchored (kernel-kind with @@ -196,6 +215,7 @@ ${shapes_line} "ont": { "contracts_anchored": $anchored, "contracts_shaped": $shaped, "unanchored_but_bindable": $bindable, +$(foreign_ont_keys "$BASELINE") "shapes_unarmed": $unarmed } } @@ -264,6 +284,25 @@ self_test() { for c in entity_types_registered extractors_implemented contracts_anchored contracts_shaped unanchored_but_bindable consumer_present; do grep -q "\"$c\"" "$t/m.json" && row "counter present: $c" ok ok || row "counter present: $c" missing ok done + # ONT-4b2: the two counters read Σ, and a key another gate owns survives --write. + printf 'schema: ont-sigma-v1\nentity_types:\n - {name: a, extractor: a, implemented: true}\n - {name: b, extractor: b, implemented: false}\nextractors:\n - {name: a, reader: x.rs, implemented: true}\n - {name: b, reader: y.rs, implemented: false}\nreaders:\n concepts: x\n' > "$t/sigma.yaml" + mkdir -p "$t/repo/contracts" + cp "$t/sigma.yaml" "$t/repo/contracts/ontology.yaml" + row "entity types counted from Σ, not from a Rust form nobody writes" "$(REPO_ROOT="$t/repo" count_entity_types)" 2 + row "extractors counted from Σ's implemented: true" "$(REPO_ROOT="$t/repo" count_extractors)" 1 + printf '{\n "armed_gates": ["validate"],\n "ont": {\n "formal_prose": 1464,\n "legacy_unresolved_depends_on": 8\n }\n}\n' > "$t/foreign.json" + BASELINE="$t/foreign.json" measure > "$t/f.json" + row "measure() keeps formal_prose (the sigma gate reads it)" "$(grep -c '"formal_prose": 1464' "$t/f.json")" 1 + row "measure() keeps legacy_unresolved_depends_on (the relations gate reads it)" "$(grep -c '"legacy_unresolved_depends_on": 8' "$t/f.json")" 1 + cp "$t/foreign.json" "$t/fw.json" + set +e + BASELINE="$t/fw.json" main --write >/dev/null 2>&1 + set -e + row "--write keeps both foreign keys in place" "$(grep -cE '"formal_prose"|"legacy_unresolved_depends_on"' "$t/fw.json")" 2 + if command -v python3 >/dev/null 2>&1; then + python3 -c "import json,sys;json.load(open('$t/f.json'))" >/dev/null 2>&1 \ + && row "measure() with foreign keys is valid JSON" ok ok || row "measure() with foreign keys is valid JSON" bad ok + fi # THE DECIDING ROW: with no consumer, a rise in contracts_anchored is refused. printf '{"ont":{"consumer_present": false,"contracts_anchored": 0}}\n' > "$t/base.json" local rc diff --git a/tests/fixtures/ont/code-bound/Cargo.toml b/tests/fixtures/ont/code-bound/Cargo.toml new file mode 100644 index 0000000000..9a917fd0f0 --- /dev/null +++ b/tests/fixtures/ont/code-bound/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["crates/kern"] diff --git a/tests/fixtures/ont/code-bound/contracts/binding.yaml b/tests/fixtures/ont/code-bound/contracts/binding.yaml new file mode 100644 index 0000000000..ac5dacdc27 --- /dev/null +++ b/tests/fixtures/ont/code-bound/contracts/binding.yaml @@ -0,0 +1,33 @@ +version: 1.0.0 +target_crate: kern +bindings: +- contract: softmax-kernel-v1.yaml + equation: softmax + module_path: kern::nn::functional::softmax + function: softmax + status: implemented +- contract: softmax-kernel-v1.yaml + equation: relu + module_path: kern::nn::functional + function: relu + status: implemented +- contract: softmax-kernel-v1.yaml + equation: forward + module_path: kern::nn + function: forward + status: implemented +- contract: softmax-kernel-v1.yaml + equation: helper + module_path: kern + function: helper + status: implemented +- contract: softmax-kernel-v1.yaml + equation: ghost + module_path: kern::nn::functional + function: no_such_function + status: implemented +- contract: softmax-kernel-v1.yaml + equation: rmsnorm + module_path: kern::nn::functional + function: gated_rmsnorm + status: implemented diff --git a/tests/fixtures/ont/code-bound/contracts/lint-baseline.json b/tests/fixtures/ont/code-bound/contracts/lint-baseline.json new file mode 100644 index 0000000000..37b0890ce6 --- /dev/null +++ b/tests/fixtures/ont/code-bound/contracts/lint-baseline.json @@ -0,0 +1,5 @@ +{ + "armed_gates": ["validate"], + "armed_shapes": ["fixture-contract-id"], + "ont": {} +} diff --git a/tests/fixtures/ont/code-bound/contracts/ont-code-shape-v1.yaml b/tests/fixtures/ont/code-bound/contracts/ont-code-shape-v1.yaml new file mode 100644 index 0000000000..645a702ada --- /dev/null +++ b/tests/fixtures/ont/code-bound/contracts/ont-code-shape-v1.yaml @@ -0,0 +1,23 @@ +# The fixture pair (code-bound / code-ghost) shows ARMING, not two validators: both carry +# `bound-symbols-resolve` over the same ghost binding. Here it is UNARMED — computed, reported under +# not_armed_shapes, counted in unarmed_violations, and NOT in the verdict — which is how ONT-4b2 ships it. +# In code-ghost the same shape is armed and the same ghost is a Fail. +name: ont-code-shape +version: "1.0.0" +status: active +metadata: + version: "1.0.0" + kind: pattern + created: '2026-09-19' + last_modified: '2026-09-19' + author: fixture + description: the reported form of bound-symbols-resolve, beside an armed contract shape the plant can fire on +shapes: + - id: fixture-contract-id + targetClass: ont:Contract + properties: + - {path: ont:id, minCount: 1, maxCount: 1} + - id: bound-symbols-resolve + targetClass: ont:Symbol + properties: + - {path: sym:resolved, minCount: 1, maxCount: 1, in: [true]} diff --git a/tests/fixtures/ont/code-bound/contracts/ontology.yaml b/tests/fixtures/ont/code-bound/contracts/ontology.yaml new file mode 100644 index 0000000000..680cb8bde7 --- /dev/null +++ b/tests/fixtures/ont/code-bound/contracts/ontology.yaml @@ -0,0 +1,7 @@ +version: 1 +concepts: + - {name: Contract, doc: a contract} + - {name: Symbol, doc: a Rust symbol} +extractors: + - {name: pv_contract, reader: ontology/extract/pv_contract.rs, implemented: true} + - {name: code, reader: ontology/extract/code.rs, implemented: true} diff --git a/tests/fixtures/ont/code-bound/contracts/softmax-kernel-v1.yaml b/tests/fixtures/ont/code-bound/contracts/softmax-kernel-v1.yaml new file mode 100644 index 0000000000..9607d69cd3 --- /dev/null +++ b/tests/fixtures/ont/code-bound/contracts/softmax-kernel-v1.yaml @@ -0,0 +1,25 @@ +name: softmax-kernel +version: "1.0.0" +status: active +metadata: + kind: kernel + version: "1.0.0" + created: '2026-09-19' + last_modified: '2026-09-19' + author: fixture + description: a bound kernel contract +equations: + softmax: + formula: "softmax(x)_i = exp(x_i) / Σ exp(x_j)" + domain: "finite x" + codomain: "a distribution" + lean_theorem: Theorems.Softmax +invariants: + - id: SM-INV-001 + property: sums to one + formal: 'Σ softmax(x) = 1' + prose: false +falsification_tests: + - id: FALSIFY-SM-001 + description: the sum is one + pass_criteria: "1 test" diff --git a/tests/fixtures/ont/code-bound/crates/kern/Cargo.toml b/tests/fixtures/ont/code-bound/crates/kern/Cargo.toml new file mode 100644 index 0000000000..ef01f18024 --- /dev/null +++ b/tests/fixtures/ont/code-bound/crates/kern/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "kern-crate" +version = "0.0.0" +edition = "2021" + +[lib] +name = "kern" +path = "src/lib.rs" diff --git a/tests/fixtures/ont/code-bound/crates/kern/src/lib.rs b/tests/fixtures/ont/code-bound/crates/kern/src/lib.rs new file mode 100644 index 0000000000..8b7b289ba4 --- /dev/null +++ b/tests/fixtures/ont/code-bound/crates/kern/src/lib.rs @@ -0,0 +1,6 @@ +//! A fixture crate: two modules, one inline, one re-export. +pub mod nn; +mod hidden { + pub fn private_helper() {} +} +pub use hidden::private_helper as helper; diff --git a/tests/fixtures/ont/code-bound/crates/kern/src/nn.rs b/tests/fixtures/ont/code-bound/crates/kern/src/nn.rs new file mode 100644 index 0000000000..4e47e0e7d8 --- /dev/null +++ b/tests/fixtures/ont/code-bound/crates/kern/src/nn.rs @@ -0,0 +1,5 @@ +pub mod functional; +pub struct Layer; +impl Layer { + pub fn forward(&self) {} +} diff --git a/tests/fixtures/ont/code-bound/crates/kern/src/nn/functional.rs b/tests/fixtures/ont/code-bound/crates/kern/src/nn/functional.rs new file mode 100644 index 0000000000..6a685eca06 --- /dev/null +++ b/tests/fixtures/ont/code-bound/crates/kern/src/nn/functional.rs @@ -0,0 +1,5 @@ +#[inline] +pub fn softmax(x: &[f32]) -> Vec { x.to_vec() } +pub(crate) fn relu(x: f32) -> f32 { x.max(0.0) } +#[kernel] +pub fn gated_rmsnorm(x: &[f32]) -> Vec { x.to_vec() } diff --git a/tests/fixtures/ont/code-ghost/Cargo.toml b/tests/fixtures/ont/code-ghost/Cargo.toml new file mode 100644 index 0000000000..9a917fd0f0 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["crates/kern"] diff --git a/tests/fixtures/ont/code-ghost/contracts/binding.yaml b/tests/fixtures/ont/code-ghost/contracts/binding.yaml new file mode 100644 index 0000000000..4aa2148742 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/contracts/binding.yaml @@ -0,0 +1,13 @@ +version: 1.0.0 +target_crate: kern +bindings: +- contract: softmax-kernel-v1.yaml + equation: softmax + module_path: kern::nn::functional + function: softmax + status: implemented +- contract: softmax-kernel-v1.yaml + equation: ghost + module_path: kern::nn::functional + function: no_such_function + status: implemented diff --git a/tests/fixtures/ont/code-ghost/contracts/lint-baseline.json b/tests/fixtures/ont/code-ghost/contracts/lint-baseline.json new file mode 100644 index 0000000000..f328787878 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/contracts/lint-baseline.json @@ -0,0 +1,5 @@ +{ + "armed_gates": ["validate"], + "armed_shapes": ["bound-symbols-resolve"], + "ont": {} +} diff --git a/tests/fixtures/ont/code-ghost/contracts/ont-code-shape-v1.yaml b/tests/fixtures/ont/code-ghost/contracts/ont-code-shape-v1.yaml new file mode 100644 index 0000000000..a314e309cd --- /dev/null +++ b/tests/fixtures/ont/code-ghost/contracts/ont-code-shape-v1.yaml @@ -0,0 +1,17 @@ +# A fixture: the same shape ONT-4b2 ships, ARMED here (the fixture's own baseline lists it), so a ghost +# binding is a corpus FAIL naming the symbol — the arming the real corpus does not have yet. +name: ont-code-shape +version: "1.0.0" +status: active +metadata: + version: "1.0.0" + kind: pattern + created: '2026-09-19' + last_modified: '2026-09-19' + author: fixture + description: the armed form of bound-symbols-resolve +shapes: + - id: bound-symbols-resolve + targetClass: ont:Symbol + properties: + - {path: sym:resolved, minCount: 1, maxCount: 1, in: [true]} diff --git a/tests/fixtures/ont/code-ghost/contracts/ontology.yaml b/tests/fixtures/ont/code-ghost/contracts/ontology.yaml new file mode 100644 index 0000000000..680cb8bde7 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/contracts/ontology.yaml @@ -0,0 +1,7 @@ +version: 1 +concepts: + - {name: Contract, doc: a contract} + - {name: Symbol, doc: a Rust symbol} +extractors: + - {name: pv_contract, reader: ontology/extract/pv_contract.rs, implemented: true} + - {name: code, reader: ontology/extract/code.rs, implemented: true} diff --git a/tests/fixtures/ont/code-ghost/contracts/softmax-kernel-v1.yaml b/tests/fixtures/ont/code-ghost/contracts/softmax-kernel-v1.yaml new file mode 100644 index 0000000000..9607d69cd3 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/contracts/softmax-kernel-v1.yaml @@ -0,0 +1,25 @@ +name: softmax-kernel +version: "1.0.0" +status: active +metadata: + kind: kernel + version: "1.0.0" + created: '2026-09-19' + last_modified: '2026-09-19' + author: fixture + description: a bound kernel contract +equations: + softmax: + formula: "softmax(x)_i = exp(x_i) / Σ exp(x_j)" + domain: "finite x" + codomain: "a distribution" + lean_theorem: Theorems.Softmax +invariants: + - id: SM-INV-001 + property: sums to one + formal: 'Σ softmax(x) = 1' + prose: false +falsification_tests: + - id: FALSIFY-SM-001 + description: the sum is one + pass_criteria: "1 test" diff --git a/tests/fixtures/ont/code-ghost/crates/kern/Cargo.toml b/tests/fixtures/ont/code-ghost/crates/kern/Cargo.toml new file mode 100644 index 0000000000..ef01f18024 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/crates/kern/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "kern-crate" +version = "0.0.0" +edition = "2021" + +[lib] +name = "kern" +path = "src/lib.rs" diff --git a/tests/fixtures/ont/code-ghost/crates/kern/src/lib.rs b/tests/fixtures/ont/code-ghost/crates/kern/src/lib.rs new file mode 100644 index 0000000000..8b7b289ba4 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/crates/kern/src/lib.rs @@ -0,0 +1,6 @@ +//! A fixture crate: two modules, one inline, one re-export. +pub mod nn; +mod hidden { + pub fn private_helper() {} +} +pub use hidden::private_helper as helper; diff --git a/tests/fixtures/ont/code-ghost/crates/kern/src/nn.rs b/tests/fixtures/ont/code-ghost/crates/kern/src/nn.rs new file mode 100644 index 0000000000..4e47e0e7d8 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/crates/kern/src/nn.rs @@ -0,0 +1,5 @@ +pub mod functional; +pub struct Layer; +impl Layer { + pub fn forward(&self) {} +} diff --git a/tests/fixtures/ont/code-ghost/crates/kern/src/nn/functional.rs b/tests/fixtures/ont/code-ghost/crates/kern/src/nn/functional.rs new file mode 100644 index 0000000000..6a685eca06 --- /dev/null +++ b/tests/fixtures/ont/code-ghost/crates/kern/src/nn/functional.rs @@ -0,0 +1,5 @@ +#[inline] +pub fn softmax(x: &[f32]) -> Vec { x.to_vec() } +pub(crate) fn relu(x: f32) -> f32 { x.max(0.0) } +#[kernel] +pub fn gated_rmsnorm(x: &[f32]) -> Vec { x.to_vec() } diff --git a/tests/fixtures/ont/lean-sorry/contracts/lint-baseline.json b/tests/fixtures/ont/lean-sorry/contracts/lint-baseline.json new file mode 100644 index 0000000000..e6c777d569 --- /dev/null +++ b/tests/fixtures/ont/lean-sorry/contracts/lint-baseline.json @@ -0,0 +1,5 @@ +{ + "armed_gates": ["validate"], + "armed_shapes": ["fixture-contract-id", "lean-statements-grounded"], + "ont": {} +} diff --git a/tests/fixtures/ont/lean-sorry/contracts/ontology.yaml b/tests/fixtures/ont/lean-sorry/contracts/ontology.yaml new file mode 100644 index 0000000000..0e4ee82679 --- /dev/null +++ b/tests/fixtures/ont/lean-sorry/contracts/ontology.yaml @@ -0,0 +1,12 @@ +schema: ont-sigma-v1 +concepts: + Contract: {doc: a contract} + Statement: {doc: a Lean theorem} +entity_types: + - {name: code, extractor: lean, implemented: true} +extractors: + - {name: lean, reader: ontology/extract/lean.rs, implemented: true} +readers: + concepts: ontology/sigma.rs + entity_types: lint/shapes_gate.rs + extractors: lint/shapes_gate.rs diff --git a/tests/fixtures/ont/lean-sorry/contracts/softmax-kernel-v1.yaml b/tests/fixtures/ont/lean-sorry/contracts/softmax-kernel-v1.yaml new file mode 100644 index 0000000000..5553ba71f2 --- /dev/null +++ b/tests/fixtures/ont/lean-sorry/contracts/softmax-kernel-v1.yaml @@ -0,0 +1,29 @@ +name: softmax-kernel +version: "1.0.0" +status: active +metadata: + version: "1.0.0" + kind: kernel + created: '2026-09-19' + last_modified: '2026-09-19' + author: fixture + description: two theorems, one admitted +equations: + softmax: + formula: "softmax(x) sums to one" + lean_theorem: Theorems.SoftmaxSumsToOne + relu: + formula: "relu is non-negative" + lean_theorem: Theorems.ReluNonneg + ghost: + formula: "a theorem the tree does not carry" + lean_theorem: Theorems.NothingOfTheSort +shapes: + - id: fixture-contract-id + targetClass: ont:Contract + properties: + - {path: ont:id, minCount: 1, maxCount: 1} + - id: lean-statements-grounded + targetClass: ont:Statement + properties: + - {path: lean:sorryFree, minCount: 1, maxCount: 1, in: [true]} diff --git a/tests/fixtures/ont/lean-sorry/lean/ProvableContracts/Theorems/Relu/Core.lean b/tests/fixtures/ont/lean-sorry/lean/ProvableContracts/Theorems/Relu/Core.lean new file mode 100644 index 0000000000..15878869d7 --- /dev/null +++ b/tests/fixtures/ont/lean-sorry/lean/ProvableContracts/Theorems/Relu/Core.lean @@ -0,0 +1,5 @@ +namespace ProvableContracts.Theorems.Relu + +theorem relu_nonneg : True := trivial + +end ProvableContracts.Theorems.Relu diff --git a/tests/fixtures/ont/lean-sorry/lean/ProvableContracts/Theorems/Softmax/Core.lean b/tests/fixtures/ont/lean-sorry/lean/ProvableContracts/Theorems/Softmax/Core.lean new file mode 100644 index 0000000000..2046d04e45 --- /dev/null +++ b/tests/fixtures/ont/lean-sorry/lean/ProvableContracts/Theorems/Softmax/Core.lean @@ -0,0 +1,6 @@ +namespace ProvableContracts.Theorems.Softmax + +theorem softmax_sums_to_one : True := by + sorry + +end ProvableContracts.Theorems.Softmax diff --git a/tests/oracle/Cargo.lock b/tests/oracle/Cargo.lock new file mode 100644 index 0000000000..f90c6818eb --- /dev/null +++ b/tests/oracle/Cargo.lock @@ -0,0 +1,2914 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "ansi-str" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "060de1453b69f46304b28274f382132f4e72c55637cf362920926a70d090890d" +dependencies = [ + "ansitok", +] + +[[package]] +name = "ansitok" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0a8acea8c2f1c60f0a92a8cd26bf96ca97db56f10bbcab238bbe0cceba659ee" +dependencies = [ + "nom", + "vte", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "borsh" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "553c5d846a6ba5150c65e3b1b8ec073bcf1abc20f9b7220de384a4443ea4e20a" +dependencies = [ + "borsh-derive", + "bytes", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cdfe656708a01f89b451a7d36466e6fe6c414de0aa18fc54f864f6f9ca9f56" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "cc" +version = "1.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54413ede23c2daf518f35156dfde027feb2374004d63bd497f983c8db9c0e313" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.1", +] + +[[package]] +name = "colored" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "combine" +version = "4.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + +[[package]] +name = "const_format" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "csv" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde_core", +] + +[[package]] +name = "csv-core" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" +dependencies = [ + "memchr", +] + +[[package]] +name = "dashmap" +version = "6.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6361d5c062261c78a176addb82d4c821ae42bed6089de0e12603cd25de2059c" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "either" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" +dependencies = [ + "serde", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "find-msvc-tools" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25905e51abafe4dcea6c15fec58c57b601cdbd0ee53d22ea1d3016c587d39b" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 5.3.0", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b501faa50e7a26c3d3560ca625132f4078a17771f4810baf70475ae48cbe43" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "indoc" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" +dependencies = [ + "rustversion", +] + +[[package]] +name = "ipnet" +version = "2.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "js-sys" +version = "0.3.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "json-event-parser" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "574b0cd5e90ee2ba03a66d0611fc9a09c9a0c28b2ecc2dc8a181dd31a53ca5d7" + +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libredox" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6480ccc157a1389bb2e4891b24751b0f798ba640d22386f23143fbcc89da195a" +dependencies = [ + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "lru-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" + +[[package]] +name = "md-5" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "mio" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b18443e9c262bfe8fa82f51666e2642c53393f7e5c27b3e1aeab922cff5b9d8" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "ont-oracle" +version = "0.0.0" +dependencies = [ + "rudof_rdf", + "serde_json", + "serde_yaml", + "shacl", +] + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "oxhttp" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d4ba13b109f473f649aa71dfc8a83c41cc0cd3eaf5f6adfe2a18046b985d8a" +dependencies = [ + "http", + "httparse", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "url", +] + +[[package]] +name = "oxigraph" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6632dd080bd07676f06e70254ff5862c9943e9483d700fa7258df73a3f9a6a" +dependencies = [ + "dashmap", + "getrandom 0.3.4", + "libc", + "oxhttp", + "oxiri 0.2.11", + "oxrdf", + "oxrdfio", + "oxsdatatypes", + "rand 0.9.5", + "rustc-hash", + "siphasher", + "sparesults", + "spareval", + "spargebra", + "thiserror", +] + +[[package]] +name = "oxilangtag" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d3b4eb570abd4a1dcb062c31fd37b832264d9dc7292c3e69acfe926c87b063f" +dependencies = [ + "serde", +] + +[[package]] +name = "oxiri" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4ed3a7192fa19f5f48f99871f2755047fabefd7f222f12a1df1773796a102" + +[[package]] +name = "oxiri" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6bd0ef560f078e41ce2ebf370cce217e7fb2c3695ffa87541151c9de94e83a" +dependencies = [ + "memchr", +] + +[[package]] +name = "oxjsonld" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86a3e89e005662e60327027f45ec7cefd0472404e01831b5d83a3ac522cfabe0" +dependencies = [ + "json-event-parser", + "oxiri 0.2.11", + "oxrdf", + "ryu-js", + "thiserror", +] + +[[package]] +name = "oxrdf" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be15186205eb60ddbdc2fb47cb25df472c7f399bbe119b68c0972b6b6dd46ea" +dependencies = [ + "hex", + "oxilangtag", + "oxiri 0.2.11", + "oxsdatatypes", + "rand 0.9.5", + "sha2", + "thiserror", +] + +[[package]] +name = "oxrdfio" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b3fe3bb34179c376ab04f2a1b32616b0babab574b3b7eef64d587e60d5e1db" +dependencies = [ + "oxjsonld", + "oxrdf", + "oxrdfxml", + "oxttl", + "thiserror", +] + +[[package]] +name = "oxrdfxml" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71853d12051879f3e424c6864e978f5f5cbecd8e86a9817adbccaefccac9d61d" +dependencies = [ + "oxilangtag", + "oxiri 0.2.11", + "oxrdf", + "quick-xml", + "thiserror", +] + +[[package]] +name = "oxsdatatypes" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17c2ae62ac34fda465f6331105906c0e17b4e088dac3249e1f229b962062503" +dependencies = [ + "thiserror", +] + +[[package]] +name = "oxttl" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d0fe19fa62a6a102f85b052bbd86e3cdc3360cd6a338d01bab1a6743bf1d8e" +dependencies = [ + "memchr", + "oxilangtag", + "oxiri 0.2.11", + "oxrdf", + "thiserror", +] + +[[package]] +name = "papergrid" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6978128c8b51d8f4080631ceb2302ab51e32cc6e8615f735ee2f83fd269ae3f1" +dependencies = [ + "ansi-str", + "ansitok", + "bytecount", + "fnv", + "unicode-width", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "peg" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aad070be5b63aa72103f2fcdd70a83adbd5e90112ce5b574171ff1c65501773" +dependencies = [ + "peg-macros", + "peg-runtime", +] + +[[package]] +name = "peg-macros" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd8ef6825cae95355031ae26a99b616a2a21f22ba2de0197c43dfb05acbe7ee" +dependencies = [ + "peg-runtime", + "proc-macro2", + "quote", +] + +[[package]] +name = "peg-runtime" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7011d97b484a5ebdc4b1fdb3b12d5e4bbbea56e9d22b688f2e79e04b65a7d8a6" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "petgraph" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset", + "hashbrown 0.15.5", + "indexmap", + "serde", + "serde_derive", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prefixmap" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58cec0c0a9fd11aeebeec8f894c7f75bcf49af19e5d98c936e9b12bf9a2c49d8" +dependencies = [ + "colored", + "indexmap", + "proptest", + "rudof_iri", + "serde", + "thiserror", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "num-traits", + "rand 0.9.5", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax", + "unarray", +] + +[[package]] +name = "quick-xml" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9746dbde176634f4f2f1faf2404e30a31b2bc1e9cafb5329c95d8177a18c9fc" +dependencies = [ + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand 0.10.2", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.5", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" +dependencies = [ + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rudof_config" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2aa8f8cc753d3c53ce1f538f0693080d00cb66e414e0a40d7b7971a6755f47" +dependencies = [ + "dirs", + "serde", + "thiserror", + "toml", +] + +[[package]] +name = "rudof_iri" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab7a4f8e044fd6997a3da72d80870f2ed6c1d62e6226193cdd93af2d8c94f0af" +dependencies = [ + "getrandom 0.3.4", + "getrandom 0.4.3", + "indexmap", + "oxiri 0.3.1", + "oxrdf", + "proptest", + "reqwest", + "serde", + "thiserror", + "url", +] + +[[package]] +name = "rudof_rdf" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9068c1c338cd8136df62a55fc1bbaab81a0a85349b75c0a893149a8722dac7" +dependencies = [ + "colored", + "const_format", + "csv", + "getrandom 0.3.4", + "include_dir", + "once_cell", + "oxigraph", + "oxilangtag", + "oxiri 0.3.1", + "oxjsonld", + "oxrdf", + "oxrdfio", + "oxrdfxml", + "oxsdatatypes", + "oxttl", + "paste", + "prefixmap", + "regex", + "rudof_config", + "rudof_iri", + "rudof_viz", + "rust_decimal", + "serde", + "serde_json", + "tabled", + "tempfile", + "thiserror", + "tokio", + "toml", + "url", +] + +[[package]] +name = "rudof_typing" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9ff30ca2b1ed7554da90cc2034f5366002fcc59c358d84eb43e179314c692c" +dependencies = [ + "either", +] + +[[package]] +name = "rudof_viz" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0910f264f0a905fbcb623509a4a8c3fd9f4c40bbb374b2843a94c9fc35234a7" +dependencies = [ + "serde", + "tempfile", + "thiserror", +] + +[[package]] +name = "rust_decimal" +version = "1.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7653272e75dcac41dc199fbea6f5797633994fafd339943c06c9af16bf29cd3a" +dependencies = [ + "arrayvec", + "borsh", + "bytes", + "num-traits", + "rand 0.8.8", + "rand 0.9.5", + "serde", + "serde_json", + "wasm-bindgen", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-webpki" +version = "0.103.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "ryu-js" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04d056b875a9d2e6cb9a61d127afee9ac5999b9f87bcb32079d1318e505be714" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha1" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shacl" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c576db2e0015704702e757bc204b0a52a340db340a3bb7928b5a1d8ab254721" +dependencies = [ + "anyhow", + "dashmap", + "either", + "indoc", + "itertools", + "petgraph", + "prefixmap", + "rayon", + "rudof_config", + "rudof_iri", + "rudof_rdf", + "rudof_typing", + "rust_decimal", + "serde", + "thiserror", + "toml", + "tracing", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba467056f1b547ed52077911161fc86985becbc60e8e1857c8a144dab0def891" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "sparesults" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfa99dba6f5155ef4fdd75b78f794ea0c729e17b07d84eb88ae3c1278d1758d" +dependencies = [ + "json-event-parser", + "memchr", + "oxrdf", + "quick-xml", + "thiserror", +] + +[[package]] +name = "spareval" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b51144836ff9ca2f792b7a2422c4170ff04460d86cd8f2f764cf53e339cbec" +dependencies = [ + "hex", + "json-event-parser", + "md-5", + "oxiri 0.2.11", + "oxrdf", + "oxsdatatypes", + "rand 0.9.5", + "regex", + "rustc-hash", + "sha1", + "sha2", + "sparesults", + "spargebra", + "sparopt", + "thiserror", +] + +[[package]] +name = "spargebra" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef3c186ffb9bf2dde7c5edd5528583f309fcb819b5773cf0e313194a990304f" +dependencies = [ + "oxilangtag", + "oxiri 0.2.11", + "oxrdf", + "peg", + "rand 0.9.5", + "thiserror", +] + +[[package]] +name = "sparopt" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "973ee503ab3d6c3de66b4b459233cd5b22b44dad0fb7b8d0931daf73d2ede935" +dependencies = [ + "oxrdf", + "rand 0.9.5", + "spargebra", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "tabled" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e39a2ee1fbcd360805a771e1b300f78cc88fec7b8d3e2f71cd37bbf23e725c7d" +dependencies = [ + "ansi-str", + "ansitok", + "papergrid", + "tabled_derive", + "testing_table", +] + +[[package]] +name = "tabled_derive" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea5d1b13ca6cff1f9231ffd62f15eefd72543dab5e468735f1a456728a02846" +dependencies = [ + "heck", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "testing_table" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f8daae29995a24f65619e19d8d31dea5b389f3d853d8bf297bbf607cd0014cc" +dependencies = [ + "ansitok", + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + +[[package]] +name = "tokio" +version = "1.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c85f2c3ef0b1cd58b36682f4b17aaa995f0e5db534d85692b4903abce21f67" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.15+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" +dependencies = [ + "indexmap", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_writer" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "vte" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" +dependencies = [ + "arrayvec", + "memchr", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "serde", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef4c5d3d2cdf5c54f4231181768f5510842e350db025faf1f7163b1030ed928" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.6", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33811428bee40dbceb6d545e95754741d17a6aef9a4849f0fd62e2ba4f412a78" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d35102a9f36d089ccae9e4c6802bc118be4487b80aaffc0ab4e0cf5ce92d2873" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c01f5ab44258da43cf276c74a2763db2ff3969c9c652c3f2de07041d0b2bc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/tests/oracle/Cargo.toml b/tests/oracle/Cargo.toml new file mode 100644 index 0000000000..7e9a328bbd --- /dev/null +++ b/tests/oracle/Cargo.toml @@ -0,0 +1,22 @@ +# ONT-001 R-13 / ONT-0: the out-of-gate differential oracle. A SCRATCH CRATE, deliberately OUTSIDE the +# workspace (`[workspace]` below detaches it), so `cargo tree -p aprender-contracts -e normal,build,dev` +# never reaches `shacl` and F-20/F-22 hold. `make oracle` runs it; no PR check does (R-13: release gate only). +# +# The pin is exact (`=0.3.21`), the version ONT-0's ledger measured and verdicted ORACLE. +[package] +name = "ont-oracle" +version = "0.0.0" +edition = "2021" +publish = false + +[workspace] + +[dependencies] +shacl = { version = "=0.3.21", default-features = false } +rudof_rdf = { version = "=0.3.21", default-features = false } +serde_json = "1" +serde_yaml = "0.9" + +[[bin]] +name = "ont-oracle" +path = "src/main.rs" diff --git a/tests/oracle/differential.json b/tests/oracle/differential.json new file mode 100644 index 0000000000..f226bb6de8 --- /dev/null +++ b/tests/oracle/differential.json @@ -0,0 +1,31 @@ +{ + "cases": 17, + "corpus": { + "agree": true, + "oracle_violations": 113, + "pv_violations": 113, + "ran": true + }, + "detail": [], + "disagreements": 0, + "oracle": "shacl 0.3.21 (pinned, out of gate — ONT-0, R-13)", + "schema": "ont-oracle-differential/v1", + "w3c": { + "node/closed-002": "agree", + "property/class-001": "agree", + "property/datatype-001": "agree", + "property/datatype-002": "agree", + "property/datatype-ill-formed": "agree", + "property/in-001": "agree", + "property/maxCount-001": "agree", + "property/maxCount-002": "agree", + "property/maxLength-001": "agree", + "property/minCount-001": "agree", + "property/minCount-002": "agree", + "property/minLength-001": "agree", + "property/node-001": "agree", + "property/node-002": "agree", + "property/pattern-001": "agree", + "targets/targetClass-001": "agree" + } +} diff --git a/tests/oracle/src/main.rs b/tests/oracle/src/main.rs new file mode 100644 index 0000000000..af2195410f --- /dev/null +++ b/tests/oracle/src/main.rs @@ -0,0 +1,282 @@ +//! ONT-001 §3.6, §3.8, §5 ONT-4b2 — the differential oracle, out of the gate path (R-13). +//! +//! Two arms, one question: does the in-house validator agree with a real SHACL processor? +//! +//! 1. **W3C arm.** For every vendored case under `w3c//.ttl` that the subset claims (the ids come +//! from `crates/aprender-contracts/w3c/*.yaml`, the translations the gate runs), the pinned `shacl` crate +//! validates the ORIGINAL case file — `sh:targetNode`, blank nodes and all — and its `(focus, component)` +//! multiset is compared with the expectation the translation states. The in-house side already ran the same +//! expectation in `cargo test` (`ontology::w3c`), so agreement here means the translation is faithful and +//! both validators agree with the standard; a disagreement names the case. +//! 2. **Corpus arm.** The oracle validates `contracts/contracts.nt` against `contracts/shapes.ttl` — both +//! written by `pv extract` — and its violations are compared with pv's own, read from the JSON report +//! `make oracle` passes in. +//! +//! Output: `tests/oracle/differential.json` — `{cases, disagreements, …}` — which ONT-4b2's probe reads. A +//! disagreement is never resolved here: it is printed, counted, and the row's gate declines `Unknown{Differential}`. + +use std::collections::BTreeMap; +use std::path::{Path, PathBuf}; + +use rudof_rdf::rdf_core::RDFFormat; +use rudof_rdf::rdf_impl::ReaderMode; +use shacl::ir::IRSchema; +use shacl::validator::processor::{GraphValidation, ShaclProcessor}; +use shacl::validator::{ShaclConfig, ShaclValidationMode}; + +/// `sh:MinCountConstraintComponent` → `minCount`, the name the in-house report uses. +fn short_component(iri: &str) -> String { + let local = iri.rsplit(['#', '/']).next().unwrap_or(iri); + let base = local.strip_suffix("ConstraintComponent").unwrap_or(local); + let mut c = base.chars(); + match c.next() { + Some(f) => f.to_lowercase().chain(c).collect(), + None => base.to_string(), + } +} + +/// One `(focus, component)` pair, sorted for multiset comparison. +type Pair = (String, String); + +/// A `file:` base for a case, because the W3C cases name their own manifest node `<>` — a relative IRI that has +/// no scheme until a base supplies one, which the Turtle reader refuses outright ("No scheme found in an +/// absolute IRI"). The base never appears in a result: the cases' own terms are all `ex:`-prefixed. +fn base_of(path: &Path) -> String { + let abs = std::fs::canonicalize(path).unwrap_or_else(|_| path.to_path_buf()); + format!("file://{}", abs.display()) +} + +fn oracle_pairs(data: &Path, shapes: &Path) -> Result, String> { + let shapes_base = base_of(shapes); + let schema = IRSchema::from_reader( + &mut std::fs::File::open(shapes).map_err(|e| format!("{}: {e}", shapes.display()))?, + &shapes.display().to_string(), + &RDFFormat::Turtle, + Some(&shapes_base), + &ReaderMode::Lax, + ) + .map_err(|e| format!("{}: {e}", shapes.display()))?; + let format = if data.extension().is_some_and(|e| e == "nt") { + RDFFormat::NTriples + } else { + RDFFormat::Turtle + }; + let data_base = base_of(data); + let mut validation = GraphValidation::from_path(data, format, Some(&data_base)) + .map_err(|e| format!("{}: {e}", data.display()))?; + let report = validation + .validate(&schema, &ShaclValidationMode::Native, &ShaclConfig::new()) + .map_err(|e| format!("validate {}: {e}", data.display()))?; + let mut pairs: Vec = report + .results() + .iter() + .map(|r| { + ( + r.focus_node().to_string().trim_matches(['<', '>']).to_string(), + short_component(&r.constraint_component().to_string()), + ) + }) + .collect(); + pairs.sort(); + Ok(pairs) +} + +/// The expectation a translation states: `(focus, component)` pairs, expanded with the case's prefix. +fn expected_pairs(yaml: &Path) -> Result<(String, Vec), String> { + let text = std::fs::read_to_string(yaml).map_err(|e| format!("{}: {e}", yaml.display()))?; + let doc: serde_yaml::Value = + serde_yaml::from_str(&text).map_err(|e| format!("{}: {e}", yaml.display()))?; + let id = doc + .get("id") + .and_then(|v| v.as_str()) + .ok_or_else(|| format!("{}: no id", yaml.display()))? + .to_string(); + let prefix = doc + .get("prefix") + .and_then(|v| v.as_str()) + .ok_or_else(|| format!("{}: no prefix", yaml.display()))?; + let mut pairs = Vec::new(); + if let Some(list) = doc + .get("expect") + .and_then(|e| e.get("results")) + .and_then(|r| r.as_sequence()) + { + for r in list { + let focus = r.get("focus").and_then(|v| v.as_str()).unwrap_or_default(); + let component = r + .get("component") + .and_then(|v| v.as_str()) + .unwrap_or_default() + .to_string(); + let focus = focus + .strip_prefix("ex:") + .map_or_else(|| focus.to_string(), |l| format!("{prefix}{l}")); + pairs.push((focus, component)); + } + } + pairs.sort(); + Ok((id, pairs)) +} + +fn main() { + let root = std::env::args() + .nth(1) + .map_or_else(|| PathBuf::from("."), PathBuf::from); + let pv_report = std::env::args().nth(2).map(PathBuf::from); + let oracle_dir = root.join("tests/oracle"); + let translations = root.join("crates/aprender-contracts/w3c"); + + let mut cases = 0usize; + let mut disagreements: Vec = Vec::new(); + let mut per_case: BTreeMap = BTreeMap::new(); + + let mut files: Vec = std::fs::read_dir(&translations) + .unwrap_or_else(|e| panic!("{}: {e}", translations.display())) + .flatten() + .map(|e| e.path()) + .filter(|p| p.extension().is_some_and(|e| e == "yaml")) + .collect(); + files.sort(); + + for yaml in &files { + let (id, expected) = match expected_pairs(yaml) { + Ok(x) => x, + Err(e) => { + disagreements.push(format!("translation unreadable: {e}")); + continue; + } + }; + let case_file = oracle_dir.join("w3c").join(format!("{id}.ttl")); + // A case whose data and shapes are separate files (datatype-ill-formed) names them by suffix. + let data_alt = oracle_dir.join("w3c").join(format!("{id}-data.ttl")); + let shapes_alt = oracle_dir.join("w3c").join(format!("{id}-shapes.ttl")); + let (data, shapes) = if data_alt.is_file() && shapes_alt.is_file() { + (data_alt, shapes_alt) + } else { + (case_file.clone(), case_file.clone()) + }; + cases += 1; + match oracle_pairs(&data, &shapes) { + Ok(got) => { + if got == expected { + per_case.insert(id, "agree".to_string()); + } else { + per_case.insert(id.clone(), "DISAGREE".to_string()); + disagreements.push(format!( + "{id}: oracle {got:?} vs the vendored expectation {expected:?}" + )); + } + } + Err(e) => { + per_case.insert(id.clone(), "ERROR".to_string()); + disagreements.push(format!("{id}: oracle could not run: {e}")); + } + } + } + + // Corpus arm. + let nt = root.join("contracts/contracts.nt"); + let ttl = root.join("contracts/shapes.ttl"); + let mut corpus = serde_json::json!({ "ran": false }); + if nt.is_file() && ttl.is_file() { + cases += 1; + match oracle_pairs(&nt, &ttl) { + Ok(got) => { + let pv: Vec = pv_report + .as_ref() + .and_then(|p| std::fs::read_to_string(p).ok()) + .and_then(|t| serde_json::from_str::(&t).ok()) + .map(|v| pv_violations(&v)) + .unwrap_or_default(); + let agree = got == pv; + corpus = serde_json::json!({ + "ran": true, + "oracle_violations": got.len(), + "pv_violations": pv.len(), + "agree": agree, + }); + if !agree { + disagreements.push(format!( + "corpus: oracle {} violation(s), pv {} — first difference: {:?}", + got.len(), + pv.len(), + first_difference(&got, &pv) + )); + } + } + Err(e) => { + corpus = serde_json::json!({ "ran": false, "error": e }); + disagreements.push(format!("corpus: oracle could not run: {e}")); + } + } + } + + let out = serde_json::json!({ + "schema": "ont-oracle-differential/v1", + "oracle": "shacl 0.3.21 (pinned, out of gate — ONT-0, R-13)", + "cases": cases, + "disagreements": disagreements.len(), + "detail": disagreements, + "w3c": per_case, + "corpus": corpus, + }); + let path = oracle_dir.join("differential.json"); + std::fs::write(&path, format!("{}\n", serde_json::to_string_pretty(&out).expect("json"))) + .unwrap_or_else(|e| panic!("{}: {e}", path.display())); + println!( + "ont-oracle: {} case(s), {} disagreement(s) → {}", + cases, + disagreements.len(), + path.display() + ); + if !disagreements.is_empty() { + for d in &disagreements { + eprintln!(" {d}"); + } + std::process::exit(1); + } +} + +/// pv's own violations from `pv lint … --gate shapes --format json`. Each PV-ONT-011 finding's message is +/// ` [(rung …)] violates shape `` [not armed] (): …`, so focus and component are read +/// from it; the short `ont:x` form expands to the IRI the oracle prints. Warnings are violations of UNARMED +/// shapes — the oracle knows no arming, so both arms compare the same set. +fn pv_violations(v: &serde_json::Value) -> Vec { + let mut out = Vec::new(); + for f in v + .get("findings") + .and_then(|f| f.as_array()) + .map(Vec::as_slice) + .unwrap_or_default() + { + let Some(msg) = f.get("message").and_then(|m| m.as_str()) else { + continue; + }; + let Some((left, right)) = msg.split_once(" violates shape ") else { + continue; + }; + let focus = left.split_whitespace().next().unwrap_or_default(); + let focus = focus + .strip_prefix("ont:") + .map_or_else(|| focus.to_string(), |l| format!("https://ont.paiml.dev/v1alpha1/{l}")); + let Some((before_colon, _)) = right.split_once("): ") else { + continue; + }; + let Some((_, component)) = before_colon.rsplit_once('(') else { + continue; + }; + out.push((focus, component.to_string())); + } + out.sort(); + out +} + +fn first_difference(a: &[Pair], b: &[Pair]) -> String { + for (i, x) in a.iter().enumerate() { + match b.get(i) { + Some(y) if y == x => {} + other => return format!("at {i}: oracle {x:?} vs pv {other:?}"), + } + } + format!("pv has {} extra", b.len().saturating_sub(a.len())) +} diff --git a/tests/oracle/w3c/node/class-001.ttl b/tests/oracle/w3c/node/class-001.ttl new file mode 100644 index 0000000000..ab97977449 --- /dev/null +++ b/tests/oracle/w3c/node/class-001.ttl @@ -0,0 +1,70 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:John + rdf:type ex:MalePerson ; +. +ex:MalePerson + rdf:type rdfs:Class ; + rdfs:subClassOf ex:Person ; +. +ex:Person + rdf:type rdfs:Class ; + rdfs:subClassOf rdfs:Resource ; +. +ex:Quokki + rdf:type ex:Animal ; +. +ex:Someone + rdf:type ex:Person ; +. +ex:TestShape + rdf:type sh:NodeShape ; + sh:class ex:Person ; + sh:targetNode ex:John ; + sh:targetNode ex:Quokki ; + sh:targetNode ex:Someone ; + sh:targetNode ex:Typeless ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:class at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Quokki ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:Quokki ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Typeless ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:Typeless ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/node/class-002.ttl b/tests/oracle/w3c/node/class-002.ttl new file mode 100644 index 0000000000..71ed5e0d54 --- /dev/null +++ b/tests/oracle/w3c/node/class-002.ttl @@ -0,0 +1,62 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:NamedInstance + rdf:type ex:TestClass ; +. +ex:TestShape + rdf:type sh:NodeShape ; + sh:class ex:TestClass ; + sh:targetClass ex:BNodeClass ; + sh:targetNode ex:NamedInstance ; + sh:targetNode "String" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:class at node shape 002" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "String" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "String" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode _:b9751 ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value _:b9751 ; + ] ; + ] ; + mf:status sht:approved ; +. +_:b9751 + rdf:type ex:BNodeClass ; +. +[ + rdf:type ex:BNodeClass ; + rdf:type ex:TestClass ; +]. diff --git a/tests/oracle/w3c/node/class-003.ttl b/tests/oracle/w3c/node/class-003.ttl new file mode 100644 index 0000000000..16b37be4d2 --- /dev/null +++ b/tests/oracle/w3c/node/class-003.ttl @@ -0,0 +1,105 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:John # not Animal + rdf:type ex:MalePerson ; +. +ex:Joe # OK + rdf:type ex:MalePerson ; + rdf:type ex:Animal ; +. +ex:MalePerson + rdf:type rdfs:Class ; + rdfs:subClassOf ex:Person ; +. +ex:Person + rdf:type rdfs:Class ; + rdfs:subClassOf rdfs:Resource ; +. +ex:Quokki # not Person + rdf:type ex:Animal ; +. +ex:Quokkip # not Animal + rdf:type ex:Person ; +. +ex:Someone # OK + rdf:type ex:Person ; + rdf:type ex:Animal ; +. +ex:TestShape + rdf:type sh:NodeShape ; + sh:class ex:Person ; + sh:class ex:Animal ; + sh:targetClass ex:MalePerson ; + sh:targetNode ex:John ; + sh:targetNode ex:Quokki ; + sh:targetNode ex:Quokkip ; + sh:targetNode ex:Someone ; + sh:targetNode ex:Typeless ; # not Animal, not Person +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:class at node shape 003 multiple classes, overlapping target sets" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Typeless ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:Typeless ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Typeless ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:Typeless ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Quokki ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:Quokki ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:John ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:John ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Quokkip ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:Quokkip ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/node/closed-001.ttl b/tests/oracle/w3c/node/closed-001.ttl new file mode 100644 index 0000000000..6bae9de8c9 --- /dev/null +++ b/tests/oracle/w3c/node/closed-001.ttl @@ -0,0 +1,64 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + rdf:type ex:SomeClass ; + ex:otherProperty 4 ; + ex:someProperty 3 ; +. +ex:MyShape + rdf:type sh:NodeShape ; + sh:closed "true"^^xsd:boolean ; + sh:property [ + sh:path ex:someProperty ; + ] ; + sh:targetNode ex:InvalidInstance1 ; + sh:targetNode ex:ValidInstance1 ; +. +ex:ValidInstance1 + ex:someProperty 3 ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:closed at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath rdf:type ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClosedConstraintComponent ; + sh:sourceShape ex:MyShape ; + sh:value ex:SomeClass ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:otherProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClosedConstraintComponent ; + sh:sourceShape ex:MyShape ; + sh:value 4 ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/node/closed-002.ttl b/tests/oracle/w3c/node/closed-002.ttl new file mode 100644 index 0000000000..d72eebb49c --- /dev/null +++ b/tests/oracle/w3c/node/closed-002.ttl @@ -0,0 +1,58 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + ex:otherProperty 4 ; + ex:someProperty 3 ; +. +ex:MyShape + rdf:type sh:NodeShape ; + sh:closed "true"^^xsd:boolean ; + sh:ignoredProperties ( + rdf:type + ) ; + sh:property [ + sh:path ex:someProperty ; + ] ; + sh:targetNode ex:InvalidInstance1 ; + sh:targetNode ex:ValidInstance1 ; +. +ex:ValidInstance1 + rdf:type ex:SomeClass ; + ex:someProperty 3 ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:closed at node shape 002" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:otherProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClosedConstraintComponent ; + sh:sourceShape ex:MyShape ; + sh:value 4 ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/node/datatype-001.ttl b/tests/oracle/w3c/node/datatype-001.ttl new file mode 100644 index 0000000000..427572d45f --- /dev/null +++ b/tests/oracle/w3c/node/datatype-001.ttl @@ -0,0 +1,64 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:datatype xsd:integer ; + sh:targetClass ex:TestClass ; + sh:targetNode xsd:integer ; + sh:targetNode 42 ; + sh:targetNode "aldi"^^xsd:integer ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:datatype at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode xsd:integer ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value xsd:integer ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "aldi"^^xsd:integer ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "aldi"^^xsd:integer ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode _:b30507 ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value _:b30507 ; + ] ; + ] ; + mf:status sht:approved ; +. +_:b30507 + rdf:type ex:TestClass ; +. diff --git a/tests/oracle/w3c/node/datatype-002.ttl b/tests/oracle/w3c/node/datatype-002.ttl new file mode 100644 index 0000000000..6e9e0121fc --- /dev/null +++ b/tests/oracle/w3c/node/datatype-002.ttl @@ -0,0 +1,53 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:datatype rdf:langString ; + sh:targetNode "Hello"^^rdf:HTML ; + sh:targetNode "G'day"@en-AU ; + sh:targetNode "Hallo"@de ; + sh:targetNode "Hello" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:datatype at node shape 002" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "Hello"^^rdf:HTML ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "Hello"^^rdf:HTML ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "Hello" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "Hello" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/node/in-001.ttl b/tests/oracle/w3c/node/in-001.ttl new file mode 100644 index 0000000000..8fb4c08525 --- /dev/null +++ b/tests/oracle/w3c/node/in-001.ttl @@ -0,0 +1,63 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:Green + rdf:type ex:TestShape ; + rdfs:label "Green" ; +. +ex:InvalidInstance + rdf:type ex:TestShape ; + rdfs:label "Invalid instance" ; +. +ex:Red + rdf:type ex:TestShape ; + rdfs:label "Red" ; +. +ex:TestShape + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Test shape" ; + sh:in ( + ex:Green + ex:Red + ex:Yellow + ) ; +. +ex:Yellow + rdf:type ex:TestShape ; + rdfs:label "Yellow" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:in at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:InvalidInstance ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/node/maxLength-001.ttl b/tests/oracle/w3c/node/maxLength-001.ttl new file mode 100644 index 0000000000..bd197e2574 --- /dev/null +++ b/tests/oracle/w3c/node/maxLength-001.ttl @@ -0,0 +1,87 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:maxLength 4 ; + sh:targetClass ex:TestClass ; + sh:targetNode ; + sh:targetNode ex:John ; + sh:targetNode 123 ; + sh:targetNode 1234 ; + sh:targetNode 12345 ; + sh:targetNode "2017-03-29"^^xsd:date ; + sh:targetNode "Hel" ; + sh:targetNode "Hell" ; + sh:targetNode "Hell"@en ; + sh:targetNode "Hello" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:maxLength at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:John ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:John ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode 12345 ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value 12345 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "2017-03-29"^^xsd:date ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "2017-03-29"^^xsd:date ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "Hello" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "Hello" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode _:b34236 ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value _:b34236 ; + ] ; + ] ; + mf:status sht:approved ; +. +_:b34236 + rdf:type ex:TestClass ; +. diff --git a/tests/oracle/w3c/node/minLength-001.ttl b/tests/oracle/w3c/node/minLength-001.ttl new file mode 100644 index 0000000000..75151fe7fb --- /dev/null +++ b/tests/oracle/w3c/node/minLength-001.ttl @@ -0,0 +1,79 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:minLength 4 ; + sh:targetClass ex:TestClass ; + sh:targetNode ; + sh:targetNode ex:John ; + sh:targetNode 123 ; + sh:targetNode 1234 ; + sh:targetNode 12345 ; + sh:targetNode "2017-03-29"^^xsd:date ; + sh:targetNode "Hel" ; + sh:targetNode "Hell" ; + sh:targetNode "Hell"@en ; + sh:targetNode "Hello" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:minLength at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode 123 ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value 123 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "Hel" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "Hel" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode _:b19019 ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinLengthConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value _:b19019 ; + ] ; + ] ; + mf:status sht:approved ; +. +_:b19019 + rdf:type ex:TestClass ; +. diff --git a/tests/oracle/w3c/node/node-001.ttl b/tests/oracle/w3c/node/node-001.ttl new file mode 100644 index 0000000000..b6d717085a --- /dev/null +++ b/tests/oracle/w3c/node/node-001.ttl @@ -0,0 +1,55 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance + rdf:type ex:TestClass ; + rdfs:label "Invalid instance" ; +. +ex:TestClass + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Test class" ; + rdfs:subClassOf rdfs:Resource ; + sh:node [ + sh:class ex:OtherClass ; + ] ; +. +ex:ValidInstance + rdf:type ex:OtherClass ; + rdf:type ex:TestClass ; + rdfs:label "Valid instance" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:node at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeConstraintComponent ; + sh:sourceShape ex:TestClass ; + sh:value ex:InvalidInstance ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/node/nodeKind-001.ttl b/tests/oracle/w3c/node/nodeKind-001.ttl new file mode 100644 index 0000000000..004f8fa25c --- /dev/null +++ b/tests/oracle/w3c/node/nodeKind-001.ttl @@ -0,0 +1,43 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:IRITestShape + rdf:type sh:NodeShape ; + sh:nodeKind sh:IRI ; + sh:targetNode ex:John ; + sh:targetNode "true"^^xsd:boolean ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:nodeKind at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "true"^^xsd:boolean ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape ex:IRITestShape ; + sh:value "true"^^xsd:boolean ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/node/pattern-001.ttl b/tests/oracle/w3c/node/pattern-001.ttl new file mode 100644 index 0000000000..31d77efc6f --- /dev/null +++ b/tests/oracle/w3c/node/pattern-001.ttl @@ -0,0 +1,76 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:pattern "^[2-8][0-9]*$" ; + sh:targetClass ex:TestClass ; + sh:targetNode ex:Test ; + sh:targetNode 20000123 ; + sh:targetNode "3456" ; + sh:targetNode 39 ; + sh:targetNode "777777"@mi ; + sh:targetNode 9 ; + sh:targetNode "John" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:pattern at node shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Test ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:PatternConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value ex:Test ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode 9 ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:PatternConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value 9 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "John" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:PatternConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "John" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode _:b22415 ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:PatternConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value _:b22415 ; + ] ; + ] ; + mf:status sht:approved ; +. +_:b22415 + rdf:type ex:TestClass ; +. diff --git a/tests/oracle/w3c/node/pattern-002.ttl b/tests/oracle/w3c/node/pattern-002.ttl new file mode 100644 index 0000000000..fadc4d9a55 --- /dev/null +++ b/tests/oracle/w3c/node/pattern-002.ttl @@ -0,0 +1,45 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:flags "i" ; + sh:pattern "Aldi" ; + sh:targetNode "Aldi" ; + sh:targetNode "Alti" ; + sh:targetNode "aLdI" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:pattern at node shape 002" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "Alti" ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:PatternConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "Alti" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/class-001.ttl b/tests/oracle/w3c/property/class-001.ttl new file mode 100644 index 0000000000..2b97bf823d --- /dev/null +++ b/tests/oracle/w3c/property/class-001.ttl @@ -0,0 +1,91 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidResource1 + rdf:type rdfs:Resource ; + ex:testProperty ex:InvalidResource1 ; + ex:testProperty "A string" ; +. +ex:SubClass + rdf:type rdfs:Class ; + rdfs:subClassOf ex:SuperClass ; +. +ex:SubClassInstance + rdf:type ex:SubClass ; +. +ex:SuperClass + rdf:type rdfs:Class ; +. +ex:SuperClassInstance + rdf:type ex:SuperClass ; +. +ex:TestShape + rdf:type sh:NodeShape ; + sh:property ex:TestShape-testProperty ; + sh:targetNode ex:InvalidResource1 ; + sh:targetNode ex:ValidResource1 ; + sh:targetNode ex:ValidResource2 ; +. +ex:TestShape-testProperty + sh:path ex:testProperty ; + rdfs:label "test property" ; + sh:class ex:SuperClass ; +. +ex:ValidResource1 + rdf:type rdfs:Resource ; + ex:testProperty ex:SubClassInstance ; + ex:testProperty ex:SuperClassInstance ; +. +ex:ValidResource2 + rdf:type rdfs:Resource ; + ex:testProperty [ + rdf:type ex:SubClass ; + ] ; + ex:testProperty [ + rdf:type ex:SuperClass ; + ] ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:class at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidResource1 ; + sh:resultPath ex:testProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape-testProperty ; + sh:value ex:InvalidResource1 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidResource1 ; + sh:resultPath ex:testProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:ClassConstraintComponent ; + sh:sourceShape ex:TestShape-testProperty ; + sh:value "A string" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/datatype-001.ttl b/tests/oracle/w3c/property/datatype-001.ttl new file mode 100644 index 0000000000..f1b1b814f2 --- /dev/null +++ b/tests/oracle/w3c/property/datatype-001.ttl @@ -0,0 +1,76 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidResource1 + rdf:type ex:TestShape ; + ex:dateProperty "2011-01-01"^^xsd:dateTime ; + ex:integerProperty 11.1 ; +. +ex:TestShape + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Test shape" ; + sh:property ex:TestShape-dateProperty ; + sh:property ex:TestShape-integerProperty ; +. +ex:TestShape-dateProperty + sh:path ex:dateProperty ; + rdfs:label "date property" ; + sh:datatype xsd:date ; +. +ex:TestShape-integerProperty + sh:path ex:integerProperty ; + rdfs:label "integer property" ; + sh:datatype xsd:integer ; +. +ex:ValidResource + rdf:type ex:TestShape ; + ex:dateProperty "2014-09-01"^^xsd:date ; + ex:integerProperty 0 ; + ex:integerProperty 1234 ; + rdfs:label "Valid resource" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:datatype at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidResource1 ; + sh:resultPath ex:dateProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape-dateProperty ; + sh:value "2011-01-01"^^xsd:dateTime ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidResource1 ; + sh:resultPath ex:integerProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape-integerProperty ; + sh:value 11.1 ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/datatype-002.ttl b/tests/oracle/w3c/property/datatype-002.ttl new file mode 100644 index 0000000000..fc563774cf --- /dev/null +++ b/tests/oracle/w3c/property/datatype-002.ttl @@ -0,0 +1,71 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + ex:value "A"@en ; +. +ex:InvalidInstance2 + ex:value 42 ; +. +ex:TestShape + rdf:type sh:NodeShape ; + sh:property ex:TestShape-value ; + sh:targetNode ex:InvalidInstance1 ; + sh:targetNode ex:InvalidInstance2 ; + sh:targetNode ex:ValidInstance1 ; + sh:targetNode ex:ValidInstance2 ; +. +ex:TestShape-value + sh:path ex:value ; + sh:datatype xsd:string ; +. +ex:ValidInstance1 + ex:value "A" ; +. +ex:ValidInstance2 + ex:value "A" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:datatype at property shape 002" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:value ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape-value ; + sh:value "A"@en ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance2 ; + sh:resultPath ex:value ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape-value ; + sh:value 42 ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/datatype-003.ttl b/tests/oracle/w3c/property/datatype-003.ttl new file mode 100644 index 0000000000..529685073a --- /dev/null +++ b/tests/oracle/w3c/property/datatype-003.ttl @@ -0,0 +1,69 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + ex:value 42 ; +. +ex:TestShape + rdf:type sh:NodeShape ; + sh:property ex:TestShape-value ; + sh:targetNode ex:InvalidInstance1 ; + sh:targetNode ex:ValidInstance1 ; + sh:targetNode ex:ValidInstance2 ; + sh:targetNode ex:ValidInstance3 ; +. +ex:TestShape-value + sh:path ex:value ; + sh:or ( + [ + sh:datatype xsd:string ; + ] + [ + sh:datatype rdf:langString ; + ] + ) ; +. +ex:ValidInstance1 + ex:value "A" ; +. +ex:ValidInstance2 + ex:value "A" ; +. +ex:ValidInstance3 + ex:value "A"@en ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:datatype at property shape 003" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:value ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:OrConstraintComponent ; + sh:sourceShape ex:TestShape-value ; + sh:value 42 ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/datatype-ill-formed-data.ttl b/tests/oracle/w3c/property/datatype-ill-formed-data.ttl new file mode 100644 index 0000000000..e5338afa8b --- /dev/null +++ b/tests/oracle/w3c/property/datatype-ill-formed-data.ttl @@ -0,0 +1,6 @@ +@prefix xsd: . +@prefix ex: . + +ex:i ex:p "300"^^xsd:byte . +ex:i ex:p "55"^^xsd:integer . +ex:i ex:p "c"^^xsd:byte . diff --git a/tests/oracle/w3c/property/datatype-ill-formed-shapes.ttl b/tests/oracle/w3c/property/datatype-ill-formed-shapes.ttl new file mode 100644 index 0000000000..2036632646 --- /dev/null +++ b/tests/oracle/w3c/property/datatype-ill-formed-shapes.ttl @@ -0,0 +1,8 @@ +@prefix sh: . +@prefix xsd: . +@prefix ex: . + +ex:s a sh:PropertyShape ; + sh:targetNode ex:i ; + sh:path ex:p ; + sh:datatype xsd:byte . diff --git a/tests/oracle/w3c/property/datatype-ill-formed.ttl b/tests/oracle/w3c/property/datatype-ill-formed.ttl new file mode 100644 index 0000000000..08611e4989 --- /dev/null +++ b/tests/oracle/w3c/property/datatype-ill-formed.ttl @@ -0,0 +1,43 @@ +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +@prefix ex: . + +<> rdf:type mf:Manifest ; + mf:entries ( + + ) . + + rdf:type sht:Validate; + rdfs:label "Test of validation report for ill-formed literals" ; + mf:action [ sht:dataGraph ; + sht:shapesGraph ] ; + mf:result [ rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ rdf:type sh:ValidationResult ; + sh:resultSeverity sh:Violation ; + sh:focusNode ex:i ; + sh:value "300"^^xsd:byte ; + sh:resultPath ex:p ; + sh:sourceShape ex:s ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ] ; + sh:result [ rdf:type sh:ValidationResult ; + sh:resultSeverity sh:Violation ; + sh:focusNode ex:i ; + sh:value "c"^^xsd:byte ; + sh:resultPath ex:p ; + sh:sourceShape ex:s ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ] ; + sh:result [ rdf:type sh:ValidationResult ; + sh:resultSeverity sh:Violation ; + sh:focusNode ex:i ; + sh:value "55"^^xsd:integer ; + sh:resultPath ex:p ; + sh:sourceShape ex:s ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ] ] ; + mf:status sht:approved . diff --git a/tests/oracle/w3c/property/in-001.ttl b/tests/oracle/w3c/property/in-001.ttl new file mode 100644 index 0000000000..cfd37cfb7e --- /dev/null +++ b/tests/oracle/w3c/property/in-001.ttl @@ -0,0 +1,69 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + rdf:type ex:ShapeClass ; + ex:property "D" ; + rdfs:label "Invalid instance1" ; +. +ex:ShapeClass + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + sh:property ex:ShapeClass-property ; +. +ex:ShapeClass-property + sh:path ex:property ; + sh:datatype xsd:string ; + sh:in ( + "A" + "B" + "C" + ) ; +. +ex:ValidInstance1 + rdf:type ex:ShapeClass ; + ex:property "A" ; + rdfs:label "Valid instance1" ; +. +ex:ValidInstance2 + rdf:type ex:ShapeClass ; + ex:property "A" ; + ex:property "B" ; + ex:property "C" ; + rdfs:label "Valid instance2" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:in at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:property ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:InConstraintComponent ; + sh:sourceShape ex:ShapeClass-property ; + sh:value "D" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/maxCount-001.ttl b/tests/oracle/w3c/property/maxCount-001.ttl new file mode 100644 index 0000000000..52653dec96 --- /dev/null +++ b/tests/oracle/w3c/property/maxCount-001.ttl @@ -0,0 +1,64 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidPerson + rdf:type ex:Person ; + ex:firstName "George" ; + ex:firstName "John" ; + rdfs:label "Invalid person" ; +. +ex:Person + rdf:type rdfs:Class ; + rdfs:label "Person" ; + rdfs:subClassOf rdfs:Resource ; +. +ex:PersonShape + rdf:type sh:NodeShape ; + sh:property ex:PersonShape-firstName ; + sh:targetClass ex:Person ; + sh:targetNode ex:ValidResource ; +. +ex:PersonShape-firstName + sh:path ex:firstName ; + sh:datatype xsd:string ; + sh:maxCount 1 ; +. +ex:ValidResource + rdf:type ex:Person ; + ex:firstName "John" ; + rdfs:label "Valid resource" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:maxCount at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidPerson ; + sh:resultPath ex:firstName ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape ex:PersonShape-firstName ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/maxCount-002.ttl b/tests/oracle/w3c/property/maxCount-002.ttl new file mode 100644 index 0000000000..23d82a07a7 --- /dev/null +++ b/tests/oracle/w3c/property/maxCount-002.ttl @@ -0,0 +1,57 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidResource + rdf:type rdfs:Resource ; + rdfs:label "Invalid resource" ; + owl:versionInfo "1.0" ; +. +ex:TestShape + rdf:type sh:NodeShape ; + rdfs:label "Test shape" ; + sh:property ex:TestShape-versionInfo ; + sh:targetNode ex:InvalidResource ; + sh:targetNode ex:ValidResource ; +. +ex:TestShape-versionInfo + sh:path owl:versionInfo ; + sh:maxCount 0 ; +. +ex:ValidResource + rdf:type rdfs:Resource ; + rdfs:label "Valid resource" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:maxCount at property shape 002" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidResource ; + sh:resultPath owl:versionInfo ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape ex:TestShape-versionInfo ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/maxLength-001.ttl b/tests/oracle/w3c/property/maxLength-001.ttl new file mode 100644 index 0000000000..b6d4b48ff4 --- /dev/null +++ b/tests/oracle/w3c/property/maxLength-001.ttl @@ -0,0 +1,61 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + rdf:type ex:TestShape ; + ex:testProperty "ABC" ; +. +ex:TestShape + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Test shape" ; + sh:property ex:TestShape-testProperty ; +. +ex:TestShape-testProperty + sh:path ex:testProperty ; + sh:datatype xsd:string ; + sh:maxLength 2 ; +. +ex:ValidInstance1 + rdf:type ex:TestShape ; + ex:testProperty "A" ; + ex:testProperty "AB" ; +. +ex:ValidInstance2 + rdf:type ex:TestShape ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:maxLength at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:testProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxLengthConstraintComponent ; + sh:sourceShape ex:TestShape-testProperty ; + sh:value "ABC" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/minCount-001.ttl b/tests/oracle/w3c/property/minCount-001.ttl new file mode 100644 index 0000000000..680f9c4b87 --- /dev/null +++ b/tests/oracle/w3c/property/minCount-001.ttl @@ -0,0 +1,62 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidPerson + rdf:type ex:Person ; + rdfs:label "Invalid person" ; +. +ex:Person + rdf:type rdfs:Class ; + rdfs:label "Person" ; + rdfs:subClassOf rdfs:Resource ; +. +ex:PersonShape + rdf:type sh:NodeShape ; + sh:property ex:PersonShape-firstName ; + sh:targetClass ex:Person ; + sh:targetNode ex:ValidResource ; +. +ex:PersonShape-firstName + sh:path ex:firstName ; + sh:datatype xsd:string ; + sh:minCount 1 ; +. +ex:ValidResource + rdf:type ex:Person ; + ex:firstName "John" ; + rdfs:label "Valid resource" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:minCount at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidPerson ; + sh:resultPath ex:firstName ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinCountConstraintComponent ; + sh:sourceShape ex:PersonShape-firstName ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/minCount-002.ttl b/tests/oracle/w3c/property/minCount-002.ttl new file mode 100644 index 0000000000..d4b4f13b2c --- /dev/null +++ b/tests/oracle/w3c/property/minCount-002.ttl @@ -0,0 +1,41 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:property [ + sh:path ex:property ; + sh:minCount 0 ; + sh:name "property" ; + ] ; + sh:targetNode ex:ValidResource1 ; +. +ex:ValidResource1 + rdf:type rdfs:Resource ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:minCount at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/minLength-001.ttl b/tests/oracle/w3c/property/minLength-001.ttl new file mode 100644 index 0000000000..06f286e2ee --- /dev/null +++ b/tests/oracle/w3c/property/minLength-001.ttl @@ -0,0 +1,61 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + rdf:type ex:TestShape ; + ex:testProperty "A" ; +. +ex:TestShape + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Test shape" ; + sh:property ex:TestShape-testProperty ; +. +ex:TestShape-testProperty + sh:path ex:testProperty ; + sh:datatype xsd:string ; + sh:minLength 2 ; +. +ex:ValidInstance1 + rdf:type ex:TestShape ; + ex:testProperty "AB" ; + ex:testProperty "ABC" ; +. +ex:ValidInstance2 + rdf:type ex:TestShape ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:minLength at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:testProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MinLengthConstraintComponent ; + sh:sourceShape ex:TestShape-testProperty ; + sh:value "A" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/node-001.ttl b/tests/oracle/w3c/property/node-001.ttl new file mode 100644 index 0000000000..2245930bac --- /dev/null +++ b/tests/oracle/w3c/property/node-001.ttl @@ -0,0 +1,113 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:Anon + rdf:type ex:Person ; + ex:firstName "Anon" ; +. +ex:Issue + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Issue" ; + rdfs:subClassOf rdfs:Resource ; + sh:property ex:Issue-assignedTo ; + sh:property ex:Issue-submittedBy ; +. +ex:Issue-assignedTo + sh:path ex:assignedTo ; + sh:class ex:Person ; + sh:node [ + rdfs:comment "All assignees must have an email and a last name." ; + sh:property [ + sh:path ex:email ; + sh:maxCount 1 ; + sh:minCount 1 ; + ] ; + sh:property [ + sh:path ex:lastName ; + sh:maxCount 1 ; + sh:minCount 1 ; + ] ; + ] ; +. +ex:Issue-submittedBy + sh:path ex:submittedBy ; + sh:class ex:Person ; + sh:minCount 1 ; +. +ex:Issue_1 + rdf:type ex:Issue ; + ex:assignedTo ex:Anon ; + ex:submittedBy ex:Anon ; + rdfs:label "Issue 1" ; +. +ex:Issue_2 + rdf:type ex:Issue ; + ex:assignedTo ex:JohnDoeWithEmail ; + ex:submittedBy ex:Anon ; + rdfs:label "Issue 2" ; +. +ex:JohnDoeWithEmail + rdf:type ex:Person ; + ex:email "john@doe.com" ; + ex:firstName "John" ; + ex:lastName "Doe" ; +. +ex:Person + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Person" ; + rdfs:subClassOf rdfs:Resource ; + sh:property [ + sh:path ex:email ; + ex:datatype xsd:string ; + rdfs:label "email" ; + ] ; + sh:property [ + sh:path ex:firstName ; + rdfs:label "first name" ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + ] ; + sh:property [ + sh:path ex:lastName ; + rdfs:label "last name" ; + sh:datatype xsd:string ; + ] ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:node at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Issue_1 ; + sh:resultPath ex:assignedTo ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeConstraintComponent ; + sh:sourceShape ex:Issue-assignedTo ; + sh:value ex:Anon ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/node-002.ttl b/tests/oracle/w3c/property/node-002.ttl new file mode 100644 index 0000000000..f028f57fd4 --- /dev/null +++ b/tests/oracle/w3c/property/node-002.ttl @@ -0,0 +1,75 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:AddressShape + rdf:type sh:NodeShape ; + sh:property ex:AddressShape-postalCode ; +. +ex:AddressShape-postalCode + sh:path ex:postalCode ; + sh:datatype xsd:string ; + sh:maxCount 1 ; +. +ex:Bob + rdf:type ex:Person ; + ex:address ex:BobsAddress ; +. +ex:BobsAddress + ex:postalCode "1234" ; +. +ex:Person + rdf:type rdfs:Class ; + rdfs:label "Person" ; +. +ex:PersonShape + rdf:type sh:NodeShape ; + sh:property ex:PersonShape-address ; + sh:targetClass ex:Person ; +. +ex:PersonShape-address + sh:path ex:address ; + sh:minCount 1 ; + sh:node ex:AddressShape ; +. +ex:Reto + rdf:type ex:Person ; + ex:address ex:RetosAddress ; +. +ex:RetosAddress + ex:postalCode 5678 ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:node at property shape 002" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:Reto ; + sh:resultPath ex:address ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeConstraintComponent ; + sh:sourceShape ex:PersonShape-address ; + sh:value ex:RetosAddress ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/nodeKind-001.ttl b/tests/oracle/w3c/property/nodeKind-001.ttl new file mode 100644 index 0000000000..d40515d0ee --- /dev/null +++ b/tests/oracle/w3c/property/nodeKind-001.ttl @@ -0,0 +1,371 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InstanceWithBlankNode + rdf:type ex:MyClass ; + ex:myProperty _:b55454 ; +. +ex:InstanceWithBlankNodeAndIRI + rdf:type ex:MyClass ; + ex:myProperty rdfs:Class ; + ex:myProperty _:b67098 ; +. +ex:InstanceWithBlankNodeAndLiteral + rdf:type ex:MyClass ; + ex:myProperty "Literal" ; + ex:myProperty _:b99026 ; +. +ex:InstanceWithIRI + rdf:type ex:MyClass ; + ex:myProperty rdfs:Class ; +. +ex:InstanceWithIRIAndLiteral + rdf:type ex:MyClass ; + ex:myProperty rdfs:Class ; + ex:myProperty "Literal" ; +. +ex:InstanceWithLiteral + rdf:type ex:MyClass ; + ex:myProperty "Literal" ; +. +ex:MyClass + rdf:type rdfs:Class ; + rdfs:label "My class" ; +. +ex:ShapeWithBlankNode + rdf:type sh:NodeShape ; + sh:property _:b38619 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithBlankNodeOrIRI + rdf:type sh:NodeShape ; + sh:property _:b3078 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithBlankNodeOrLiteral + rdf:type sh:NodeShape ; + sh:property _:b14975 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithIRI + rdf:type sh:NodeShape ; + sh:property _:b97614 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithIRIOrLiteral + rdf:type sh:NodeShape ; + sh:property _:b97860 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithLiteral + rdf:type sh:NodeShape ; + sh:property _:b79526 ; + sh:targetClass ex:MyClass ; +. +ex:myProperty + rdf:type rdf:Property ; + rdfs:domain ex:MyClass ; + rdfs:label "my property" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:nodeKind at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNode ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value _:b55454 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNode ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value _:b55454 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNode ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97860 ; + sh:value _:b55454 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b14975 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value _:b67098 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value _:b67098 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97860 ; + sh:value _:b67098 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b3078 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value _:b99026 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value _:b99026 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97860 ; + sh:value _:b99026 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b14975 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b3078 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b14975 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b3078 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value "Literal" ; + ] ; + ] ; + mf:status sht:approved ; +. +_:b3078 + sh:path ex:myProperty ; + sh:nodeKind sh:BlankNodeOrIRI ; +. +_:b14975 + sh:path ex:myProperty ; + sh:nodeKind sh:BlankNodeOrLiteral ; +. +_:b38619 + sh:path ex:myProperty ; + sh:nodeKind sh:BlankNode ; +. +_:b55454 + rdf:type rdfs:Resource ; +. +_:b67098 + rdf:type rdfs:Resource ; +. +_:b79526 + sh:path ex:myProperty ; + sh:nodeKind sh:Literal ; +. +_:b97614 + sh:path ex:myProperty ; + sh:nodeKind sh:IRI ; +. +_:b97860 + sh:path ex:myProperty ; + sh:nodeKind sh:IRIOrLiteral ; +. +_:b99026 + rdf:type rdfs:Resource ; +. diff --git a/tests/oracle/w3c/property/pattern-001.ttl b/tests/oracle/w3c/property/pattern-001.ttl new file mode 100644 index 0000000000..2c63ad8010 --- /dev/null +++ b/tests/oracle/w3c/property/pattern-001.ttl @@ -0,0 +1,74 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + rdf:type ex:TestShape ; + ex:property "Maria" ; + rdfs:label "Invalid instance1" ; +. +ex:InvalidInstance2 + rdf:type ex:TestShape ; + ex:property "john" ; + rdfs:label "Invalid instance2" ; +. +ex:TestShape + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Test shape" ; + sh:property ex:TestShape-property ; +. +ex:TestShape-property + sh:path ex:property ; + sh:datatype xsd:string ; + sh:pattern "Joh" ; +. +ex:ValidInstance1 + rdf:type ex:TestShape ; + ex:property "Hi Joh" ; + ex:property "John" ; + rdfs:label "Valid instance1" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:pattern at property shape 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:property ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:PatternConstraintComponent ; + sh:sourceShape ex:TestShape-property ; + sh:value "Maria" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance2 ; + sh:resultPath ex:property ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:PatternConstraintComponent ; + sh:sourceShape ex:TestShape-property ; + sh:value "john" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/property/pattern-002.ttl b/tests/oracle/w3c/property/pattern-002.ttl new file mode 100644 index 0000000000..498c2a3a14 --- /dev/null +++ b/tests/oracle/w3c/property/pattern-002.ttl @@ -0,0 +1,66 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + rdf:type ex:TestShape ; + ex:property "Maria" ; + rdfs:label "Invalid instance1" ; +. +ex:TestShape + rdf:type rdfs:Class ; + rdf:type sh:NodeShape ; + rdfs:label "Test shape" ; + sh:property ex:TestShape-property ; +. +ex:TestShape-property + sh:path ex:property ; + rdfs:label "property" ; + sh:datatype xsd:string ; + sh:flags "i" ; + sh:pattern "joh" ; +. +ex:ValidInstance1 + rdf:type ex:TestShape ; + ex:property "Hi Joh" ; + ex:property "John" ; + rdfs:label "Valid instance1" ; +. +ex:ValidInstance2 + rdf:type ex:TestShape ; + ex:property "john" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:pattern at property shape 002" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:property ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:PatternConstraintComponent ; + sh:sourceShape ex:TestShape-property ; + sh:value "Maria" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/tests/oracle/w3c/targets/targetClass-001.ttl b/tests/oracle/w3c/targets/targetClass-001.ttl new file mode 100644 index 0000000000..e1d5a55cb4 --- /dev/null +++ b/tests/oracle/w3c/targets/targetClass-001.ttl @@ -0,0 +1,62 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InvalidInstance1 + rdf:type ex:MyClass ; + ex:myProperty "A" ; + ex:myProperty "B" ; +. +ex:MyClass + rdf:type rdfs:Class ; +. +ex:MyShape + rdf:type sh:NodeShape ; + sh:property ex:MyShape-myProperty ; + sh:targetClass ex:MyClass ; +. +ex:MyShape-myProperty + sh:path ex:myProperty ; + sh:maxCount 1 ; +. +ex:ValidInstance1 + rdf:type ex:MyClass ; + ex:myProperty "A" ; +. +ex:ValidInstance2 + ex:myProperty "A" ; + ex:myProperty "B" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:targetClass 001" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InvalidInstance1 ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; + sh:sourceShape ex:MyShape-myProperty ; + ] ; + ] ; + mf:status sht:approved ; +. From b7bb48526931e9ddbfeac931ee30119128587f1d Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 17:14:29 +0200 Subject: [PATCH 03/11] =?UTF-8?q?ONT-4b2:=20rebased=20onto=2045decafb5=20(?= =?UTF-8?q?ONT-4c1=20+=20#3530=20+=20#3523=20+=20#3516=20on=20main)=20?= =?UTF-8?q?=E2=80=94=20ordinal=20343,=20the=20sh:in=20message=20carries=20?= =?UTF-8?q?the=20path=20AND=20the=20terms,=20regenerated=20census=20/=20co?= =?UTF-8?q?ntracts.nt=20/=20tree-reader=20registry=20(Refs=20PMAT-3509)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The branch was built on the reconciled 4c1 scratch base; only its two own commits were replayed (`git rebase --onto origin/main bd89c88ad`). One real conflict, shapes.rs check_lexical: #3530 put the property path at the front of the `in` message (`ont:study/scale: quadratic is not one of …`) and 4b2 renders the value and the list as TERMS (`sh:in` is term equality). Merged: `: is not one of []` — #3530's CLI legs (contains path ∧ value ∧ "is not one of") and 4b2's still hold. The four generated files took main's copy and were regenerated with this tree's pv: `pv extract contracts --check` 0; sigma Pass, relations Pass, shapes Pass (shapes_n=5, focus_nodes_n=2318, symbols 169 resolved / 101 unresolved reported, W3C 16/16). Ordinal 340 was apr-cli-pixel-regression on main; 4b2 takes 343 (342 is 4c1's). Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- ...er-contracts-cli-ont4b2-code-lean-w3c.cmd} | 0 contracts/census.json | 10 +- contracts/contracts.nt | 5788 +++++++++++++++++ scripts/tree_reader_tests.txt | 6 +- 4 files changed, 5798 insertions(+), 6 deletions(-) rename ci/explicit-test-commands.d/{340-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd => 343-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd} (100%) diff --git a/ci/explicit-test-commands.d/340-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd b/ci/explicit-test-commands.d/343-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd similarity index 100% rename from ci/explicit-test-commands.d/340-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd rename to ci/explicit-test-commands.d/343-aprender-contracts-cli-ont4b2-code-lean-w3c.cmd diff --git a/contracts/census.json b/contracts/census.json index 07f7b2c007..3009dd4060 100644 --- a/contracts/census.json +++ b/contracts/census.json @@ -1,8 +1,8 @@ { "schema": "ont.paiml.dev/census/v1alpha1", "git_sha": null, - "n_files": 1798, - "n_parsed": 1798, + "n_files": 1799, + "n_parsed": 1799, "n_parse_errors": 0, "parse_errors": [], "quarantined_n": 0, @@ -12,7 +12,7 @@ "kernel": 362, "model-family": 28, "model-family-variant": 1, - "pattern": 85, + "pattern": 86, "pretraining-corpus": 2, "registry": 519, "schema": 766, @@ -25,11 +25,11 @@ "pv-contract": 1 }, "by_anchoring": { - "unanchored": 1795, + "unanchored": 1796, "class": 2, "instance": 1 }, - "id_set_sha256": "a5a5d6518fff519dee2cae9ffd1a00d74c404da02d5ed3d85b5814d0027773d9", + "id_set_sha256": "a547cd5527caeffade2d8260d25421f26506df1c1d8f00f5eb7b9cde12e8107e", "declared_external": [ { "name": "provable-contracts", diff --git a/contracts/contracts.nt b/contracts/contracts.nt index e0fd43f161..6de86a6452 100644 --- a/contracts/contracts.nt +++ b/contracts/contracts.nt @@ -8275,6 +8275,16 @@ . "contracts/online-softmax-v1.yaml"^^ . "online-softmax-v1"^^ . + . + . + . + . + "contracts/ont-code-symbols-v1.yaml"^^ . + "ont-code-symbols-v1"^^ . + "pattern"^^ . + "ont-code-symbols"^^ . + "active"^^ . + "1.0.0"^^ . . . . @@ -9580,3 +9590,5781 @@ . "03b74727a860a56338e042c4420bb3f04b2fec5734175f4cb9fa853daf52b7e8"^^ . "0.68.1"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "canary_regression_detection"^^ . + "crates/apr-cli/src/commands/canary.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::canary"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "cbtop_monitoring"^^ . + "crates/apr-cli/src/commands/cbtop.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::cbtop"^^ . + "run"^^ . + "true"^^ . + "pub"^^ . + . + . + "allow"^^ . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "session_state_machine"^^ . + "crates/apr-cli/src/commands/chat.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::chat"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "byte_encoder_coverage"^^ . + . + "apr_cli::commands::chat_load_tokenizers"^^ . + "load_tokenizers"^^ . + "false"^^ . + "no `mod chat_load_tokenizers` or `use … chat_load_tokenizers` in `crates/apr-cli/src/commands/mod.rs`"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "session_persistence"^^ . + . + "apr_cli::commands::chat_session"^^ . + "run"^^ . + "false"^^ . + "no `mod chat_session` or `use … chat_session` in `crates/apr-cli/src/commands/mod.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "model_integrity_check"^^ . + "crates/apr-cli/src/commands/check.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::check"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "data_split_determinism"^^ . + "data_validation"^^ . + . + "apr_cli::commands::data"^^ . + "run"^^ . + "false"^^ . + "no `fn run` (free or in an impl) in `crates/apr-cli/src/commands/data.rs`"^^ . + . + . + "allow"^^ . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "distill_knowledge_transfer"^^ . + "crates/apr-cli/src/commands/distill.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::distill"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "encryption_roundtrip"^^ . + . + "apr_cli::commands::encrypt"^^ . + "run"^^ . + "false"^^ . + "no `mod encrypt` or `use … encrypt` in `crates/apr-cli/src/commands/mod.rs`"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "repeat_penalty"^^ . + "crates/apr-cli/src/commands/eval/inference.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::eval::inference"^^ . + "sample_token"^^ . + "true"^^ . + "pub(super)"^^ . + . + . + "allow"^^ . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "atomic_write_safety"^^ . + "export_roundtrip"^^ . + "crates/apr-cli/src/commands/export.rs"^^ . + . + . + "fn"^^ . + "apr_cli::commands::export"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "allow"^^ . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "vram_estimation_tolerance"^^ . + "crates/apr-cli/src/commands/finetune.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::finetune"^^ . + "dispatch_finetune_mode"^^ . + "true"^^ . + "private"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "vram_feasibility"^^ . + "crates/apr-cli/src/commands/finetune.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::finetune"^^ . + "display_finetune_plan"^^ . + "true"^^ . + "private"^^ . + . + . + "allow"^^ . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "alpha_rank_ratio"^^ . + "checkpoint_metadata_roundtrip"^^ . + "finetune_lora_rank_correctness"^^ . + "merge_tensor_shape"^^ . + "rank_bounds_safety"^^ . + "crates/apr-cli/src/commands/finetune.rs"^^ . + . + . + "fn"^^ . + "apr_cli::commands::finetune"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "json_output_consistency"^^ . + "crates/apr-cli/src/commands/gpu.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::gpu"^^ . + "run"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "hex_display_fidelity"^^ . + "crates/apr-cli/src/commands/hex.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::hex"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "import_format_detection"^^ . + "crates/apr-cli/src/commands/import.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::import"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "lint_model_conventions"^^ . + "crates/apr-cli/src/commands/lint.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::lint"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "allow"^^ . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "merge_weight_conservation"^^ . + "crates/apr-cli/src/commands/merge.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::merge"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "oracle_family_detection"^^ . + . + "apr_cli::commands::oracle"^^ . + "run"^^ . + "false"^^ . + "no `fn run` (free or in an impl) in `crates/apr-cli/src/commands/oracle.rs`"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "gpu_cpu_parity"^^ . + . + "apr_cli::commands::parity"^^ . + "run"^^ . + "false"^^ . + "no `fn run` (free or in an impl) in `crates/apr-cli/src/commands/parity.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "probar_property_tests"^^ . + "crates/apr-cli/src/commands/probar.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::probar"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "allow"^^ . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "prune_sparsity_target"^^ . + "crates/apr-cli/src/commands/prune.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::prune"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "ptx_code_generation"^^ . + "crates/apr-cli/src/commands/ptx_explain.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::ptx_explain"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "publish_manifest_integrity"^^ . + . + "apr_cli::commands::publish"^^ . + "run"^^ . + "false"^^ . + "no `fn run` (free or in an impl) in `crates/apr-cli/src/commands/publish.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "pull_cache_integrity"^^ . + "crates/apr-cli/src/commands/pull.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::pull"^^ . + "run"^^ . + "true"^^ . + "pub"^^ . + . + . + "allow"^^ . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "qa_gate_composition"^^ . + "crates/apr-cli/src/commands/qa.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::qa"^^ . + "run"^^ . + "true"^^ . + "pub"^^ . + . + . + "allow"^^ . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "quantize_precision_bound"^^ . + "crates/apr-cli/src/commands/quantize.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::quantize"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "rosetta_fingerprint_determinism"^^ . + . + "apr_cli::commands::rosetta"^^ . + "run"^^ . + "false"^^ . + "no `fn run` (free or in an impl) in `crates/apr-cli/src/commands/rosetta.rs`"^^ . + . + . + "cfg"^^ . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "error_envelope_preservation"^^ . + "crates/apr-cli/src/commands/serve/routes.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::serve::routes"^^ . + "fallback_handler"^^ . + "true"^^ . + "private"^^ . + . + . + "cfg"^^ . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "timeout_honoring"^^ . + "crates/apr-cli/src/commands/serve/routes.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::serve::routes"^^ . + "health_handler"^^ . + "true"^^ . + "private"^^ . + . + . + "allow"^^ . + "cfg"^^ . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "request_response_schema"^^ . + "crates/apr-cli/src/commands/serve/routes.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::serve::routes"^^ . + "predict_handler"^^ . + "true"^^ . + "private"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "apr_cli"^^ . + "concurrent_isolation"^^ . + "cors_negotiation"^^ . + "graceful_shutdown"^^ . + "request_routing"^^ . + "resource_cleanup"^^ . + "server_lifecycle"^^ . + "session_state_machine"^^ . + "crates/apr-cli/src/commands/serve/mod.rs"^^ . + . + . + . + . + "fn"^^ . + "apr_cli::commands::serve"^^ . + "run"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "tool_schema_fidelity"^^ . + "crates/apr-cli/src/commands/serve/types.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::serve::types"^^ . + "extract_tool_call"^^ . + "true"^^ . + "private"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "idempotency_classification"^^ . + "crates/apr-cli/src/commands/serve/types.rs"^^ . + . + "fn"^^ . + "apr_cli::commands::serve::types"^^ . + "format_tools_prompt"^^ . + "true"^^ . + "pub(super)"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "tokenizer_training_correctness"^^ . + . + "apr_cli::commands::tokenize"^^ . + "run"^^ . + "false"^^ . + "no `fn run` (free or in an impl) in `crates/apr-cli/src/commands/tokenize.rs`"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "training_plan_apply_semantics"^^ . + . + "apr_cli::commands::train"^^ . + "run"^^ . + "false"^^ . + "no `fn run` (free or in an impl) in `crates/apr-cli/src/commands/train.rs`"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "dispatch_completeness"^^ . + "output_format_fidelity"^^ . + "resource_cleanup"^^ . + "side_effect_classification"^^ . + . + . + "apr_cli::dispatch"^^ . + "dispatch_core_command"^^ . + "false"^^ . + "no `mod dispatch` or `use … dispatch` in `crates/apr-cli/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "idempotent_inspection"^^ . + "idempotent_output"^^ . + "no_side_effects"^^ . + . + . + "apr_cli::dispatch"^^ . + "dispatch_inspection_commands"^^ . + "false"^^ . + "no `mod dispatch` or `use … dispatch` in `crates/apr-cli/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "output_path_validation"^^ . + "rm_confirmation_gate"^^ . + . + "apr_cli::dispatch"^^ . + "dispatch_model_commands"^^ . + "false"^^ . + "no `mod dispatch` or `use … dispatch` in `crates/apr-cli/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "contract_gate_enforcement"^^ . + . + "apr_cli::dispatch"^^ . + "execute_command"^^ . + "false"^^ . + "no `mod dispatch` or `use … dispatch` in `crates/apr-cli/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "apr_cli"^^ . + "feature_gated_dispatch"^^ . + . + "apr_cli::dispatch_analysis"^^ . + "dispatch_extended_command"^^ . + "false"^^ . + "no `mod dispatch_analysis` or `use … dispatch_analysis` in `crates/apr-cli/src/lib.rs`"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "error_mapping"^^ . + "exit_code_on_error"^^ . + "exit_code_on_failure"^^ . + "exit_code_semantics"^^ . + "crates/apr-cli/src/error.rs"^^ . + . + . + . + . + . + "method"^^ . + "apr_cli::error"^^ . + "exit_code"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "model_path_resolution"^^ . + "crates/apr-cli/src/error.rs"^^ . + . + "fn"^^ . + "apr_cli::error"^^ . + "resolve_model_path"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "apr_cli"^^ . + "pipe_stdin_support"^^ . + "crates/apr-cli/src/pipe.rs"^^ . + . + "fn"^^ . + "apr_cli::pipe"^^ . + "with_stdin_support"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "magic_validation"^^ . + "crates/aprender-core/src/bundle/format.rs"^^ . + . + "method"^^ . + "aprender::bundle::format"^^ . + "validate_magic"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "expected_calibration_error"^^ . + "crates/aprender-core/src/calibration.rs"^^ . + . + "fn"^^ . + "aprender::calibration"^^ . + "expected_calibration_error"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "maximum_calibration_error"^^ . + "crates/aprender-core/src/calibration.rs"^^ . + . + "fn"^^ . + "aprender::calibration"^^ . + "maximum_calibration_error"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "reliability_diagram"^^ . + "crates/aprender-core/src/calibration.rs"^^ . + . + "fn"^^ . + "aprender::calibration"^^ . + "reliability_diagram"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "label_order_semantics"^^ . + "crates/aprender-core/src/classification/multinomial.rs"^^ . + . + "fn"^^ . + "aprender::classification::multinomial"^^ . + "argmax_lowest_index"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "convergence_error_mapping"^^ . + "crates/aprender-core/src/classification/multinomial.rs"^^ . + . + "method"^^ . + "aprender::classification::multinomial"^^ . + "fit"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "analytic_gradient"^^ . + "crates/aprender-core/src/classification/multinomial.rs"^^ . + . + "method"^^ . + "aprender::classification::multinomial"^^ . + "gradient"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "softmax_nll_objective"^^ . + "crates/aprender-core/src/classification/multinomial.rs"^^ . + . + "method"^^ . + "aprender::classification::multinomial"^^ . + "objective"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "logit_finiteness"^^ . + "crates/aprender-core/src/classification/multinomial.rs"^^ . + . + "method"^^ . + "aprender::classification::multinomial"^^ . + "predict_proba"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "backend_selection"^^ . + "gpu_detection_accuracy"^^ . + "crates/aprender-core/src/compute/mod.rs"^^ . + . + "fn"^^ . + "aprender::compute"^^ . + "select_backend"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "format_conversion_roundtrip"^^ . + . + "aprender::convert"^^ . + "run"^^ . + "false"^^ . + "no `mod convert` or `use … convert` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "apr_tokenizer_embedding"^^ . + . + "aprender::convert"^^ . + "save_model_tensors_with_gguf_config_and_tokenizer"^^ . + "false"^^ . + "no `mod convert` or `use … convert` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "streaming_data_loader"^^ . + . + "aprender::data::dataloader::DataLoader"^^ . + "next_batch"^^ . + "false"^^ . + "no `mod dataloader` or `use … dataloader` in `crates/aprender-core/src/data/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "export_fidelity"^^ . + . + "aprender::export"^^ . + "run"^^ . + "false"^^ . + "no `mod export` or `use … export` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "name_bijection"^^ . + . + "aprender::format::converter"^^ . + "map_tensor_name"^^ . + "false"^^ . + "no `fn map_tensor_name` (free or in an impl) in `crates/aprender-core/src/format/converter/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "identity"^^ . + . + "aprender::format::converter::tokenizer_loader"^^ . + "load_tokenizer_from_explicit_path"^^ . + "false"^^ . + "no `mod tokenizer_loader` or `use … tokenizer_loader` in `crates/aprender-core/src/format/converter/mod.rs`"^^ . + . + . + "cfg"^^ . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "header_size_validation"^^ . + "crates/aprender-core/src/format/core_io.rs"^^ . + . + "fn"^^ . + "aprender::format::core_io"^^ . + "parse_and_validate_header"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "architecture_config_invariants"^^ . + . + "aprender::format::gguf::api::GgufModelConfig"^^ . + "validate"^^ . + "false"^^ . + "no `mod GgufModelConfig` or `use … GgufModelConfig` in `crates/aprender-core/src/format/gguf/api.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "metadata_kv_safety"^^ . + "crates/aprender-core/src/format/gguf/reader.rs"^^ . + . + "fn"^^ . + "aprender::format::gguf::reader"^^ . + "read_metadata_value"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "transpose_involution"^^ . + . + "aprender::format::layout"^^ . + "swap_axes"^^ . + "false"^^ . + "no `mod layout` or `use … layout` in `crates/aprender-core/src/format/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "element_count"^^ . + . + "aprender::format::layout"^^ . + "validate_element_count"^^ . + "false"^^ . + "no `mod layout` or `use … layout` in `crates/aprender-core/src/format/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "import_completeness_gate"^^ . + . + "aprender::format::layout_contract"^^ . + "enforce_architecture_completeness"^^ . + "false"^^ . + "no `fn enforce_architecture_completeness` (free or in an impl) in `crates/aprender-core/src/format/layout_contract.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "tensor_transpose_reindex"^^ . + . + "aprender::format::layout_contract"^^ . + "should_transpose_gguf"^^ . + "false"^^ . + "no `fn should_transpose_gguf` (free or in an impl) in `crates/aprender-core/src/format/layout_contract.rs`"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "contract_composition"^^ . + "crates/aprender-core/src/format/model_arithmetic.rs"^^ . + . + "fn"^^ . + "aprender::format::model_arithmetic"^^ . + "contract_composition"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "flops_per_token"^^ . + "crates/aprender-core/src/format/model_arithmetic.rs"^^ . + . + "fn"^^ . + "aprender::format::model_arithmetic"^^ . + "flops_per_token"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "memory_breakdown"^^ . + "crates/aprender-core/src/format/model_arithmetic.rs"^^ . + . + "fn"^^ . + "aprender::format::model_arithmetic"^^ . + "memory_breakdown"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "model_parameter_count"^^ . + "crates/aprender-core/src/format/model_arithmetic.rs"^^ . + . + "fn"^^ . + "aprender::format::model_arithmetic"^^ . + "model_parameter_count"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "throughput_model"^^ . + "crates/aprender-core/src/format/model_arithmetic.rs"^^ . + . + "fn"^^ . + "aprender::format::model_arithmetic"^^ . + "throughput_model"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "magic_byte_validation"^^ . + . + "aprender::gguf::reader"^^ . + "detect_format"^^ . + "false"^^ . + "no `mod gguf` or `use … gguf` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "metadata_kv_safety"^^ . + . + "aprender::gguf::reader"^^ . + "parse_metadata"^^ . + "false"^^ . + "no `mod gguf` or `use … gguf` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "header_integrity"^^ . + . + "aprender::gguf::reader"^^ . + "validate_header"^^ . + "false"^^ . + "no `mod gguf` or `use … gguf` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "magic_validation"^^ . + . + "aprender::gguf::reader"^^ . + "validate_magic"^^ . + "false"^^ . + "no `mod gguf` or `use … gguf` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "global_max_pool"^^ . + "crates/aprender-core/src/gnn/accumulate.rs"^^ . + . + "fn"^^ . + "aprender::gnn::accumulate"^^ . + "global_max_pool"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "global_mean_pool"^^ . + "crates/aprender-core/src/gnn/accumulate.rs"^^ . + . + "fn"^^ . + "aprender::gnn::accumulate"^^ . + "global_mean_pool"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "global_max_pool"^^ . + . + "aprender::gnn"^^ . + "global_max_pool"^^ . + "false"^^ . + "no `fn global_max_pool` (free or in an impl) in `crates/aprender-core/src/gnn/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "global_mean_pool"^^ . + . + "aprender::gnn"^^ . + "global_mean_pool"^^ . + "false"^^ . + "no `fn global_mean_pool` (free or in an impl) in `crates/aprender-core/src/gnn/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "pagerank"^^ . + "power_iteration"^^ . + . + "aprender::graph"^^ . + "pagerank"^^ . + "false"^^ . + "no `fn pagerank` (free or in an impl) in `crates/aprender-core/src/graph/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "import_integrity"^^ . + . + "aprender::import"^^ . + "run"^^ . + "false"^^ . + "no `mod import` or `use … import` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "forward_pass_completeness"^^ . + . + "aprender::inference::forward"^^ . + "forward_pass"^^ . + "false"^^ . + "no `mod inference` or `use … inference` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "generation_temperature_zero"^^ . + "inference_determinism"^^ . + . + . + "aprender::inference"^^ . + "generate"^^ . + "false"^^ . + "no `mod inference` or `use … inference` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "accuracy"^^ . + "crates/aprender-core/src/metrics/classification.rs"^^ . + . + "fn"^^ . + "aprender::metrics::classification"^^ . + "accuracy"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "confusion_matrix"^^ . + . + "aprender::metrics::classification"^^ . + "confusion_matrix"^^ . + "false"^^ . + "no `fn confusion_matrix` (free or in an impl) in `crates/aprender-core/src/metrics/classification.rs`"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "f1_score"^^ . + "crates/aprender-core/src/metrics/classification.rs"^^ . + . + "fn"^^ . + "aprender::metrics::classification"^^ . + "f1_score"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "precision"^^ . + "crates/aprender-core/src/metrics/classification.rs"^^ . + . + "fn"^^ . + "aprender::metrics::classification"^^ . + "precision"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "recall"^^ . + "crates/aprender-core/src/metrics/classification.rs"^^ . + . + "fn"^^ . + "aprender::metrics::classification"^^ . + "recall"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "inertia"^^ . + "crates/aprender-core/src/metrics/mod.rs"^^ . + . + "fn"^^ . + "aprender::metrics"^^ . + "inertia"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "mae"^^ . + "crates/aprender-core/src/metrics/mod.rs"^^ . + . + "fn"^^ . + "aprender::metrics"^^ . + "mae"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "mse"^^ . + "crates/aprender-core/src/metrics/mod.rs"^^ . + . + "fn"^^ . + "aprender::metrics"^^ . + "mse"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "r_squared"^^ . + "crates/aprender-core/src/metrics/mod.rs"^^ . + . + "fn"^^ . + "aprender::metrics"^^ . + "r_squared"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "hit_at_k"^^ . + "crates/aprender-core/src/metrics/ranking.rs"^^ . + . + "fn"^^ . + "aprender::metrics::ranking"^^ . + "hit_at_k"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "mrr"^^ . + "crates/aprender-core/src/metrics/ranking.rs"^^ . + . + "fn"^^ . + "aprender::metrics::ranking"^^ . + "mrr"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "ndcg_at_k"^^ . + "crates/aprender-core/src/metrics/ranking.rs"^^ . + . + "fn"^^ . + "aprender::metrics::ranking"^^ . + "ndcg_at_k"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "reciprocal_rank"^^ . + "crates/aprender-core/src/metrics/ranking.rs"^^ . + . + "fn"^^ . + "aprender::metrics::ranking"^^ . + "reciprocal_rank"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "rmse"^^ . + "crates/aprender-core/src/metrics/mod.rs"^^ . + . + "fn"^^ . + "aprender::metrics"^^ . + "rmse"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "silhouette_coefficient"^^ . + "crates/aprender-core/src/metrics/mod.rs"^^ . + . + "fn"^^ . + "aprender::metrics"^^ . + "silhouette_coefficient"^^ . + "true"^^ . + "private"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "silhouette_score"^^ . + "crates/aprender-core/src/metrics/mod.rs"^^ . + . + "fn"^^ . + "aprender::metrics"^^ . + "silhouette_score"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "cls_pooling"^^ . + . + "aprender::models::bert"^^ . + "cls_embedding"^^ . + "false"^^ . + "no `fn cls_embedding` (free or in an impl) in `crates/aprender-core/src/models/bert/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "encoder_layer"^^ . + . + "aprender::models::bert"^^ . + "forward"^^ . + "false"^^ . + "no `fn forward` (free or in an impl) in `crates/aprender-core/src/models/bert/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "swiglu_expansion"^^ . + . + "aprender::models::qwen2::constructors"^^ . + "new"^^ . + "false"^^ . + "no `mod constructors` or `use … constructors` in `crates/aprender-core/src/models/qwen2/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "total_parameters"^^ . + . + "aprender::models::qwen2::constructors"^^ . + "weight_names"^^ . + "false"^^ . + "no `mod constructors` or `use … constructors` in `crates/aprender-core/src/models/qwen2/mod.rs`"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "kv_projection"^^ . + "q_projection"^^ . + "crates/aprender-core/src/models/qwen2/mod.rs"^^ . + . + "method"^^ . + "aprender::models::qwen2"^^ . + "weight"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "gelu"^^ . + "crates/aprender-core/src/nn/functional.rs"^^ . + . + "fn"^^ . + "aprender::nn::functional"^^ . + "gelu"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "relu"^^ . + "crates/aprender-core/src/nn/functional.rs"^^ . + . + "fn"^^ . + "aprender::nn::functional"^^ . + "relu"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "numerical_stability"^^ . + "softmax"^^ . + "crates/aprender-core/src/nn/functional.rs"^^ . + . + . + "fn"^^ . + "aprender::nn::functional"^^ . + "softmax"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "seed_determinism"^^ . + "temperature_bounds"^^ . + "crates/aprender-core/src/nn/generation/mod.rs"^^ . + . + "method"^^ . + "aprender::nn::generation"^^ . + "with_temperature"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "top_k_top_p_interaction"^^ . + "crates/aprender-core/src/nn/generation/mod.rs"^^ . + . + "method"^^ . + "aprender::nn::generation"^^ . + "with_top_p"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "rope_position_encoding"^^ . + . + "aprender::nn::rope::RotaryPositionEmbedding"^^ . + "validate_config"^^ . + "false"^^ . + "no `mod rope` or `use … rope` in `crates/aprender-core/src/nn/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "bidirectional_attention"^^ . + . + "aprender::nn::transformer"^^ . + "bidirectional_attention"^^ . + "false"^^ . + "no `fn bidirectional_attention` (free or in an impl) in `crates/aprender-core/src/nn/transformer/mod.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "attention"^^ . + "attention_mechanism"^^ . + "scaled_dot_product"^^ . + "crates/aprender-core/src/nn/transformer/mod.rs"^^ . + . + . + . + "fn"^^ . + "aprender::nn::transformer"^^ . + "scaled_dot_product_attention"^^ . + "true"^^ . + "private"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "two_loop_recursion"^^ . + "crates/aprender-core/src/optim/lbfgs.rs"^^ . + . + "method"^^ . + "aprender::optim::lbfgs"^^ . + "compute_direction"^^ . + "true"^^ . + "private"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender"^^ . + "nonfinite_input_status"^^ . + "crates/aprender-core/src/optim/lbfgs.rs"^^ . + . + "method"^^ . + "aprender::optim::lbfgs"^^ . + "minimize"^^ . + "true"^^ . + "private"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "quantization_bounds"^^ . + . + "aprender::quantize"^^ . + "quantize_tensor"^^ . + "false"^^ . + "no `mod quantize` or `use … quantize` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "header_size_validation"^^ . + . + "aprender::safetensors::reader"^^ . + "validate_header"^^ . + "false"^^ . + "no `mod safetensors` or `use … safetensors` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "concurrent_model_access"^^ . + . + "aprender::serve"^^ . + "run"^^ . + "false"^^ . + "no `mod serve` or `use … serve` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "artifact_doc_schema"^^ . + . + "aprender::setfit::artifact"^^ . + "SetFitArtifactDoc"^^ . + "false"^^ . + "no `fn SetFitArtifactDoc` (free or in an impl) in `crates/aprender-core/src/setfit/artifact.rs`"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "canonical_tensor_names"^^ . + "crates/aprender-core/src/setfit/artifact.rs"^^ . + . + "fn"^^ . + "aprender::setfit::artifact"^^ . + "canonical_name_for_hf"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "aprender"^^ . + "architecture_derived_tensor_set"^^ . + "crates/aprender-core/src/setfit/artifact.rs"^^ . + . + "fn"^^ . + "aprender::setfit::artifact"^^ . + "expected_tensor_names"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "nullable_path_allowlist"^^ . + "crates/aprender-core/src/setfit/artifact.rs"^^ . + . + "fn"^^ . + "aprender::setfit::artifact"^^ . + "first_unallowed_null_path"^^ . + "true"^^ . + "private"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "artifact_size_bounds"^^ . + "load_validation_ladder"^^ . + "crates/aprender-core/src/setfit/artifact.rs"^^ . + . + "fn"^^ . + "aprender::setfit::artifact"^^ . + "load_setfit_apr"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "bounded_read"^^ . + "crates/aprender-core/src/setfit/artifact.rs"^^ . + . + "fn"^^ . + "aprender::setfit::artifact"^^ . + "read_setfit_apr_bytes_bounded"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "probe_policy"^^ . + "crates/aprender-core/src/setfit/artifact.rs"^^ . + . + "fn"^^ . + "aprender::setfit::artifact"^^ . + "rung8_replay_probes"^^ . + "true"^^ . + "private"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "probe_and_parity_tolerances"^^ . + "crates/aprender-core/src/setfit/artifact.rs"^^ . + . + "fn"^^ . + "aprender::setfit::artifact"^^ . + "within"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "artifact_storage_map"^^ . + "d02_typed_key_amendment"^^ . + "crates/aprender-core/src/setfit/artifact.rs"^^ . + . + "fn"^^ . + "aprender::setfit::artifact"^^ . + "write_setfit_apr"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "classify_response_schema"^^ . + . + "aprender::setfit::classify"^^ . + "ClassifyResponse"^^ . + "false"^^ . + "no `fn ClassifyResponse` (free or in an impl) in `crates/aprender-core/src/setfit/classify.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "backend_identity"^^ . + . + "aprender::setfit::encoder::ExecutionBackend"^^ . + "identity"^^ . + "false"^^ . + "no `mod ExecutionBackend` or `use … ExecutionBackend` in `crates/aprender-core/src/setfit/encoder.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "roundtrip_encoding"^^ . + "tokenizer_consistency"^^ . + . + . + "aprender::tokenizer"^^ . + "encode"^^ . + "false"^^ . + "no `mod tokenizer` or `use … tokenizer` in `crates/aprender-core/src/lib.rs`"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "gini_impurity"^^ . + "crates/aprender-core/src/tree/helpers.rs"^^ . + . + "fn"^^ . + "aprender::tree::helpers"^^ . + "gini_impurity"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "aprender"^^ . + "gini_split"^^ . + "crates/aprender-core/src/tree/helpers.rs"^^ . + . + "fn"^^ . + "aprender::tree::helpers"^^ . + "gini_split"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "mse_split"^^ . + . + "aprender::tree::helpers_part_02"^^ . + "compute_mse"^^ . + "false"^^ . + "no `mod helpers_part_02` or `use … helpers_part_02` in `crates/aprender-core/src/tree/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender"^^ . + "mse_split"^^ . + . + "aprender::tree::regression_helpers"^^ . + "compute_mse"^^ . + "false"^^ . + "no `mod regression_helpers` or `use … regression_helpers` in `crates/aprender-core/src/tree/mod.rs`"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "dataset_attestation"^^ . + . + "aprender_contrastive_data::attestation::PreparedDataset::"^^ . + "from_attested_bytes"^^ . + "false"^^ . + "no `mod PreparedDataset` or `use … PreparedDataset` in `crates/aprender-contrastive-data/src/prepared.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "cross_split_exclusion"^^ . + "crates/aprender-contrastive-data/src/dedup.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::dedup"^^ . + "coalesced_exclusions"^^ . + "true"^^ . + "pub(crate)"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "normalized_content_hash"^^ . + "crates/aprender-contrastive-data/src/hash.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::hash"^^ . + "normalized_hash"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "access_ledger_persistence"^^ . + . + "aprender_contrastive_data::ledger::AccessLedger"^^ . + "to_canonical_bytes"^^ . + "false"^^ . + "no `mod AccessLedger` or `use … AccessLedger` in `crates/aprender-contrastive-data/src/ledger.rs`"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "pair_manifest_replay"^^ . + . + "aprender_contrastive_data::manifest::PairReplayRecord"^^ . + "to_config"^^ . + "false"^^ . + "no `mod PairReplayRecord` or `use … PairReplayRecord` in `crates/aprender-contrastive-data/src/manifest.rs`"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "selection_canonical_payload"^^ . + . + "aprender_contrastive_data::manifest::SelectionPayload"^^ . + "to_canonical_bytes"^^ . + "false"^^ . + "no `mod SelectionPayload` or `use … SelectionPayload` in `crates/aprender-contrastive-data/src/manifest.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "pair_manifest_hash"^^ . + "crates/aprender-contrastive-data/src/manifest.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::manifest"^^ . + "pair_manifest_hash"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "canonical_pair"^^ . + . + "aprender_contrastive_data::pairs::CanonicalPair"^^ . + "new"^^ . + "false"^^ . + "no `mod CanonicalPair` or `use … CanonicalPair` in `crates/aprender-contrastive-data/src/pairs.rs`"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "pair_stream"^^ . + . + "aprender_contrastive_data::pairs::PairLayout"^^ . + "raw_pair_at"^^ . + "false"^^ . + "no `mod PairLayout` or `use … PairLayout` in `crates/aprender-contrastive-data/src/pairs.rs`"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "singleton_policy"^^ . + . + "aprender_contrastive_data::pairs::PairSampler"^^ . + "new"^^ . + "false"^^ . + "no `mod PairSampler` or `use … PairSampler` in `crates/aprender-contrastive-data/src/pairs.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "pair_stream_degenerate_policy"^^ . + "crates/aprender-contrastive-data/src/pairs.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::pairs"^^ . + "classify_degenerate"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "default_epoch_budget"^^ . + "crates/aprender-contrastive-data/src/pairs.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::pairs"^^ . + "effective_default_budget"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "negative_capacity"^^ . + "crates/aprender-contrastive-data/src/pairs.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::pairs"^^ . + "negative_capacity"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "positive_capacity"^^ . + "crates/aprender-contrastive-data/src/pairs.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::pairs"^^ . + "positive_capacity"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "budget_resolution"^^ . + "crates/aprender-contrastive-data/src/pairs.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::pairs"^^ . + "resolve_budget"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "split_span_fail_closed"^^ . + "untrusted_pair_ingest"^^ . + "crates/aprender-contrastive-data/src/pairs.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::pairs"^^ . + "validate_pair_records"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "prepared_dataset_typestate"^^ . + . + "aprender_contrastive_data::prepared::PreparedDataset::"^^ . + "from_labeled_rows"^^ . + "false"^^ . + "no `mod PreparedDataset` or `use … PreparedDataset` in `crates/aprender-contrastive-data/src/prepared.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "bounded_draw"^^ . + "crates/aprender-contrastive-data/src/rng.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::rng"^^ . + "bounded"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "rng_key_derivation"^^ . + "crates/aprender-contrastive-data/src/rng.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::rng"^^ . + "derive_key"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "rng_domain_strings"^^ . + "crates/aprender-contrastive-data/src/rng.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::rng::domains"^^ . + "select"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "few_shot_selection"^^ . + . + "aprender_contrastive_data::select::FewShotSelector"^^ . + "select"^^ . + "false"^^ . + "no `mod FewShotSelector` or `use … FewShotSelector` in `crates/aprender-contrastive-data/src/select.rs`"^^ . + . + . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "selection_replay"^^ . + . + "aprender_contrastive_data::select::Selection"^^ . + "replay"^^ . + "false"^^ . + "no `mod Selection` or `use … Selection` in `crates/aprender-contrastive-data/src/select.rs`"^^ . + . + . + "doc"^^ . + "provable_contracts_macros::contract"^^ . + "implemented"^^ . + "aprender_contrastive_data"^^ . + "split_ingest_boundary"^^ . + "crates/aprender-contrastive-data/src/split.rs"^^ . + . + "fn"^^ . + "aprender_contrastive_data::split"^^ . + "validate_ingest_ladder"^^ . + "true"^^ . + "private"^^ . + . + . + "implemented"^^ . + "entrenar"^^ . + "matvec_matmul_assoc"^^ . + . + "entrenar::autograd"^^ . + "matmul"^^ . + "false"^^ . + "no `fn matmul` (free or in an impl) in `crates/aprender-train/src/autograd/mod.rs`"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "entrenar"^^ . + "composed_affine"^^ . + "crates/aprender-train/src/lora/layer/core.rs"^^ . + . + "method"^^ . + "entrenar::lora::layer::core"^^ . + "forward"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "entrenar"^^ . + "merge_distributivity"^^ . + "crates/aprender-train/src/lora/layer/core.rs"^^ . + . + "method"^^ . + "entrenar::lora::layer::core"^^ . + "merge"^^ . + "true"^^ . + "pub"^^ . + . + . + "implemented"^^ . + "entrenar"^^ . + "doc_bundle_bijection"^^ . + . + "entrenar::train::setfit::apr_codec"^^ . + "deserialize"^^ . + "false"^^ . + "no `mod setfit` or `use … setfit` in `crates/aprender-train/src/train/mod.rs`"^^ . + . + . + "implemented"^^ . + "entrenar"^^ . + "linear_probe"^^ . + . + "entrenar::train::setfit::baseline"^^ . + "fit"^^ . + "false"^^ . + "no `mod setfit` or `use … setfit` in `crates/aprender-train/src/train/mod.rs`"^^ . + . + . + "implemented"^^ . + "entrenar"^^ . + "selection_lock_lifecycle"^^ . + . + "entrenar::train::setfit::lock"^^ . + "mint_test_token"^^ . + "false"^^ . + "no `mod setfit` or `use … setfit` in `crates/aprender-train/src/train/mod.rs`"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "realizar"^^ . + "anthropic_roundtrip_exact"^^ . + "crates/aprender-serve/src/harness_ir/mod.rs"^^ . + . + "fn"^^ . + "realizar::harness_ir"^^ . + "from_anthropic"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "implemented"^^ . + "realizar"^^ . + "gemini_roundtrip_exact_on_native"^^ . + "crates/aprender-serve/src/harness_ir/mod.rs"^^ . + . + "fn"^^ . + "realizar::harness_ir"^^ . + "from_gemini"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "realizar"^^ . + "cross_harness_semantic_equivalence"^^ . + "crates/aprender-serve/src/harness_ir/mod.rs"^^ . + . + "method"^^ . + "realizar::harness_ir"^^ . + "semantic"^^ . + "true"^^ . + "pub"^^ . + . + . + "doc"^^ . + "must_use"^^ . + "implemented"^^ . + "realizar"^^ . + "tool_schema_lossless"^^ . + "crates/aprender-serve/src/harness_ir/mod.rs"^^ . + . + "fn"^^ . + "realizar::harness_ir"^^ . + "tool_to_anthropic"^^ . + "true"^^ . + "pub"^^ . + . + . + "admitted"^^ . + "AbsolutePosition"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AbsolutePosition/Core.lean"^^ . + "ProvableContracts.Theorems.AbsolutePosition.Core"^^ . + "abs_add_identity"^^ . + "false"^^ . + . + . + "admitted"^^ . + "AbsolutePosition"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AbsolutePosition/Core.lean"^^ . + "ProvableContracts.Theorems.AbsolutePosition.Core"^^ . + "abs_add_shape"^^ . + "false"^^ . + . + . + "admitted"^^ . + "AbsolutePosition"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AbsolutePosition/Core.lean"^^ . + "ProvableContracts.Theorems.AbsolutePosition.Core"^^ . + "pe_even_at_zero"^^ . + "false"^^ . + . + . + "admitted"^^ . + "AbsolutePosition"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AbsolutePosition/Core.lean"^^ . + "ProvableContracts.Theorems.AbsolutePosition.Core"^^ . + "pe_even_bound"^^ . + "false"^^ . + . + . + "admitted"^^ . + "AbsolutePosition"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AbsolutePosition/Core.lean"^^ . + "ProvableContracts.Theorems.AbsolutePosition.Core"^^ . + "pe_even_rotation"^^ . + "false"^^ . + . + . + "admitted"^^ . + "AbsolutePosition"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AbsolutePosition/Core.lean"^^ . + "ProvableContracts.Theorems.AbsolutePosition.Core"^^ . + "pe_odd_at_zero"^^ . + "false"^^ . + . + . + "admitted"^^ . + "AbsolutePosition"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AbsolutePosition/Core.lean"^^ . + "ProvableContracts.Theorems.AbsolutePosition.Core"^^ . + "pe_odd_bound"^^ . + "false"^^ . + . + . + "admitted"^^ . + "AbsolutePosition"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AbsolutePosition/Core.lean"^^ . + "ProvableContracts.Theorems.AbsolutePosition.Core"^^ . + "pe_odd_rotation"^^ . + "false"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Adam_Moments.lean"^^ . + . + "ProvableContracts.Theorems.AdamW.Adam_Moments"^^ . + "adam_moment_bounded"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Adam_Moments.lean"^^ . + . + "ProvableContracts.Theorems.AdamW.Adam_Moments"^^ . + "adam_moments"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Adam_Variance.lean"^^ . + . + "ProvableContracts.Theorems.AdamW.Adam_Variance"^^ . + "adam_variance"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Analytic.lean"^^ . + "ProvableContracts.Theorems.AdamW.Analytic"^^ . + "bias_denom_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Analytic.lean"^^ . + "ProvableContracts.Theorems.AdamW.Analytic"^^ . + "denom_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Analytic.lean"^^ . + "ProvableContracts.Theorems.AdamW.Analytic"^^ . + "loop_variant_decreasing"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Analytic.lean"^^ . + "ProvableContracts.Theorems.AdamW.Analytic"^^ . + "loop_variant_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Analytic.lean"^^ . + "ProvableContracts.Theorems.AdamW.Analytic"^^ . + "precondition_satisfiable"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Analytic.lean"^^ . + "ProvableContracts.Theorems.AdamW.Analytic"^^ . + "v_seq_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Analytic.lean"^^ . + "ProvableContracts.Theorems.AdamW.Analytic"^^ . + "variance_update_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Analytic.lean"^^ . + "ProvableContracts.Theorems.AdamW.Analytic"^^ . + "vhat_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Bias_Correction.lean"^^ . + . + "ProvableContracts.Theorems.AdamW.Bias_Correction"^^ . + "bias_correction"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/WeightDecay.lean"^^ . + . + "ProvableContracts.Theorems.AdamW.WeightDecay"^^ . + "decay_update_eq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/WeightDecay.lean"^^ . + "ProvableContracts.Theorems.AdamW.WeightDecay"^^ . + "weight_decay_reduces_magnitude"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/WeightDecay.lean"^^ . + "ProvableContracts.Theorems.AdamW.WeightDecay"^^ . + "weight_decay_strict"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AdamW"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AdamW/Weight_Update.lean"^^ . + . + "ProvableContracts.Theorems.AdamW.Weight_Update"^^ . + "weight_update"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "alibi_bias_antitone"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "alibi_bias_linear"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "alibi_bias_nonpos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "alibi_bias_self"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "alibi_causal_keeps_past"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "alibi_causal_masks_future"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "alibi_slope_antitone"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "alibi_slope_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "dist_comm"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Basic.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Basic"^^ . + "dist_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Slopes.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Slopes"^^ . + "alibi_head_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Slopes.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Slopes"^^ . + "alibi_head_zero_eight"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Slopes.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Slopes"^^ . + "alibi_slope_ggml"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Slopes.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Slopes"^^ . + "alibi_slope_lt_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Slopes.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Slopes"^^ . + "alibi_slope_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Alibi"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Alibi/Slopes.lean"^^ . + . + "ProvableContracts.Theorems.Alibi.Slopes"^^ . + "alibi_slope_strict_anti"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "block_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "cross_harness_block"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "cross_harness_list"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "gem_block_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "gem_list_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "list_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "message_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "tool_anth_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "tool_gem_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "AprCode"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/AprCode/HarnessIrRoundtrip.lean"^^ . + "ProvableContracts.Theorems.AprCode.HarnessIrRoundtrip"^^ . + "tool_schema_identical"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "attention_output_bounded"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "attention_weight_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "attention_weights_bounded"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "attention_weights_sum_to_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "causal_mask_zeroes_future"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "convex_comb_le"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "le_convex_comb"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "scale_factor_ne_linear"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "scale_factor_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/ScaledDotProduct.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.ScaledDotProduct"^^ . + "scale_factor_sq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "attention_entropy_le_log_card"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "attention_entropy_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "dot_sq_le"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "mean_smul"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "scaledScores_apply"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "scaled_score_abs_le_sqrt"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "softmax_le_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "softmax_max_subtraction_invariant"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "variance_scaled_by_inv_sqrt_normalizes"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Attention"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Attention/Scaling.lean"^^ . + . + . + "ProvableContracts.Theorems.Attention.Scaling"^^ . + "variance_smul"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BLAS"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BLAS/SyrkSymmetric.lean"^^ . + "ProvableContracts.Theorems.BLAS.SyrkSymmetric"^^ . + "syrk_symmetric"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BLAS"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BLAS/SyrkSymmetric.lean"^^ . + "ProvableContracts.Theorems.BLAS.SyrkSymmetric"^^ . + "syrk_symmetric_elem"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BLAS"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BLAS/Trmm.lean"^^ . + "ProvableContracts.Theorems.BLAS.Trmm"^^ . + "trmm_assoc"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BLAS"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BLAS/Trsm.lean"^^ . + "ProvableContracts.Theorems.BLAS.Trsm"^^ . + "trsm_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BatchNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BatchNorm/Centering.lean"^^ . + "ProvableContracts.Theorems.BatchNorm.Centering"^^ . + "batchnorm_centering_unit_gamma"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BatchNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BatchNorm/Centering.lean"^^ . + "ProvableContracts.Theorems.BatchNorm.Centering"^^ . + "batchnorm_output_mean"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BatchNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BatchNorm/Centering.lean"^^ . + "ProvableContracts.Theorems.BatchNorm.Centering"^^ . + "sum_centered_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BatchNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BatchNorm/DenominatorPositive.lean"^^ . + "ProvableContracts.Theorems.BatchNorm.DenominatorPositive"^^ . + "batchVar_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BatchNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BatchNorm/DenominatorPositive.lean"^^ . + "ProvableContracts.Theorems.BatchNorm.DenominatorPositive"^^ . + "bn_denom_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BatchNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BatchNorm/EvalUsesRunning.lean"^^ . + "ProvableContracts.Theorems.BatchNorm.EvalUsesRunning"^^ . + "batchnorm_eval_ne_train"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BatchNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BatchNorm/RunningVariance.lean"^^ . + "ProvableContracts.Theorems.BatchNorm.RunningVariance"^^ . + "ema_fold_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "BatchNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/BatchNorm/RunningVariance.lean"^^ . + "ProvableContracts.Theorems.BatchNorm.RunningVariance"^^ . + "ema_step_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CMAES"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CMAES/CovariancePositiveDefinite.lean"^^ . + "ProvableContracts.Theorems.CMAES.CovariancePositiveDefinite"^^ . + "covUpdate_quadForm_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CMAES"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CMAES/CovarianceSymmetry.lean"^^ . + "ProvableContracts.Theorems.CMAES.CovarianceSymmetry"^^ . + "covUpdate_symmetric"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CMAES"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CMAES/CovarianceSymmetry.lean"^^ . + "ProvableContracts.Theorems.CMAES.CovarianceSymmetry"^^ . + "covUpdate_symmetric_elem"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CMAES"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CMAES/StepSizePositive.lean"^^ . + "ProvableContracts.Theorems.CMAES.StepSizePositive"^^ . + "stepSizeIterate_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CMAES"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CMAES/StepSizePositive.lean"^^ . + "ProvableContracts.Theorems.CMAES.StepSizePositive"^^ . + "stepSize_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CMAES"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CMAES/WeightsNormalized.lean"^^ . + "ProvableContracts.Theorems.CMAES.WeightsNormalized"^^ . + "weights_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CMAES"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CMAES/WeightsNormalized.lean"^^ . + "ProvableContracts.Theorems.CMAES.WeightsNormalized"^^ . + "weights_sum_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Cholesky"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Cholesky/SPD.lean"^^ . + "ProvableContracts.Theorems.Cholesky.SPD"^^ . + "cholesky_product_psd"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Cholesky"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Cholesky/SPD.lean"^^ . + "ProvableContracts.Theorems.Cholesky.SPD"^^ . + "cholesky_product_symmetric"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/Bound.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.Bound"^^ . + "conv_abs_le"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/Linearity.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.Linearity"^^ . + "conv_add"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/Linearity.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.Linearity"^^ . + "conv_linear"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/Linearity.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.Linearity"^^ . + "conv_smul"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/OutputLength.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.OutputLength"^^ . + "conv1d_valid_length"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/OutputLength.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.OutputLength"^^ . + "conv1d_valid_length_eq_outLen"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/OutputLength.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.OutputLength"^^ . + "outLen_valid"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/ShiftEquivariance.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.ShiftEquivariance"^^ . + "conv_shift"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/ShiftEquivariance.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.ShiftEquivariance"^^ . + "conv_shift_eq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/ZeroInput.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.ZeroInput"^^ . + "conv_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Conv1D"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Conv1D/ZeroInput.lean"^^ . + . + "ProvableContracts.Theorems.Conv1D.ZeroInput"^^ . + "conv_zero_eq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "cross_entropy_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "dot_nonpos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "log_softmax_decomp"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "log_softmax_nonpos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "lsum_cons"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "lsum_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "mul_nonpos_of_nonneg_nonpos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "softmax_denom_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "softmax_num_le_denom"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "softmax_num_lt_denom"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/CoreSoftmaxInvariants.lean"^^ . + . + "ProvableContracts.Theorems.CrossEntropy.CoreSoftmaxInvariants"^^ . + "softmax_partition"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/LogSoftmaxBound.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.LogSoftmaxBound"^^ . + "exp_le_sum"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/LogSoftmaxBound.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.LogSoftmaxBound"^^ . + "log_softmax_le_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/LogSoftmaxBound.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.LogSoftmaxBound"^^ . + "partition_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/NonNegativity.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.NonNegativity"^^ . + "cross_entropy_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/SoftmaxBackward.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.SoftmaxBackward"^^ . + "ce_onehot_backward"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/SoftmaxBackward.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.SoftmaxBackward"^^ . + "cross_entropy_eq_nll"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/SoftmaxBackward.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.SoftmaxBackward"^^ . + "cross_entropy_onehot_backward"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/SoftmaxBackward.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.SoftmaxBackward"^^ . + "cross_entropy_onehot_eq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "CrossEntropy"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/CrossEntropy/SoftmaxBackward.lean"^^ . + "ProvableContracts.Theorems.CrossEntropy.SoftmaxBackward"^^ . + "hasDerivAt_log_exp_add_const"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/AddCommutative.lean"^^ . + "ProvableContracts.Theorems.Elementwise.AddCommutative"^^ . + "add_assoc_vec"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/AddCommutative.lean"^^ . + "ProvableContracts.Theorems.Elementwise.AddCommutative"^^ . + "add_comm_vec"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/LeakyReLU.lean"^^ . + "ProvableContracts.Theorems.Elementwise.LeakyReLU"^^ . + "leaky_relu_nonneg_of_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/LeakyReLU.lean"^^ . + "ProvableContracts.Theorems.Elementwise.LeakyReLU"^^ . + "leaky_relu_of_neg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/LeakyReLU.lean"^^ . + "ProvableContracts.Theorems.Elementwise.LeakyReLU"^^ . + "leaky_relu_of_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/MulScalarAssoc.lean"^^ . + "ProvableContracts.Theorems.Elementwise.MulScalarAssoc"^^ . + "mul_scalar_add_distrib"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/MulScalarAssoc.lean"^^ . + "ProvableContracts.Theorems.Elementwise.MulScalarAssoc"^^ . + "mul_scalar_assoc"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/ReLUNonNeg.lean"^^ . + . + "ProvableContracts.Theorems.Elementwise.ReLUNonNeg"^^ . + "relu_idempotent"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/ReLUNonNeg.lean"^^ . + . + "ProvableContracts.Theorems.Elementwise.ReLUNonNeg"^^ . + "relu_monotone"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/ReLUNonNeg.lean"^^ . + . + "ProvableContracts.Theorems.Elementwise.ReLUNonNeg"^^ . + "relu_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/ReLUNonNeg.lean"^^ . + . + "ProvableContracts.Theorems.Elementwise.ReLUNonNeg"^^ . + "relu_of_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Elementwise"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Elementwise/ReLUNonNeg.lean"^^ . + . + "ProvableContracts.Theorems.Elementwise.ReLUNonNeg"^^ . + "relu_of_nonpos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "embed_dim"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "mean_pool_smul"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "onehot_select"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "sum_pool_add"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "sum_pool_smul"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "temp_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "tied_apply"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "tied_row_eq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "token_lt_vocab"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "token_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "unembed_apply"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Algebra.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Algebra"^^ . + "unembed_shape"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Bounds.lean"^^ . + . + . + "ProvableContracts.Theorems.Embedding.Bounds"^^ . + "gather_hits_table"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Bounds.lean"^^ . + . + . + "ProvableContracts.Theorems.Embedding.Bounds"^^ . + "gather_inbounds"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Determinism.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Determinism"^^ . + "gather_deterministic"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Determinism.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Determinism"^^ . + "gather_self_eq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Finite.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Finite"^^ . + "gather_finite"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Finite.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Finite"^^ . + "gather_preserves"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Rows.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Rows"^^ . + "gather_row"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Rows.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Rows"^^ . + "gather_scatter_id"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Shape.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Shape"^^ . + "gather_length"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Embedding"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Embedding/Shape.lean"^^ . + . + "ProvableContracts.Theorems.Embedding.Shape"^^ . + "gather_length_seq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "F16"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/F16/Conversion.lean"^^ . + "ProvableContracts.Theorems.F16.Conversion"^^ . + "bias_trick_correct"^^ . + "true"^^ . + . + . + "grounded"^^ . + "F16"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/F16/Conversion.lean"^^ . + "ProvableContracts.Theorems.F16.Conversion"^^ . + "exp_rebiased"^^ . + "true"^^ . + . + . + "grounded"^^ . + "F16"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/F16/Conversion.lean"^^ . + "ProvableContracts.Theorems.F16.Conversion"^^ . + "mant_padding_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "F16"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/F16/Conversion.lean"^^ . + "ProvableContracts.Theorems.F16.Conversion"^^ . + "mant_preserved"^^ . + "true"^^ . + . + . + "grounded"^^ . + "F16"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/F16/Conversion.lean"^^ . + . + . + "ProvableContracts.Theorems.F16.Conversion"^^ . + "roundtrip_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "F16"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/F16/Conversion.lean"^^ . + "ProvableContracts.Theorems.F16.Conversion"^^ . + "sign_preserved"^^ . + "true"^^ . + . + . + "grounded"^^ . + "F16"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/F16/Conversion.lean"^^ . + "ProvableContracts.Theorems.F16.Conversion"^^ . + "toF32Bits_monotone"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Bluestein.lean"^^ . + "ProvableContracts.Theorems.FFT.Bluestein"^^ . + "bluestein_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Fft2d.lean"^^ . + "ProvableContracts.Theorems.FFT.Fft2d"^^ . + "fft2d_separable"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Fft3d.lean"^^ . + "ProvableContracts.Theorems.FFT.Fft3d"^^ . + "fft3d_separable"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/FftBatched.lean"^^ . + "ProvableContracts.Theorems.FFT.FftBatched"^^ . + "batch_independence"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Parseval.lean"^^ . + "ProvableContracts.Theorems.FFT.Parseval"^^ . + "becomes"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Parseval.lean"^^ . + "ProvableContracts.Theorems.FFT.Parseval"^^ . + "dft_singleton"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Parseval.lean"^^ . + "ProvableContracts.Theorems.FFT.Parseval"^^ . + "energy_eq_of_eq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Parseval.lean"^^ . + "ProvableContracts.Theorems.FFT.Parseval"^^ . + "energy_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Parseval.lean"^^ . + "ProvableContracts.Theorems.FFT.Parseval"^^ . + "for"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Parseval.lean"^^ . + "ProvableContracts.Theorems.FFT.Parseval"^^ . + "parseval_singleton"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FFT"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FFT/Parseval.lean"^^ . + "ProvableContracts.Theorems.FFT.Parseval"^^ . + "twiddle_zero_left"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "clampMag_le"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "clampMag_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "decode_abs_le"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "gridRound_mono"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "range_e4m3"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "range_e5m2"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "roundtrip_e4m3"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "roundtrip_e5m2"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "roundtrip_ulp"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "sign_preservation_neg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "sign_preservation_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "FP8"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/FP8/Interchange.lean"^^ . + . + "ProvableContracts.Theorems.FP8.Interchange"^^ . + "zero_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Fusion"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Fusion/Correctness.lean"^^ . + "ProvableContracts.Theorems.Fusion.Correctness"^^ . + "gemm_bias_gelu_fusion"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Fusion"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Fusion/Correctness.lean"^^ . + "ProvableContracts.Theorems.Fusion.Correctness"^^ . + "is"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Fusion"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Fusion/Correctness.lean"^^ . + "ProvableContracts.Theorems.Fusion.Correctness"^^ . + "matvec_append"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Fusion"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Fusion/Correctness.lean"^^ . + "ProvableContracts.Theorems.Fusion.Correctness"^^ . + "matvec_append3"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Fusion"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Fusion/Correctness.lean"^^ . + "ProvableContracts.Theorems.Fusion.Correctness"^^ . + "pipeline_fusion_correct"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Fusion"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Fusion/Correctness.lean"^^ . + . + "ProvableContracts.Theorems.Fusion.Correctness"^^ . + "swiglu_fusion_correct"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GEMV"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GEMV/Correctness.lean"^^ . + "ProvableContracts.Theorems.GEMV.Correctness"^^ . + "gemv_element"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GEMV"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GEMV/Correctness.lean"^^ . + "ProvableContracts.Theorems.GEMV.Correctness"^^ . + "gemv_output_type"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GPU"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GPU/DimensionIndependence.lean"^^ . + "ProvableContracts.Theorems.GPU.DimensionIndependence"^^ . + "const_is_dimension_independent"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "conv1d_causal"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "conv1d_future_indep"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "decay_lt_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "decay_mem_unit_interval"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "decay_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "l2norm_pos_of_ne"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "normSq_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "normSq_pos_of_ne"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "normalize_same_direction"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "normalize_scalar_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "outer_shape"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "write_iterate_preserves_shape"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GatedDeltaNet"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GatedDeltaNet/Recurrence.lean"^^ . + . + "ProvableContracts.Theorems.GatedDeltaNet.Recurrence"^^ . + "write_preserves_shape"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gelu"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gelu/GeluBounds.lean"^^ . + . + . + "ProvableContracts.Theorems.Gelu.GeluBounds"^^ . + "gelu_le_self_of_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gelu"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gelu/GeluBounds.lean"^^ . + . + . + "ProvableContracts.Theorems.Gelu.GeluBounds"^^ . + "gelu_nonneg_of_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gelu"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gelu/GeluMono.lean"^^ . + . + . + "ProvableContracts.Theorems.Gelu.GeluMono"^^ . + "gelu_strictMono_of_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gelu"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gelu/GeluMono.lean"^^ . + . + . + "ProvableContracts.Theorems.Gelu.GeluMono"^^ . + "tanh_strictMono"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gelu"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gelu/GeluSign.lean"^^ . + . + . + "ProvableContracts.Theorems.Gelu.GeluSign"^^ . + "gelu_nonneg_of_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gelu"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gelu/GeluSign.lean"^^ . + . + . + "ProvableContracts.Theorems.Gelu.GeluSign"^^ . + "gelu_nonpos_of_neg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gelu"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gelu/GeluSign.lean"^^ . + . + . + "ProvableContracts.Theorems.Gelu.GeluSign"^^ . + "gelu_right_factor_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gelu"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gelu/GeluZero.lean"^^ . + . + . + "ProvableContracts.Theorems.Gelu.GeluZero"^^ . + "gelu_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GgufExportSymmetry"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GgufExportSymmetry/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.GgufExportSymmetry.Roundtrip"^^ . + "dtype_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GgufExportSymmetry"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GgufExportSymmetry/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.GgufExportSymmetry.Roundtrip"^^ . + "dtype_roundtrip_section"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GgufExportSymmetry"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GgufExportSymmetry/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.GgufExportSymmetry.Roundtrip"^^ . + "export_import_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GgufExportSymmetry"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GgufExportSymmetry/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.GgufExportSymmetry.Roundtrip"^^ . + "export_preserves_shape"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GgufExportSymmetry"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GgufExportSymmetry/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.GgufExportSymmetry.Roundtrip"^^ . + "export_rejects_aprq4"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GgufExportSymmetry"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GgufExportSymmetry/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.GgufExportSymmetry.Roundtrip"^^ . + "export_rejects_aprq8"^^ . + "true"^^ . + . + . + "grounded"^^ . + "GgufExportSymmetry"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/GgufExportSymmetry/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.GgufExportSymmetry.Roundtrip"^^ . + "import_rejects_q8_0"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gqa"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gqa/ConvexBound.lean"^^ . + . + "ProvableContracts.Theorems.Gqa.ConvexBound"^^ . + "convex_combination_bounds"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gqa"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gqa/ConvexBound.lean"^^ . + . + "ProvableContracts.Theorems.Gqa.ConvexBound"^^ . + "gqa_output_convex"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gqa"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gqa/Distribution.lean"^^ . + . + "ProvableContracts.Theorems.Gqa.Distribution"^^ . + "attn_weights_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gqa"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gqa/Distribution.lean"^^ . + . + "ProvableContracts.Theorems.Gqa.Distribution"^^ . + "attn_weights_sum_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gqa"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gqa/HeadMapping.lean"^^ . + . + "ProvableContracts.Theorems.Gqa.HeadMapping"^^ . + "kvHead_eq_mul_div"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gqa"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gqa/HeadMapping.lean"^^ . + . + "ProvableContracts.Theorems.Gqa.HeadMapping"^^ . + "kvHead_group"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gqa"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gqa/HeadMapping.lean"^^ . + . + "ProvableContracts.Theorems.Gqa.HeadMapping"^^ . + "kvHead_group_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Gqa"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Gqa/HeadMapping.lean"^^ . + . + "ProvableContracts.Theorems.Gqa.HeadMapping"^^ . + "kvHead_surjective"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/Canny.lean"^^ . + "ProvableContracts.Theorems.Image.Canny"^^ . + "canny_threshold_ordering"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/ConnectedComponents.lean"^^ . + "ProvableContracts.Theorems.Image.ConnectedComponents"^^ . + "components_bounded"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/Conv2d.lean"^^ . + "ProvableContracts.Theorems.Image.Conv2d"^^ . + "conv2d_output_positive"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/Histogram.lean"^^ . + "ProvableContracts.Theorems.Image.Histogram"^^ . + "histogram_sum_const"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/HsvRoundtrip.lean"^^ . + "ProvableContracts.Theorems.Image.HsvRoundtrip"^^ . + "hsv_value_achromatic"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/Morphology.lean"^^ . + "ProvableContracts.Theorems.Image.Morphology"^^ . + "opening_anti_extensive"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/Resize.lean"^^ . + "ProvableContracts.Theorems.Image.Resize"^^ . + "lerp_bounded"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/RgbToGray.lean"^^ . + "ProvableContracts.Theorems.Image.RgbToGray"^^ . + "rgb_coefficients_sum"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/RgbToGray.lean"^^ . + "ProvableContracts.Theorems.Image.RgbToGray"^^ . + "rgb_to_gray_unit"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Image"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Image/Sobel.lean"^^ . + "ProvableContracts.Theorems.Image.Sobel"^^ . + "sobel_magnitude_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LU"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LU/Existence.lean"^^ . + . + . + . + . + . + . + . + "ProvableContracts.Theorems.LU.Existence"^^ . + "identity_is_unit_lower_triangular"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LU"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LU/Existence.lean"^^ . + . + . + . + . + . + . + . + "ProvableContracts.Theorems.LU.Existence"^^ . + "identity_is_upper_triangular"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LU"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LU/Existence.lean"^^ . + . + . + . + . + . + . + . + "ProvableContracts.Theorems.LU.Existence"^^ . + "identity_lu"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/Centering.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.Centering"^^ . + "mean_layernorm_centering"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/Centering.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.Centering"^^ . + "sum_sub_mean_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/DenominatorPositive.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.DenominatorPositive"^^ . + "ln_denom_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/DenominatorPositive.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.DenominatorPositive"^^ . + "variance_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/Idempotency.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.Idempotency"^^ . + "layernorm_id_of_normalized"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/Idempotency.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.Idempotency"^^ . + "layernorm_idempotent"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/ShiftInvariance.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.ShiftInvariance"^^ . + "centered_shift"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/ShiftInvariance.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.ShiftInvariance"^^ . + "mean_shift"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/ShiftInvariance.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.ShiftInvariance"^^ . + "variance_shift"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/Standardization.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.Standardization"^^ . + "variance_layernorm_ratio"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LayerNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LayerNorm/Standardization.lean"^^ . + . + "ProvableContracts.Theorems.LayerNorm.Standardization"^^ . + "variance_layernorm_standardized"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LoRA"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LoRA/Dare_Unbiased.lean"^^ . + . + "ProvableContracts.Theorems.LoRA.Dare_Unbiased"^^ . + "dare_unbiased"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LoRA"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LoRA/Lora_Shape.lean"^^ . + . + . + "ProvableContracts.Theorems.LoRA.Lora_Shape"^^ . + "lora_shape"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LoRA"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LoRA/Lora_Shape.lean"^^ . + . + . + "ProvableContracts.Theorems.LoRA.Lora_Shape"^^ . + "lora_shape_matches_base"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LoRA"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LoRA/Shape_Preservation.lean"^^ . + . + "ProvableContracts.Theorems.LoRA.Shape_Preservation"^^ . + "shape_preservation"^^ . + "true"^^ . + . + . + "grounded"^^ . + "LoRA"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/LoRA/Task_Vector.lean"^^ . + . + "ProvableContracts.Theorems.LoRA.Task_Vector"^^ . + "task_vector_roundtrip"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "composed_affine"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "composed_affine_scaled"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "dot_smul_left"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "dot_vadd_left"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "dot_vecmat"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "is"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "lora_merge_forward_equiv"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "matvec_madd"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "matvec_matmul_assoc"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "matvec_msmul"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Lora"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Lora/MergeForwardEquiv.lean"^^ . + . + "ProvableContracts.Theorems.Lora.MergeForwardEquiv"^^ . + "merge_distributes"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/Associativity.lean"^^ . + . + "ProvableContracts.Theorems.MatMul.Associativity"^^ . + "matmul_assoc"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/CooperativeTiling.lean"^^ . + . + "ProvableContracts.Theorems.MatMul.CooperativeTiling"^^ . + "matmul_block_sum"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/CooperativeTiling.lean"^^ . + "ProvableContracts.Theorems.MatMul.CooperativeTiling"^^ . + "tiled_k_sum_eq_full_sum"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/Distributivity.lean"^^ . + . + "ProvableContracts.Theorems.MatMul.Distributivity"^^ . + "matmul_left_distrib"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/Distributivity.lean"^^ . + . + "ProvableContracts.Theorems.MatMul.Distributivity"^^ . + "matmul_right_distrib"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/Identity.lean"^^ . + . + . + . + . + . + . + . + . + "ProvableContracts.Theorems.MatMul.Identity"^^ . + "matmul_identity_left"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/Identity.lean"^^ . + . + . + . + . + . + . + . + . + "ProvableContracts.Theorems.MatMul.Identity"^^ . + "matmul_identity_right"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/MatVecLinearity.lean"^^ . + "ProvableContracts.Theorems.MatMul.MatVecLinearity"^^ . + "matvec_add"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/MatVecLinearity.lean"^^ . + "ProvableContracts.Theorems.MatMul.MatVecLinearity"^^ . + "matvec_smul"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/Shape.lean"^^ . + . + "ProvableContracts.Theorems.MatMul.Shape"^^ . + "matmul_output_len"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/Shape.lean"^^ . + . + "ProvableContracts.Theorems.MatMul.Shape"^^ . + "matmul_output_shape"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/Shape.lean"^^ . + . + "ProvableContracts.Theorems.MatMul.Shape"^^ . + "matmul_shape_inner_cancels"^^ . + "true"^^ . + . + . + "grounded"^^ . + "MatMul"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/MatMul/TransposeMul.lean"^^ . + . + "ProvableContracts.Theorems.MatMul.TransposeMul"^^ . + "matmul_transpose"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "iabs_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "iabs_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "int_sq_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "mae_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "mae_self_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "mse_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "mse_self_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "mse_symm"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "residuals_self"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "residuals_swap"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "rmse_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "rmse_self_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "saeR_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "saeR_replicate_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "sqrt_zero_unique"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "sseR_map_neg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "sseR_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/Regression.lean"^^ . + "ProvableContracts.Theorems.Metrics.Regression"^^ . + "sseR_replicate_zero"^^ . + "true"^^ . + . + . + "admitted"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/RegressionAnalytic.lean"^^ . + . + "ProvableContracts.Theorems.Metrics.RegressionAnalytic"^^ . + "mae_le_rmse"^^ . + "false"^^ . + . + . + "admitted"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/RegressionAnalytic.lean"^^ . + "ProvableContracts.Theorems.Metrics.RegressionAnalytic"^^ . + "r_squared_le_one"^^ . + "false"^^ . + . + . + "admitted"^^ . + "Metrics"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Metrics/RegressionAnalytic.lean"^^ . + "ProvableContracts.Theorems.Metrics.RegressionAnalytic"^^ . + "r_squared_perfect"^^ . + "false"^^ . + . + . + "grounded"^^ . + "QR"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/QR/Orthogonality.lean"^^ . + "ProvableContracts.Theorems.QR.Orthogonality"^^ . + "orthogonal_columns"^^ . + "true"^^ . + . + . + "grounded"^^ . + "QR"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/QR/Orthogonality.lean"^^ . + "ProvableContracts.Theorems.QR.Orthogonality"^^ . + "orthogonal_left_inverse"^^ . + "true"^^ . + . + . + "grounded"^^ . + "QR"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/QR/Orthogonality.lean"^^ . + "ProvableContracts.Theorems.QR.Orthogonality"^^ . + "orthogonal_transpose"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Quantization"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Quantization/NF4Dequant.lean"^^ . + . + . + "ProvableContracts.Theorems.Quantization.NF4Dequant"^^ . + "gpu_cpu_parity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Quantization"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Quantization/RoundtripBound.lean"^^ . + "ProvableContracts.Theorems.Quantization.RoundtripBound"^^ . + "round_nearest_error"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Quantization"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Quantization/RoundtripBound.lean"^^ . + . + . + "ProvableContracts.Theorems.Quantization.RoundtripBound"^^ . + "roundtrip_bound"^^ . + "true"^^ . + . + . + "grounded"^^ . + "QuantizedDotProduct"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/QuantizedDotProduct/BsumDecomposition.lean"^^ . + . + . + "ProvableContracts.Theorems.QuantizedDotProduct.BsumDecomposition"^^ . + "bsum_decomposition_total"^^ . + "true"^^ . + . + . + "grounded"^^ . + "QuantizedDotProduct"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/QuantizedDotProduct/BsumDecomposition.lean"^^ . + . + . + "ProvableContracts.Theorems.QuantizedDotProduct.BsumDecomposition"^^ . + "bsum_precompute_eq_inline"^^ . + "true"^^ . + . + . + "grounded"^^ . + "QuantizedDotProduct"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/QuantizedDotProduct/ErrorBound.lean"^^ . + "ProvableContracts.Theorems.QuantizedDotProduct.ErrorBound"^^ . + "quant_dot_error_bound"^^ . + "true"^^ . + . + . + "grounded"^^ . + "RMSNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/RMSNorm/DenominatorPositive.lean"^^ . + . + . + "ProvableContracts.Theorems.RMSNorm.DenominatorPositive"^^ . + "mean_sq_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "RMSNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/RMSNorm/DenominatorPositive.lean"^^ . + . + . + "ProvableContracts.Theorems.RMSNorm.DenominatorPositive"^^ . + "rms_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "RMSNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/RMSNorm/NormalizedRMS.lean"^^ . + . + . + "ProvableContracts.Theorems.RMSNorm.NormalizedRMS"^^ . + "normalized_mean_sq_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "RMSNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/RMSNorm/NormalizedRMS.lean"^^ . + . + . + "ProvableContracts.Theorems.RMSNorm.NormalizedRMS"^^ . + "normalized_rms_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "RMSNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/RMSNorm/NormalizedRMS.lean"^^ . + . + . + "ProvableContracts.Theorems.RMSNorm.NormalizedRMS"^^ . + "rms_sq_zero_eps"^^ . + "true"^^ . + . + . + "grounded"^^ . + "RMSNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/RMSNorm/ScaleInvariance.lean"^^ . + . + . + "ProvableContracts.Theorems.RMSNorm.ScaleInvariance"^^ . + "mean_sq_scale"^^ . + "true"^^ . + . + . + "grounded"^^ . + "RMSNorm"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/RMSNorm/ScaleInvariance.lean"^^ . + . + . + "ProvableContracts.Theorems.RMSNorm.ScaleInvariance"^^ . + "rms_scale_zero_eps"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rand"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rand/Philox.lean"^^ . + "ProvableContracts.Theorems.Rand.Philox"^^ . + "philox_deterministic"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rand"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rand/Threefry.lean"^^ . + "ProvableContracts.Theorems.Rand.Threefry"^^ . + "threefry_deterministic"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rope"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rope/Rope.lean"^^ . + . + "ProvableContracts.Theorems.Rope.Rope"^^ . + "ropeList_length"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rope"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rope/Rope.lean"^^ . + . + "ProvableContracts.Theorems.Rope.Rope"^^ . + "ropePairs_normSq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rope"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rope/Rope.lean"^^ . + . + "ProvableContracts.Theorems.Rope.Rope"^^ . + "ropePairs_norm_le"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rope"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rope/Rope.lean"^^ . + . + "ProvableContracts.Theorems.Rope.Rope"^^ . + "rope_angle_add"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rope"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rope/Rope.lean"^^ . + . + "ProvableContracts.Theorems.Rope.Rope"^^ . + "rope_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rope"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rope/Rope.lean"^^ . + . + "ProvableContracts.Theorems.Rope.Rope"^^ . + "rope_norm_sq"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Rope"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Rope/Rope.lean"^^ . + . + "ProvableContracts.Theorems.Rope.Rope"^^ . + "rope_relative"^^ . + "true"^^ . + . + . + "grounded"^^ . + "SVD"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/SVD/NonNegative.lean"^^ . + "ProvableContracts.Theorems.SVD.NonNegative"^^ . + "ata_psd"^^ . + "true"^^ . + . + . + "grounded"^^ . + "SVD"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/SVD/NonNegative.lean"^^ . + "ProvableContracts.Theorems.SVD.NonNegative"^^ . + "ata_symmetric"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/RepeatPenalty.lean"^^ . + . + . + "ProvableContracts.Theorems.Sampling.RepeatPenalty"^^ . + "penalty_one_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/RepeatPenalty.lean"^^ . + . + . + "ProvableContracts.Theorems.Sampling.RepeatPenalty"^^ . + "penalty_reduces_negative"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/RepeatPenalty.lean"^^ . + . + . + "ProvableContracts.Theorems.Sampling.RepeatPenalty"^^ . + "penalty_reduces_positive"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/TemperatureScaling.lean"^^ . + . + "ProvableContracts.Theorems.Sampling.TemperatureScaling"^^ . + "tempScale_mono_le"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/TemperatureScaling.lean"^^ . + . + "ProvableContracts.Theorems.Sampling.TemperatureScaling"^^ . + "tempScale_monotone"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/TemperatureScaling.lean"^^ . + . + "ProvableContracts.Theorems.Sampling.TemperatureScaling"^^ . + "tempScale_preserves_argmax"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/TemperatureScaling.lean"^^ . + . + "ProvableContracts.Theorems.Sampling.TemperatureScaling"^^ . + "valid_temperature_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/TopK.lean"^^ . + . + "ProvableContracts.Theorems.Sampling.TopK"^^ . + "topk_one_is_argmax"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/TopK.lean"^^ . + . + "ProvableContracts.Theorems.Sampling.TopK"^^ . + "topk_separates"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sampling"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sampling/TopK.lean"^^ . + . + "ProvableContracts.Theorems.Sampling.TopK"^^ . + "topk_zero_keeps_all"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SigmoidBounded.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SigmoidBounded"^^ . + "sigmoid_bounded"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SigmoidBounded.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SigmoidBounded"^^ . + "sigmoid_lt_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SigmoidBounded.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SigmoidBounded"^^ . + "sigmoid_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SigmoidSymmetry.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SigmoidSymmetry"^^ . + "sigmoid_symmetry"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluAsymptotic.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SiluAsymptotic"^^ . + "sigmoid_lt_exp"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluAsymptotic.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluAsymptotic"^^ . + "silu_gap_bound"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluAsymptotic.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluAsymptotic"^^ . + "silu_lt_self"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluLowerBound.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SiluLowerBound"^^ . + "mul_exp_ge_neg_inv_e"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluLowerBound.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SiluLowerBound"^^ . + "sigmoid_lt_exp"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluLowerBound.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluLowerBound"^^ . + "silu_gt_neg_inv_e"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluLowerBound.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluLowerBound"^^ . + "silu_gt_neg_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluMonotone.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SiluMonotone"^^ . + "sigmoid_mono"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluMonotone.lean"^^ . + . + "ProvableContracts.Theorems.Sigmoid.SiluMonotone"^^ . + "sigmoid_strictMono"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluMonotone.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluMonotone"^^ . + "silu_mono_nonneg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluMonotone.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluMonotone"^^ . + "silu_strictMono_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluSign.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluSign"^^ . + "silu_neg_of_neg"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluSign.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluSign"^^ . + "silu_pos_of_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluSign.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluSign"^^ . + "silu_sign"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SiluZero.lean"^^ . + . + . + . + "ProvableContracts.Theorems.Sigmoid.SiluZero"^^ . + "silu_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SwigluGating.lean"^^ . + . + . + "ProvableContracts.Theorems.Sigmoid.SwigluGating"^^ . + "swiglu_gating_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SwigluGating.lean"^^ . + . + . + "ProvableContracts.Theorems.Sigmoid.SwigluGating"^^ . + "swiglu_value_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SwigluZero.lean"^^ . + . + . + "ProvableContracts.Theorems.Sigmoid.SwigluZero"^^ . + "swiglu_gate_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sigmoid"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sigmoid/SwigluZero.lean"^^ . + . + . + "ProvableContracts.Theorems.Sigmoid.SwigluZero"^^ . + "swiglu_zero_preservation"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Softmax"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Softmax/Bounded.lean"^^ . + . + "ProvableContracts.Theorems.Softmax.Bounded"^^ . + "softmax_bounded"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Softmax"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Softmax/Bounded.lean"^^ . + . + "ProvableContracts.Theorems.Softmax.Bounded"^^ . + "softmax_lt_one"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Softmax"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Softmax/Monotonicity.lean"^^ . + . + "ProvableContracts.Theorems.Softmax.Monotonicity"^^ . + "monotone"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Softmax"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Softmax/NonNegativity.lean"^^ . + . + "ProvableContracts.Theorems.Softmax.NonNegativity"^^ . + "softmax_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Softmax"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Softmax/NonNegativity.lean"^^ . + . + "ProvableContracts.Theorems.Softmax.NonNegativity"^^ . + "sum_exp_pos"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Softmax"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Softmax/PartitionOfUnity.lean"^^ . + . + "ProvableContracts.Theorems.Softmax.PartitionOfUnity"^^ . + "partition_of_unity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Softmax"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Softmax/ShiftInvariance.lean"^^ . + . + "ProvableContracts.Theorems.Softmax.ShiftInvariance"^^ . + "shift_invariance"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sparse"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sparse/BsrSpmv.lean"^^ . + "ProvableContracts.Theorems.Sparse.BsrSpmv"^^ . + "bsr_spmv_linear"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sparse"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sparse/SellSpmv.lean"^^ . + "ProvableContracts.Theorems.Sparse.SellSpmv"^^ . + "sell_spmv_add"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sparse"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sparse/SpMVLinear.lean"^^ . + "ProvableContracts.Theorems.Sparse.SpMVLinear"^^ . + "spmv_add"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sparse"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sparse/SpMVLinear.lean"^^ . + "ProvableContracts.Theorems.Sparse.SpMVLinear"^^ . + "spmv_smul"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sparse"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sparse/SpMVLinear.lean"^^ . + "ProvableContracts.Theorems.Sparse.SpMVLinear"^^ . + "spmv_zero"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sparse"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sparse/Spgemm.lean"^^ . + "ProvableContracts.Theorems.Sparse.Spgemm"^^ . + "spgemm_assoc"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Sparse"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Sparse/Spmm.lean"^^ . + "ProvableContracts.Theorems.Sparse.Spmm"^^ . + "spmm_left_distrib"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Tensor"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Tensor/Einsum.lean"^^ . + "ProvableContracts.Theorems.Tensor.Einsum"^^ . + "einsum_assoc"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Tensor"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Tensor/Einsum.lean"^^ . + "ProvableContracts.Theorems.Tensor.Einsum"^^ . + "einsum_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "col_stride"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "idx_def"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "idx_injective"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "idx_lt"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "idx_unrow_uncol"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "row_block_lower"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "row_block_upper"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "row_stride"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "transpose_reindex"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "transpose_reindex_bijective"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "transpose_shape_1d_identity"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "transpose_shape_involution"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "transpose_shape_swap"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "transpose_size_preserved"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "uncol_idx"^^ . + "true"^^ . + . + . + "grounded"^^ . + "TensorLayout"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorLayout/IndexAlgebra.lean"^^ . + "ProvableContracts.Theorems.TensorLayout.IndexAlgebra"^^ . + "unrow_idx"^^ . + "true"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "roundtrip_preserves_element"^^ . + "false"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "shape_transpose_involution"^^ . + "false"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "shape_transpose_involution_vec"^^ . + "false"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "swapIdx_injective"^^ . + "false"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "swapIdx_involutive"^^ . + "false"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "swapIdx_surjective"^^ . + "false"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "transpose_element"^^ . + "false"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "transpose_involution"^^ . + "false"^^ . + . + . + "admitted"^^ . + "TensorTranspose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/TensorTranspose/Roundtrip.lean"^^ . + . + . + . + "ProvableContracts.Theorems.TensorTranspose.Roundtrip"^^ . + "transpose_shape"^^ . + "false"^^ . + . + . + "grounded"^^ . + "Transpose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Transpose/Involution.lean"^^ . + . + "ProvableContracts.Theorems.Transpose.Involution"^^ . + "transpose_element"^^ . + "true"^^ . + . + . + "grounded"^^ . + "Transpose"^^ . + "crates/aprender-contracts-staging/lean/ProvableContracts/Theorems/Transpose/Involution.lean"^^ . + . + "ProvableContracts.Theorems.Transpose.Involution"^^ . + "transpose_involution"^^ . + "true"^^ . diff --git a/scripts/tree_reader_tests.txt b/scripts/tree_reader_tests.txt index 6c7a126ed1..2b21cd83b5 100644 --- a/scripts/tree_reader_tests.txt +++ b/scripts/tree_reader_tests.txt @@ -42,8 +42,11 @@ aprender-contracts --lib lint::shapes_gate aprender-contracts --lib lint::sigma_gate aprender-contracts --lib lint::strict_test_binding aprender-contracts --lib ontology::extract::apr_model +aprender-contracts --lib ontology::extract::code +aprender-contracts --lib ontology::extract::lean aprender-contracts --lib ontology::extract::pv_contract aprender-contracts --lib ontology::sigma +aprender-contracts --lib ontology::w3c aprender-contracts --lib pipeline aprender-contracts --lib query aprender-contracts --lib query::index @@ -62,11 +65,12 @@ aprender-contracts-cli --test cli_integration aprender-contracts-cli --test ground_truth aprender-contracts-cli --test ont2b_sigma_gate aprender-contracts-cli --test ont4_relations_gate +aprender-contracts-cli --test ont4b2_code_lean_w3c aprender-contracts-cli --test ont4b_shapes_gate aprender-contracts-cli --test ont4c1_model_receipts aprender-contracts-cli --test ont6_lint_verdict -aprender-contracts-cli --test ont_extract_json aprender-contracts-cli --test ont_entity_properties +aprender-contracts-cli --test ont_extract_json aprender-contracts-cli --test pv_surface_gate aprender-contracts-cli --test pvl_zero_contracts aprender-core --lib format::metadata_bounds_contract_falsify From dd2582c40866d858d6e0626b4c3dfe244602e385 Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 17:21:44 +0200 Subject: [PATCH 04/11] =?UTF-8?q?ont4c1=20corpus=20test:=20ladder-green=20?= =?UTF-8?q?is=20one=20of=20the=20reported=20shapes,=20not=20the=20only=20o?= =?UTF-8?q?ne=20=E2=80=94=20ONT-4b2=20reports=20two=20more=20unarmed=20(Re?= =?UTF-8?q?fs=20PMAT-3509)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the 4b2 tree not_armed_shapes is [ladder-green, bound-symbols-resolve, lean-statements-grounded]; the corpus test pinned the list to one entry, a fact about ONT-4c1's tree rather than about ONT-4c1. Membership is what the row promises (§3.9 reported-first); the fixture test keeps its exact-list form. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- .../tests/ont4c1_model_receipts.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/crates/aprender-contracts-cli/tests/ont4c1_model_receipts.rs b/crates/aprender-contracts-cli/tests/ont4c1_model_receipts.rs index dd0560d23b..9d8c076c50 100644 --- a/crates/aprender-contracts-cli/tests/ont4c1_model_receipts.rs +++ b/crates/aprender-contracts-cli/tests/ont4c1_model_receipts.rs @@ -323,12 +323,14 @@ fn the_repo_corpus_reports_the_ladder_rungs_as_focus_nodes_with_the_controls_fir "{}", show(&r) ); - assert_eq!( - v["not_armed_shapes"].as_array().map(Vec::len), - Some(1), - "{}", - show(&r) - ); - assert_eq!(v["not_armed_shapes"][0], "ladder-green", "{}", show(&r)); + // Reported, not armed — and not the ONLY reported shape: ONT-4b2 ships `bound-symbols-resolve` and + // `lean-statements-grounded` unarmed beside it (§3.9 reported-first), so this asserts membership, + // not that the list has one entry. The fixture test above keeps the exact-list form: there the tree + // is the fixture's, and one reported shape is a fact about it. + let reported: Vec<&str> = v["not_armed_shapes"] + .as_array() + .map(|a| a.iter().filter_map(|x| x.as_str()).collect()) + .unwrap_or_default(); + assert!(reported.contains(&"ladder-green"), "{}", show(&r)); assert!(v["receipts"].as_u64().unwrap_or(0) >= 1, "{}", show(&r)); } From f285506160311d6fb7119d300f8f45b8d9f0bdaa Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 17:25:28 +0200 Subject: [PATCH 05/11] lint.rs: decide_named_gate's arms are expressions, not returns; drop the unused ShapesOutcome import (clippy 1.93 -D warnings) (Refs PMAT-3509) Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- .../src/commands/lint.rs | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/crates/aprender-contracts-cli/src/commands/lint.rs b/crates/aprender-contracts-cli/src/commands/lint.rs index e05e5644e2..4cf16a329c 100644 --- a/crates/aprender-contracts-cli/src/commands/lint.rs +++ b/crates/aprender-contracts-cli/src/commands/lint.rs @@ -232,37 +232,30 @@ fn decide_named_gate( name: &str, ) -> Result> { use provable_contracts::lint::{ - relations_gate::RelationsOutcome, shapes_gate::ShapesOutcome, sigma_gate::SigmaOutcome, - NamedGateOutcome, NAMED_GATES, + relations_gate::RelationsOutcome, sigma_gate::SigmaOutcome, NamedGateOutcome, NAMED_GATES, }; match provable_contracts::lint::run_named_gate(contract_dir, name) { - NamedGateOutcome::UnknownGate => { - return Err(crate::contract_walk::UnknownGate { - asked: name.to_string(), - known: NAMED_GATES.iter().map(|g| (*g).to_string()).collect(), - } - .into()) + NamedGateOutcome::UnknownGate => Err(crate::contract_walk::UnknownGate { + asked: name.to_string(), + known: NAMED_GATES.iter().map(|g| (*g).to_string()).collect(), } - NamedGateOutcome::Sigma(SigmaOutcome::NoSigma) => { - return Err(LintDeclined { - reason: provable_contracts::ontology::verdict::Reason::NoCheckable, - } - .into()) + .into()), + NamedGateOutcome::Sigma(SigmaOutcome::NoSigma) => Err(LintDeclined { + reason: provable_contracts::ontology::verdict::Reason::NoCheckable, } + .into()), NamedGateOutcome::Sigma(SigmaOutcome::Malformed(e)) => { - return Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) + Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) } NamedGateOutcome::Relations( RelationsOutcome::NoSigma | RelationsOutcome::NoRelations { .. }, - ) => { - return Err(LintDeclined { - reason: provable_contracts::ontology::verdict::Reason::NoCheckable, - } - .into()) + ) => Err(LintDeclined { + reason: provable_contracts::ontology::verdict::Reason::NoCheckable, } + .into()), NamedGateOutcome::Relations(RelationsOutcome::Malformed(e)) => { - return Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) + Err(crate::contract_walk::SigmaMalformed(e.to_string()).into()) } NamedGateOutcome::Shapes(outcome) => decide_shapes_gate(outcome), NamedGateOutcome::Sigma(SigmaOutcome::Ran { result, findings }) From bb738faab1635af346fe24902d81cd5e574c24ae Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 17:27:26 +0200 Subject: [PATCH 06/11] =?UTF-8?q?ont4c1=20corpus=20test:=20ladder-green=20?= =?UTF-8?q?is=20reported=20and=20known=20(armed=20=E2=88=AA=20not=5Farmed)?= =?UTF-8?q?,=20never=20pinned=20to=20one=20side=20of=20the=20arming=20line?= =?UTF-8?q?=20(Refs=20PMAT-3509)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit aprender-ba, on #3528: the 0.68.2 bump (#3498, head 5b22fb25a) arms ladder-green, so a test asserting ladder-green ∈ not_armed_shapes goes red on the release branch the moment #3528 lands under it. The row's fact is that the gate computes and reports the shape (a by_shape entry) and lists it on one side or the other; which side is the bump's, not the row's. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- .../tests/ont4c1_model_receipts.rs | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/crates/aprender-contracts-cli/tests/ont4c1_model_receipts.rs b/crates/aprender-contracts-cli/tests/ont4c1_model_receipts.rs index 9d8c076c50..051789212b 100644 --- a/crates/aprender-contracts-cli/tests/ont4c1_model_receipts.rs +++ b/crates/aprender-contracts-cli/tests/ont4c1_model_receipts.rs @@ -323,14 +323,29 @@ fn the_repo_corpus_reports_the_ladder_rungs_as_focus_nodes_with_the_controls_fir "{}", show(&r) ); - // Reported, not armed — and not the ONLY reported shape: ONT-4b2 ships `bound-symbols-resolve` and - // `lean-statements-grounded` unarmed beside it (§3.9 reported-first), so this asserts membership, - // not that the list has one entry. The fixture test above keeps the exact-list form: there the tree - // is the fixture's, and one reported shape is a fact about it. - let reported: Vec<&str> = v["not_armed_shapes"] + // ladder-green is COMPUTED and REPORTED on the real corpus whatever its arming: the row ships it + // unarmed, the 0.68.2 bump arms it (§3.9), and ONT-4b2 ships two more shapes unarmed beside it — + // so this asserts that the gate reports it (a `by_shape` entry) and knows it (armed or not), never + // which side of the arming line it is on. The fixture test above keeps the exact-list form: there + // the tree is the fixture's, and one unarmed shape is a fact about it. + let known: Vec<&str> = ["armed_shapes", "not_armed_shapes"] + .iter() + .flat_map(|k| { + v[*k] + .as_array() + .map(|a| a.iter().filter_map(|x| x.as_str()).collect::>()) + .unwrap_or_default() + }) + .collect(); + assert!(known.contains(&"ladder-green"), "{}", show(&r)); + let by_shape: Vec<&str> = v["by_shape"] .as_array() .map(|a| a.iter().filter_map(|x| x.as_str()).collect()) .unwrap_or_default(); - assert!(reported.contains(&"ladder-green"), "{}", show(&r)); + assert!( + by_shape.iter().any(|s| s.starts_with("ladder-green=")), + "{}", + show(&r) + ); assert!(v["receipts"].as_u64().unwrap_or(0) >= 1, "{}", show(&r)); } From f5dd5d7f6f6cd7b0ea5a045db9b505ae9c088928 Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 17:37:10 +0200 Subject: [PATCH 07/11] ONT-4b2: make oracle without cd (.ONESHELL); the facades lock learns the syn edge; the ticket says 16 vendored + 16 accounted for, not 32; the differential re-run on the rebased tree (Refs PMAT-3509) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quorum round 2 on bb738faab, three lanes, three findings, all real: 1. (flash, measured) `make oracle` under this Makefile's .ONESHELL: line 1376 `cd tests/oracle && cargo build` moved the shell for line 1377, whose `$(cd tests/oracle …)` then failed with "No such file" and tried to run `/release/ont-oracle`. Both lines now use --manifest-path and no cd. Proven by running `make oracle-check` after the change: the oracle built, ran, and diffed — which is the second finding. 2. tests/oracle/differential.json was the pre-rebase tree's. Fresh on 45decafb5+4b2: cases=17, disagreements=0, corpus agree=true with 103 violations on BOTH sides (was 113/113 — the corpus moved under the rebase: #3530's entity-property fixes and main's contracts). The oracle and pv still agree on every case and on the corpus; the file is the run's output. 3. (pro-high, pro-low) the ticket title said "32 vendored W3C SHACL-Core cases"; the diff vendors 16 and accounts for the other 16 by excluding form (a constraint on the node shape itself, outside the subset), which `the_table_of_ont_0_is_accounted_for_case_by_case` asserts as 16 + 16 = 32 with no id twice. The title now says that, and six acceptance criteria are written from the diff (not the plan) — the CLI leg's `n >= 16` is what is vendored. Roadmap re-aggregated. Also: crates/facades/Cargo.lock regenerated for the `syn` edge aprender-contracts gained (guard-tree R5 on bb738faab: "Cargo.lock is stale"); `cargo metadata --locked` rc 0 in crates/facades. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- Makefile | 6 ++++-- crates/facades/Cargo.lock | 1 + docs/roadmaps/entries/PMAT-3509.yaml | 10 ++++++++-- docs/roadmaps/roadmap.yaml | 10 ++++++++-- tests/oracle/differential.json | 4 ++-- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index fb7ef5d689..064caf861a 100644 --- a/Makefile +++ b/Makefile @@ -1373,8 +1373,10 @@ ont-ratchet-check: oracle: @echo "== W3C cases + the real corpus through the pinned oracle (shacl 0.3.21, out of gate) ==" @. scripts/pv_bin.sh && "$$PV" lint contracts --gate shapes --format json > "$${TMPDIR:-/tmp}/pv-shapes.json" 2>/dev/null || true - @cd tests/oracle && cargo build --release --quiet - @"$$(cd tests/oracle && cargo metadata --no-deps --format-version 1 | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p')/release/ont-oracle" . "$${TMPDIR:-/tmp}/pv-shapes.json" + @# No `cd`: this Makefile is .ONESHELL, so a cd on one line moves every line after it (the first form of + @# this target built in tests/oracle/ and then ran `$(cd tests/oracle …)` from inside it — "No such file"). + @cargo build --release --quiet --manifest-path tests/oracle/Cargo.toml + @"$$(cargo metadata --no-deps --format-version 1 --manifest-path tests/oracle/Cargo.toml | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p')/release/ont-oracle" . "$${TMPDIR:-/tmp}/pv-shapes.json" oracle-check: oracle @git diff --exit-code tests/oracle/differential.json \ diff --git a/crates/facades/Cargo.lock b/crates/facades/Cargo.lock index c37caddaea..cb8d6901ff 100644 --- a/crates/facades/Cargo.lock +++ b/crates/facades/Cargo.lock @@ -21,6 +21,7 @@ dependencies = [ "serde_json", "serde_yaml", "sha2", + "syn 2.0.119", "thiserror", ] diff --git a/docs/roadmaps/entries/PMAT-3509.yaml b/docs/roadmaps/entries/PMAT-3509.yaml index 37ce15dab8..426bbee0f3 100644 --- a/docs/roadmaps/entries/PMAT-3509.yaml +++ b/docs/roadmaps/entries/PMAT-3509.yaml @@ -1,14 +1,20 @@ - id: PMAT-3509 github_issue: 3509 item_type: task - title: 'ONT-4b2: extract:code (syn module-tree walk over the bound symbols) and extract:lean (the in-tree theorems) into contracts.nt under the symbol/ and world/ roots; 32 vendored W3C SHACL-Core cases run by the shapes gate (w3c_cases_passed); tests/oracle/ scratch crate + make oracle writing tests/oracle/differential.json (release gate only, R-13); Unknown{Differential} on disagreement' + title: 'ONT-4b2: extract:code (syn module-tree walk over the bound symbols) and extract:lean (the in-tree theorems) into contracts.nt under the symbol/ and world/ roots; the ONT-0 table''s 32 W3C SHACL-Core cases accounted for one by one — 16 vendored and run by the shapes gate (w3c_cases_passed), 16 NOT vendored because their FORM (a constraint on the node shape itself) is outside the subset, each with its reason; tests/oracle/ scratch crate + make oracle writing tests/oracle/differential.json (release gate only, R-13); Unknown{Differential} on disagreement' status: planned priority: medium assigned_to: null created: 2026-09-19T11:07:51Z updated: 2026-09-19T11:07:51Z spec: null - acceptance_criteria: [] + acceptance_criteria: + - 'extract:code walks the syn module tree of every crate a binding registry names and emits ont:Symbol focus nodes under the symbol/ root (resolved and unresolved counted separately: symbols_resolved / symbols_unresolved in the shapes report); extract:lean emits ont:Statement nodes under the world/ root for the in-tree theorems whose names the ONT-2a camel-case rule accepts; both run inside the one walk extract::all (R-18) and both have a positive control (pc_extract.code / pc_extract.lean) that must fire or the gate declines PositiveControlFailed.' + - 'crates/aprender-contracts/src/ontology/w3c.rs vendors 16 W3C SHACL-Core cases as YAML translations under crates/aprender-contracts/w3c/ and the shapes gate runs them (w3c_cases_passed / w3c_cases_n in the report, 16/16); NOT_VENDORED lists the other 16 of ONT-0''s 32 with the excluding form each (a constraint on the node shape itself, which the subset attaches only to property shapes); the_table_of_ont_0_is_accounted_for_case_by_case asserts CASES + NOT_VENDORED == 32 with no id twice. The CLI leg asserts n >= 16 because 16 is what is vendored — not 32.' + - 'sh:in is TERM equality (InEntry{lexical, datatype}; "1"^^xsd:integer and "1" are different entries; typed export in shapes.ttl); rdfs:subClassOf closes instance sets for targetClass; sh:datatype checks the lexical form is well-formed for the datatype; one sh:node result per failing value; the sh:in message reads `: is not one of []` (the path from #3530, the terms from this row).' + - 'tests/oracle/ is a workspace-DETACHED crate (its own [workspace]; shacl = "=0.3.21" default-features off) run only by `make oracle` / `make oracle-check` (release gate, R-13: no third-party SHACL crate in the gate path; the workspace Cargo.lock has no rudof/oxigraph/horned/sophia/whelk); it writes tests/oracle/differential.json (TRACKED) and oracle-check diffs it; the Makefile target uses --manifest-path, never cd, because the Makefile is .ONESHELL.' + - 'contracts/ont-code-symbols-v1.yaml ships two shapes UNARMED (bound-symbols-resolve, lean-statements-grounded) — reported in not_armed_shapes, armed later by their own PR (§3.9 reported-first); FALSIFY-SYM-001..005 in the contract; scripts/check_ont_ratchet.sh reads entity types and extractors from Σ and preserves foreign keys; fixtures tests/fixtures/ont/{code-bound,code-ghost,lean-sorry}/; CLI test ont4b2_code_lean_w3c (8 legs) wired at ci/explicit-test-commands.d/343-….' + - 'Rebased onto 45decafb5 (ONT-4c1 + #3530 + #3523 + #3516): pv extract contracts --check 0; sigma / relations / shapes Pass on the tree (shapes_n=5, focus_nodes_n=2318, symbols 169 resolved / 101 unresolved, W3C 16/16); the 4c1 corpus test asserts ladder-green is computed and reported (a by_shape entry, listed in armed ∪ not_armed) without pinning which side, so it holds on the 0.68.2 bump tree that arms it; crates/facades/Cargo.lock regenerated for the syn edge; clippy 1.93 -D warnings clean on both crates; lib 1665 + the seven ONT CLI test files green.' phases: [] subtasks: [] estimated_effort: null diff --git a/docs/roadmaps/roadmap.yaml b/docs/roadmaps/roadmap.yaml index 166390d66a..a2f9d22463 100644 --- a/docs/roadmaps/roadmap.yaml +++ b/docs/roadmaps/roadmap.yaml @@ -18608,14 +18608,20 @@ roadmap: - id: PMAT-3509 github_issue: 3509 item_type: task - title: 'ONT-4b2: extract:code (syn module-tree walk over the bound symbols) and extract:lean (the in-tree theorems) into contracts.nt under the symbol/ and world/ roots; 32 vendored W3C SHACL-Core cases run by the shapes gate (w3c_cases_passed); tests/oracle/ scratch crate + make oracle writing tests/oracle/differential.json (release gate only, R-13); Unknown{Differential} on disagreement' + title: 'ONT-4b2: extract:code (syn module-tree walk over the bound symbols) and extract:lean (the in-tree theorems) into contracts.nt under the symbol/ and world/ roots; the ONT-0 table''s 32 W3C SHACL-Core cases accounted for one by one — 16 vendored and run by the shapes gate (w3c_cases_passed), 16 NOT vendored because their FORM (a constraint on the node shape itself) is outside the subset, each with its reason; tests/oracle/ scratch crate + make oracle writing tests/oracle/differential.json (release gate only, R-13); Unknown{Differential} on disagreement' status: planned priority: medium assigned_to: null created: 2026-09-19T11:07:51Z updated: 2026-09-19T11:07:51Z spec: null - acceptance_criteria: [] + acceptance_criteria: + - 'extract:code walks the syn module tree of every crate a binding registry names and emits ont:Symbol focus nodes under the symbol/ root (resolved and unresolved counted separately: symbols_resolved / symbols_unresolved in the shapes report); extract:lean emits ont:Statement nodes under the world/ root for the in-tree theorems whose names the ONT-2a camel-case rule accepts; both run inside the one walk extract::all (R-18) and both have a positive control (pc_extract.code / pc_extract.lean) that must fire or the gate declines PositiveControlFailed.' + - 'crates/aprender-contracts/src/ontology/w3c.rs vendors 16 W3C SHACL-Core cases as YAML translations under crates/aprender-contracts/w3c/ and the shapes gate runs them (w3c_cases_passed / w3c_cases_n in the report, 16/16); NOT_VENDORED lists the other 16 of ONT-0''s 32 with the excluding form each (a constraint on the node shape itself, which the subset attaches only to property shapes); the_table_of_ont_0_is_accounted_for_case_by_case asserts CASES + NOT_VENDORED == 32 with no id twice. The CLI leg asserts n >= 16 because 16 is what is vendored — not 32.' + - 'sh:in is TERM equality (InEntry{lexical, datatype}; "1"^^xsd:integer and "1" are different entries; typed export in shapes.ttl); rdfs:subClassOf closes instance sets for targetClass; sh:datatype checks the lexical form is well-formed for the datatype; one sh:node result per failing value; the sh:in message reads `: is not one of []` (the path from #3530, the terms from this row).' + - 'tests/oracle/ is a workspace-DETACHED crate (its own [workspace]; shacl = "=0.3.21" default-features off) run only by `make oracle` / `make oracle-check` (release gate, R-13: no third-party SHACL crate in the gate path; the workspace Cargo.lock has no rudof/oxigraph/horned/sophia/whelk); it writes tests/oracle/differential.json (TRACKED) and oracle-check diffs it; the Makefile target uses --manifest-path, never cd, because the Makefile is .ONESHELL.' + - 'contracts/ont-code-symbols-v1.yaml ships two shapes UNARMED (bound-symbols-resolve, lean-statements-grounded) — reported in not_armed_shapes, armed later by their own PR (§3.9 reported-first); FALSIFY-SYM-001..005 in the contract; scripts/check_ont_ratchet.sh reads entity types and extractors from Σ and preserves foreign keys; fixtures tests/fixtures/ont/{code-bound,code-ghost,lean-sorry}/; CLI test ont4b2_code_lean_w3c (8 legs) wired at ci/explicit-test-commands.d/343-….' + - 'Rebased onto 45decafb5 (ONT-4c1 + #3530 + #3523 + #3516): pv extract contracts --check 0; sigma / relations / shapes Pass on the tree (shapes_n=5, focus_nodes_n=2318, symbols 169 resolved / 101 unresolved, W3C 16/16); the 4c1 corpus test asserts ladder-green is computed and reported (a by_shape entry, listed in armed ∪ not_armed) without pinning which side, so it holds on the 0.68.2 bump tree that arms it; crates/facades/Cargo.lock regenerated for the syn edge; clippy 1.93 -D warnings clean on both crates; lib 1665 + the seven ONT CLI test files green.' phases: [] subtasks: [] estimated_effort: null diff --git a/tests/oracle/differential.json b/tests/oracle/differential.json index f226bb6de8..a3442d21ed 100644 --- a/tests/oracle/differential.json +++ b/tests/oracle/differential.json @@ -2,8 +2,8 @@ "cases": 17, "corpus": { "agree": true, - "oracle_violations": 113, - "pv_violations": 113, + "oracle_violations": 103, + "pv_violations": 103, "ran": true }, "detail": [], From 6c0670410af70ce11218a6979f25e024f3d7b522 Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 17:45:35 +0200 Subject: [PATCH 08/11] audit: quorum-PMAT-3509 round 3 AGREED 3/3 on f5dd5d7f6 (Refs PMAT-3509) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round 1 lapsed to the arming-neutral ladder-green assertion (aprender-ba's finding); round 2's three findings — the .ONESHELL cd in make oracle, the stale differential, the 32-vs-16 title — were each answered in the diff. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- docs/audits/quorum-PMAT-3509.json | 102 ++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 docs/audits/quorum-PMAT-3509.json diff --git a/docs/audits/quorum-PMAT-3509.json b/docs/audits/quorum-PMAT-3509.json new file mode 100644 index 0000000000..48c2cc75a1 --- /dev/null +++ b/docs/audits/quorum-PMAT-3509.json @@ -0,0 +1,102 @@ +{ + "ticket": "PMAT-3509", + "base": "origin/main", + "base_resolved": "origin/main", + "base_note": "no origin/origin/main exists; judged against the local ref", + "head": "f5dd5d7f6f6cd7b0ea5a045db9b505ae9c088928", + "diff_sha256": "7838d6c1c739bc0ac08620c7e13aaa6a17029c98b027c4b63f0d844ffc72d52d", + "width": 3, + "executor": "agy", + "prompt_mode": "file", + "prompt_bytes": 1472738, + "author": { + "model": "claude-fable-5-1", + "family": "claude", + "source": "flag" + }, + "agreed": true, + "lanes": [ + { + "lane": 1, + "status": "SUCCESS", + "verdict": "PASS", + "summary": "All acceptance criteria from PMAT-3509 are successfully implemented and verified. The `extract:code` and `extract:lean` tools properly run within `extract::all` and include positive controls. 16 W3C SHACL-Core cases are correctly vendored and tested, while the remaining 16 are accounted for in the `NOT_VENDORED` list (totaling 32). The `tests/oracle` crate is properly detached from the workspace using its own `[workspace]` directive, pins `shacl` to `=0.3.21`, and operates via a `Makefile` that avoids `cd` to comply with `.ONESHELL`. The `sh:in` validation now correctly checks term equality using `InEntry` and formats its error message exactly as required (`: is not one of []`). The `contracts/ont-code-symbols-v1.yaml` ships unarmed and the CLI test `ont4b2_code_lean_w3c` is wired properly. No regressions or omitted features were found.", + "findings": [], + "raw_bytes": 3172, + "err_bytes": 0, + "envelope_status": "SUCCESS", + "verdict_source": "structured_output", + "grounding_check": "parity", + "model": "gemini-3.1-pro-high", + "model_measured": "gemini-3.1-pro-high", + "model_source": "measured", + "family": "gemini" + }, + { + "lane": 2, + "status": "SUCCESS", + "verdict": "PASS", + "summary": "The diff successfully implements the ticket's requirements. `extract:code` and `extract:lean` emit to `contracts.nt` under `symbol/` and `world/`. The 32 W3C cases are accounted for. The oracle scratch crate tests correctly with `differential.json` and uses `Unknown{Differential}` on disagreement.", + "findings": [ + { + "claim": "the_table_of_ont_0_is_accounted_for_case_by_case asserts CASES + NOT_VENDORED == 32 with no id twice", + "file": "crates/aprender-contracts/src/ontology/w3c.rs", + "grounding": "cited", + "line": 600 + } + ], + "raw_bytes": 2374, + "err_bytes": 0, + "envelope_status": "SUCCESS", + "verdict_source": "structured_output", + "grounding_check": "parity", + "model": "gemini-3.1-pro-low", + "model_measured": "gemini-3.1-pro-low", + "model_source": "measured", + "family": "gemini" + }, + { + "lane": 3, + "status": "SUCCESS", + "verdict": "PASS", + "summary": "Reviewed diff against ticket PMAT-3509 (ONT-4b2). Verified extract:code syn module-tree walk and extract:lean in-tree theorem extraction into contracts.nt under symbol/ and world/ roots. Verified 32 W3C SHACL-Core cases accounted for (16 vendored and run by shapes gate, 16 in NOT_VENDORED with explicit non-subset reasons). Verified tests/oracle scratch crate and make oracle / make oracle-check writing differential.json with 0 disagreements. Ran cargo test -p aprender-contracts-cli --test ont4b2_code_lean_w3c (8/8 passed), make oracle-check (PASS), and scripts/check_ont_ratchet.sh --check (PASS). Found no refutations.", + "findings": [], + "raw_bytes": 2637, + "err_bytes": 100, + "envelope_status": "SUCCESS", + "verdict_source": "structured_output", + "grounding_check": "parity", + "model": "gemini-3.6-flash-low", + "model_measured": "gemini-3.6-flash-low", + "model_source": "measured", + "family": "gemini" + } + ], + "dissent": [], + "dedup": [ + { + "file": "crates/aprender-contracts/src/ontology/w3c.rs", + "line": 600, + "lanes_agreeing": [ + 2 + ], + "claims": [ + "the_table_of_ont_0_is_accounted_for_case_by_case asserts CASES + NOT_VENDORED == 32 with no id twice" + ] + } + ], + "uncovered": [], + "coverage_source": "lanes", + "partial": false, + "partial_reasons": [], + "auto_merge": { + "checked": true, + "was_armed": false, + "disarmed": false, + "note": "auto-merge not armed" + }, + "lint": { + "ok": true, + "output": "receipt complete: kind=artifact lanes=3 author=claude-fable-5-1/claude" + } +} From a6927091a2e29fdaa0de49757d88eed7298795cd Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 18:44:03 +0200 Subject: [PATCH 09/11] =?UTF-8?q?README:=20the=20CONTRACT=5FCOUNT=20block?= =?UTF-8?q?=20states=201799=20=E2=80=94=20ONT-4b2=20adds=20contracts/ont-c?= =?UTF-8?q?ode-symbols-v1.yaml=20(make=20readme-sync)=20(Refs=20PMAT-3509)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit guard-cargo on the merge tree: FALSIFY-README-002 (the block is generated, an equality, not a ratchet). Regenerated with the generator the guard names; readme-sync-check and check_readme_claims.sh pass. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5cdae7b3ee..b3f7f2d721 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ publishing — all backed by YAML provable contracts that fail CI on drift. | Metric | Count | Source of truth | |-------:|------:|---| | Workspace crates | **79** workspace crates | `cargo metadata --no-deps` (NOT `ls crates/` — 4 are `exclude`d, 1 has no Cargo.toml) | -| Provable contracts | **1798** provable contracts | `contracts/census.json` `.n_files` — the set `pv lint` walks (`pv census`, ONT-001 ONT-1; regenerated by `make contracts`, written by `make readme-sync`, guarded by `scripts/check_readme_claims.sh`) | +| Provable contracts | **1799** provable contracts | `contracts/census.json` `.n_files` — the set `pv lint` walks (`pv census`, ONT-001 ONT-1; regenerated by `make contracts`, written by `make readme-sync`, guarded by `scripts/check_readme_claims.sh`) | | CLI commands | **110** CLI commands | `apr --help` | | Book CLI chapters | **112** chapters | `ls book/src/cli/*.md` | | Book lib chapters | **71** chapters | `ls book/src/lib/*.md` (parity with `pub mod`) | @@ -262,7 +262,7 @@ falsification_tests: prediction: apr validate bad-model.apr exits non-zero ``` -The tree carries 1798 contracts across inference, training, quantization, attention, FFN, +The tree carries 1799 contracts across inference, training, quantization, attention, FFN, tokenization, model formats, CLI safety — and this README itself. ## Migration from old crates From 7c2cc784cb0e242ac3fcb7e5105a792536f80a53 Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 18:52:44 +0200 Subject: [PATCH 10/11] audit: quorum-PMAT-3509 round 4 AGREED 3/3 on a6927091a (Refs PMAT-3509) Round 3's 3/3 lapsed to the README CONTRACT_COUNT regeneration (guard-cargo FALSIFY-README-002 on the merge tree). Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- docs/audits/quorum-PMAT-3509.json | 50 +++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/docs/audits/quorum-PMAT-3509.json b/docs/audits/quorum-PMAT-3509.json index 48c2cc75a1..2ee0811e7b 100644 --- a/docs/audits/quorum-PMAT-3509.json +++ b/docs/audits/quorum-PMAT-3509.json @@ -3,12 +3,12 @@ "base": "origin/main", "base_resolved": "origin/main", "base_note": "no origin/origin/main exists; judged against the local ref", - "head": "f5dd5d7f6f6cd7b0ea5a045db9b505ae9c088928", - "diff_sha256": "7838d6c1c739bc0ac08620c7e13aaa6a17029c98b027c4b63f0d844ffc72d52d", + "head": "a6927091a2e29fdaa0de49757d88eed7298795cd", + "diff_sha256": "38b78103e05e00180cefa3caa0867f88229594a1445d7449e332cee4bdc216b8", "width": 3, "executor": "agy", "prompt_mode": "file", - "prompt_bytes": 1472738, + "prompt_bytes": 1479309, "author": { "model": "claude-fable-5-1", "family": "claude", @@ -20,9 +20,9 @@ "lane": 1, "status": "SUCCESS", "verdict": "PASS", - "summary": "All acceptance criteria from PMAT-3509 are successfully implemented and verified. The `extract:code` and `extract:lean` tools properly run within `extract::all` and include positive controls. 16 W3C SHACL-Core cases are correctly vendored and tested, while the remaining 16 are accounted for in the `NOT_VENDORED` list (totaling 32). The `tests/oracle` crate is properly detached from the workspace using its own `[workspace]` directive, pins `shacl` to `=0.3.21`, and operates via a `Makefile` that avoids `cd` to comply with `.ONESHELL`. The `sh:in` validation now correctly checks term equality using `InEntry` and formats its error message exactly as required (`: is not one of []`). The `contracts/ont-code-symbols-v1.yaml` ships unarmed and the CLI test `ont4b2_code_lean_w3c` is wired properly. No regressions or omitted features were found.", + "summary": "Reviewed diff against ticket PMAT-3509 (ONT-4b2). Verified extract:code syn module-tree walk and extract:lean in-tree theorem extraction into contracts.nt under symbol/ and world/ roots. Verified 32 W3C SHACL-Core cases accounted for (16 vendored and run by shapes gate, 16 in NOT_VENDORED with explicit non-subset reasons). Verified tests/oracle scratch crate and make oracle / make oracle-check writing differential.json with 0 disagreements. Ran cargo test -p aprender-contracts-cli --test ont4b2_code_lean_w3c (8/8 passed), make oracle-check (PASS), and scripts/check_ont_ratchet.sh --check (PASS). Found no refutations.", "findings": [], - "raw_bytes": 3172, + "raw_bytes": 2612, "err_bytes": 0, "envelope_status": "SUCCESS", "verdict_source": "structured_output", @@ -36,16 +36,25 @@ "lane": 2, "status": "SUCCESS", "verdict": "PASS", - "summary": "The diff successfully implements the ticket's requirements. `extract:code` and `extract:lean` emit to `contracts.nt` under `symbol/` and `world/`. The 32 W3C cases are accounted for. The oracle scratch crate tests correctly with `differential.json` and uses `Unknown{Differential}` on disagreement.", + "summary": "Reviewed diff against ticket PMAT-3509 (ONT-4b2). Verified `extract:code` and `extract:lean` into `contracts.nt`. Verified 32 W3C SHACL-Core cases are accounted for (16 vendored + 16 NOT_VENDORED). Verified `tests/oracle` scratch crate and `make oracle` writing `differential.json` with the `Unknown{Differential}` handling on disagreement. No refutations found.", "findings": [ { - "claim": "the_table_of_ont_0_is_accounted_for_case_by_case asserts CASES + NOT_VENDORED == 32 with no id twice", + "claim": "make oracle writes differential.json and avoids cd because Makefile is .ONESHELL", + "file": "Makefile", + "grounding": "cited" + }, + { + "claim": "16 vendored cases and 16 NOT_VENDORED cases account for 32 W3C SHACL-Core cases", + "file": "crates/aprender-contracts/src/ontology/w3c.rs", + "grounding": "cited" + }, + { + "claim": "Unknown{Differential} is used on disagreement", "file": "crates/aprender-contracts/src/ontology/w3c.rs", - "grounding": "cited", - "line": 600 + "grounding": "cited" } ], - "raw_bytes": 2374, + "raw_bytes": 2997, "err_bytes": 0, "envelope_status": "SUCCESS", "verdict_source": "structured_output", @@ -59,10 +68,10 @@ "lane": 3, "status": "SUCCESS", "verdict": "PASS", - "summary": "Reviewed diff against ticket PMAT-3509 (ONT-4b2). Verified extract:code syn module-tree walk and extract:lean in-tree theorem extraction into contracts.nt under symbol/ and world/ roots. Verified 32 W3C SHACL-Core cases accounted for (16 vendored and run by shapes gate, 16 in NOT_VENDORED with explicit non-subset reasons). Verified tests/oracle scratch crate and make oracle / make oracle-check writing differential.json with 0 disagreements. Ran cargo test -p aprender-contracts-cli --test ont4b2_code_lean_w3c (8/8 passed), make oracle-check (PASS), and scripts/check_ont_ratchet.sh --check (PASS). Found no refutations.", + "summary": "Reviewed the diff for ticket PMAT-3509 (ONT-4b2). The diff implements code extraction via syn module-tree walk and Lean extraction, accounts for the 32 SHACL-Core cases (16 vendored and passing, 16 explicitly excluded by node-shape FORM reasons), sets up the out-of-workspace oracle crate and make oracle differential verification gate, and updates all census/README contract counts correctly. All verification tests and make oracle-check execute and pass clean.", "findings": [], - "raw_bytes": 2637, - "err_bytes": 100, + "raw_bytes": 2247, + "err_bytes": 0, "envelope_status": "SUCCESS", "verdict_source": "structured_output", "grounding_check": "parity", @@ -74,14 +83,25 @@ ], "dissent": [], "dedup": [ + { + "file": "Makefile", + "line": null, + "lanes_agreeing": [ + 2 + ], + "claims": [ + "make oracle writes differential.json and avoids cd because Makefile is .ONESHELL" + ] + }, { "file": "crates/aprender-contracts/src/ontology/w3c.rs", - "line": 600, + "line": null, "lanes_agreeing": [ 2 ], "claims": [ - "the_table_of_ont_0_is_accounted_for_case_by_case asserts CASES + NOT_VENDORED == 32 with no id twice" + "16 vendored cases and 16 NOT_VENDORED cases account for 32 W3C SHACL-Core cases", + "Unknown{Differential} is used on disagreement" ] } ], From 60c460827baf5e44e9d20a3d1a8b195fb0441e98 Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sat, 19 Sep 2026 20:37:58 +0200 Subject: [PATCH 11/11] audit: quorum-PMAT-3509 round 6 AGREED 3/3 on 3329c7cde (Refs PMAT-3509) Round 4's 3/3 lapsed to the merge of main ebda31de3 (#3533 lifted the same function 4b2 had already split; resolution: keep decide_named_gate/decide_shapes_gate, drop single_gate_outcome). Round 5 was two PASS and one lane timed out at 25 min (no verdict, not a finding); round 6 agreed. Pmat-Ticket: PMAT-3509 Co-Authored-By: Claude Fable 5.1 --- docs/audits/quorum-PMAT-3509.json | 167 ++++++++++++++++++++++++++---- 1 file changed, 149 insertions(+), 18 deletions(-) diff --git a/docs/audits/quorum-PMAT-3509.json b/docs/audits/quorum-PMAT-3509.json index 2ee0811e7b..01cb79a521 100644 --- a/docs/audits/quorum-PMAT-3509.json +++ b/docs/audits/quorum-PMAT-3509.json @@ -3,12 +3,12 @@ "base": "origin/main", "base_resolved": "origin/main", "base_note": "no origin/origin/main exists; judged against the local ref", - "head": "a6927091a2e29fdaa0de49757d88eed7298795cd", - "diff_sha256": "38b78103e05e00180cefa3caa0867f88229594a1445d7449e332cee4bdc216b8", + "head": "3329c7cde4f704673d06df5bb50ba2b4e5cf7271", + "diff_sha256": "d51c86448753916fb6e1c76e6a021045be8c49591161c73c1474de8398e3bd72", "width": 3, "executor": "agy", "prompt_mode": "file", - "prompt_bytes": 1479309, + "prompt_bytes": 1480188, "author": { "model": "claude-fable-5-1", "family": "claude", @@ -20,9 +20,25 @@ "lane": 1, "status": "SUCCESS", "verdict": "PASS", - "summary": "Reviewed diff against ticket PMAT-3509 (ONT-4b2). Verified extract:code syn module-tree walk and extract:lean in-tree theorem extraction into contracts.nt under symbol/ and world/ roots. Verified 32 W3C SHACL-Core cases accounted for (16 vendored and run by shapes gate, 16 in NOT_VENDORED with explicit non-subset reasons). Verified tests/oracle scratch crate and make oracle / make oracle-check writing differential.json with 0 disagreements. Ran cargo test -p aprender-contracts-cli --test ont4b2_code_lean_w3c (8/8 passed), make oracle-check (PASS), and scripts/check_ont_ratchet.sh --check (PASS). Found no refutations.", - "findings": [], - "raw_bytes": 2612, + "summary": "I have reviewed the diff completely. The diff implements all features asked by the PMAT-3509 ticket and fulfills all the acceptance criteria. `tests/oracle` is a detached workspace crate executing the SHACL standard check. `ShapesOutcome::Differential` successfully captures W3C case validation disagreements and delegates `Verdict::Unknown(Reason::Differential)`. The syn-based module tree extraction runs exactly as stated. The 32 cases are accounted for (16 vendored and 16 NOT_VENDORED). No refutations found.", + "findings": [ + { + "claim": "make oracle writing tests/oracle/differential.json (release gate only, R-13); Unknown{Differential} on disagreement", + "file": "crates/aprender-contracts-cli/src/ontology/w3c.rs", + "grounding": "cited" + }, + { + "claim": "extract:code (syn module-tree walk over the bound symbols) and extract:lean (the in-tree theorems) into contracts.nt under the symbol/ and world/ roots", + "file": "crates/aprender-contracts/src/ontology/extract/code.rs", + "grounding": "cited" + }, + { + "claim": "the ONT-0 table's 32 W3C SHACL-Core cases accounted for one by one — 16 vendored and run by the shapes gate (w3c_cases_passed), 16 NOT vendored because their FORM (a constraint on the node shape itself) is outside the subset", + "file": "crates/aprender-contracts/src/ontology/w3c.rs", + "grounding": "cited" + } + ], + "raw_bytes": 3960, "err_bytes": 0, "envelope_status": "SUCCESS", "verdict_source": "structured_output", @@ -36,25 +52,30 @@ "lane": 2, "status": "SUCCESS", "verdict": "PASS", - "summary": "Reviewed diff against ticket PMAT-3509 (ONT-4b2). Verified `extract:code` and `extract:lean` into `contracts.nt`. Verified 32 W3C SHACL-Core cases are accounted for (16 vendored + 16 NOT_VENDORED). Verified `tests/oracle` scratch crate and `make oracle` writing `differential.json` with the `Unknown{Differential}` handling on disagreement. No refutations found.", + "summary": "The diff perfectly implements the requested ticket PMAT-3509 (ONT-4b2). The syn module-tree walk over bound symbols (extract:code) and the in-tree theorems (extract:lean) are extracted into contracts.nt under the symbol/ and world/ roots. The ONT-0 table's 32 W3C SHACL-Core cases are accounted for, with 16 vendored cases run by the shapes gate and 16 explicitly listed as NOT_VENDORED because their FORM falls outside the subset. The tests/oracle/ scratch crate is created and make oracle successfully writes to tests/oracle/differential.json with proper handling for Unknown{Differential} upon disagreement.", "findings": [ { - "claim": "make oracle writes differential.json and avoids cd because Makefile is .ONESHELL", + "claim": "extract:code and extract:lean walk and emit to contracts.nt under symbol/ and world/ roots", + "file": "contracts/contracts.nt", + "grounding": "cited" + }, + { + "claim": "tests/oracle/ scratch crate + make oracle writing tests/oracle/differential.json", "file": "Makefile", "grounding": "cited" }, { - "claim": "16 vendored cases and 16 NOT_VENDORED cases account for 32 W3C SHACL-Core cases", + "claim": "16 NOT vendored because their FORM (a constraint on the node shape itself) is outside the subset", "file": "crates/aprender-contracts/src/ontology/w3c.rs", "grounding": "cited" }, { - "claim": "Unknown{Differential} is used on disagreement", - "file": "crates/aprender-contracts/src/ontology/w3c.rs", + "claim": "Unknown{Differential} on disagreement", + "file": "crates/aprender-contracts-cli/tests/ont4b2_code_lean_w3c.rs", "grounding": "cited" } ], - "raw_bytes": 2997, + "raw_bytes": 3840, "err_bytes": 0, "envelope_status": "SUCCESS", "verdict_source": "structured_output", @@ -68,9 +89,38 @@ "lane": 3, "status": "SUCCESS", "verdict": "PASS", - "summary": "Reviewed the diff for ticket PMAT-3509 (ONT-4b2). The diff implements code extraction via syn module-tree walk and Lean extraction, accounts for the 32 SHACL-Core cases (16 vendored and passing, 16 explicitly excluded by node-shape FORM reasons), sets up the out-of-workspace oracle crate and make oracle differential verification gate, and updates all census/README contract counts correctly. All verification tests and make oracle-check execute and pass clean.", - "findings": [], - "raw_bytes": 2247, + "summary": "I have reviewed the prompt brief for PMAT-3509 (ONT-4b2) in full.\n\n### Summary of Audit:\n1. **`extract:code` & `extract:lean`**:\n - `extract:code` performs a `syn` module-tree walk over bound symbols, outputting `sym:*` terms into `contracts.nt` under the `symbol/` IRI root.\n - `extract:lean` extracts in-tree Lean 4 theorems into `contracts.nt` under the `world/` IRI root.\n\n2. **W3C SHACL-Core Accounting**:\n - The 32 W3C SHACL-Core cases are fully accounted for: 16 vendored and executed under the shapes gate, and 16 non-vendored with explicit non-supported shape FORM reasons documented.\n\n3. **Oracle Scratch Crate & Differential Gate**:\n - Out-of-workspace scratch crate created in `tests/oracle/`.\n - Makefile targets `oracle` and `oracle-check` generate and diff `tests/oracle/differential.json`.\n - Returns `Unknown{Differential}` on disagreement.\n\n4. **Ratchet & Census Integrity**:\n - Ratchet check updated and verified. Contract census count properly incremented to 1799 across all tracking files (`README.md`, `contracts/census.json`, `contracts/contracts.nt`).\n\nNo refutations, weakened quality gates, unbacked receipt claims, or forbidden scope additions were found.\n\nVerdict: **PASS**", + "findings": [ + { + "claim": "extract:code syn module-tree walk over bound symbols generates sym:* terms under symbol/ root in contracts.nt", + "file": "crates/aprender-contracts/src/ontology/extract/code.rs", + "fix": "", + "grounding": "cited", + "line": 1 + }, + { + "claim": "extract:lean extracts in-tree theorems into contracts.nt under world/ root", + "file": "crates/aprender-contracts/src/ontology/extract/lean.rs", + "fix": "", + "grounding": "cited", + "line": 1 + }, + { + "claim": "32 W3C SHACL-Core cases accounted for (16 vendored, 16 NOT_VENDORED with explicit FORM reasons)", + "file": "crates/aprender-contracts/src/ontology/w3c.rs", + "fix": "", + "grounding": "cited", + "line": 470 + }, + { + "claim": "tests/oracle scratch crate decoupled from workspace, Makefile oracle target generates differential.json and checks for disagreements emitting Unknown{Differential}", + "file": "tests/oracle/src/main.rs", + "fix": "", + "grounding": "cited", + "line": 1 + } + ], + "raw_bytes": 5706, "err_bytes": 0, "envelope_status": "SUCCESS", "verdict_source": "structured_output", @@ -90,18 +140,99 @@ 2 ], "claims": [ - "make oracle writes differential.json and avoids cd because Makefile is .ONESHELL" + "tests/oracle/ scratch crate + make oracle writing tests/oracle/differential.json" + ] + }, + { + "file": "contracts/contracts.nt", + "line": null, + "lanes_agreeing": [ + 2 + ], + "claims": [ + "extract:code and extract:lean walk and emit to contracts.nt under symbol/ and world/ roots" + ] + }, + { + "file": "crates/aprender-contracts-cli/src/ontology/w3c.rs", + "line": null, + "lanes_agreeing": [ + 1 + ], + "claims": [ + "make oracle writing tests/oracle/differential.json (release gate only, R-13); Unknown{Differential} on disagreement" + ] + }, + { + "file": "crates/aprender-contracts-cli/tests/ont4b2_code_lean_w3c.rs", + "line": null, + "lanes_agreeing": [ + 2 + ], + "claims": [ + "Unknown{Differential} on disagreement" + ] + }, + { + "file": "crates/aprender-contracts/src/ontology/extract/code.rs", + "line": null, + "lanes_agreeing": [ + 1 + ], + "claims": [ + "extract:code (syn module-tree walk over the bound symbols) and extract:lean (the in-tree theorems) into contracts.nt under the symbol/ and world/ roots" + ] + }, + { + "file": "crates/aprender-contracts/src/ontology/extract/code.rs", + "line": 1, + "lanes_agreeing": [ + 3 + ], + "claims": [ + "extract:code syn module-tree walk over bound symbols generates sym:* terms under symbol/ root in contracts.nt" + ] + }, + { + "file": "crates/aprender-contracts/src/ontology/extract/lean.rs", + "line": 1, + "lanes_agreeing": [ + 3 + ], + "claims": [ + "extract:lean extracts in-tree theorems into contracts.nt under world/ root" ] }, { "file": "crates/aprender-contracts/src/ontology/w3c.rs", "line": null, "lanes_agreeing": [ + 1, 2 ], "claims": [ - "16 vendored cases and 16 NOT_VENDORED cases account for 32 W3C SHACL-Core cases", - "Unknown{Differential} is used on disagreement" + "16 NOT vendored because their FORM (a constraint on the node shape itself) is outside the subset", + "the ONT-0 table's 32 W3C SHACL-Core cases accounted for one by one — 16 vendored and run by the shapes gate (w3c_cases_passed), 16 NOT vendored because their FORM (a constraint on the node shape itself) is outside the subset" + ] + }, + { + "file": "crates/aprender-contracts/src/ontology/w3c.rs", + "line": 470, + "lanes_agreeing": [ + 3 + ], + "claims": [ + "32 W3C SHACL-Core cases accounted for (16 vendored, 16 NOT_VENDORED with explicit FORM reasons)" + ] + }, + { + "file": "tests/oracle/src/main.rs", + "line": 1, + "lanes_agreeing": [ + 3 + ], + "claims": [ + "tests/oracle scratch crate decoupled from workspace, Makefile oracle target generates differential.json and checks for disagreements emitting Unknown{Differential}" ] } ],