Skip to content

SVL v0.7.0 — D4 band-9 pair; re-scored 6.60/10, 4th of 9

Latest

Choose a tag to compare

@sudo-ai-git sudo-ai-git released this 13 Nov 08:24

What is in this release

The D4 band-9 pair is complete. §17.2 of SVL_FORMAL_RATING.md stated the band-9
requirement for D4: "proofs bound to the emitted code plus a whole-program specification."
Both halves now exist, with verified mechanisms.

(a) Compilation certificate — the artifact is provably the compilation

PCCWasmModule binds the artifact to its source through the compiler, with three
bindings:

# Binding Catches
1 artifact_sha256 — the artifact's own canonical bytes (custom sections stripped) a modified artifact
2 emitted_sha256 — recompiling the source emits the recorded WAT hash a forged claim
3 the artifact's bytes ARE the recompilation's a swapped body that passes both individual checks

Plus compiler_version, which is recorded and checked. verify_pcc_wasm also re-derives
the gate and SMT verdict from the source.

Measured — the "before" is the point:

valid artifact                          -> PASS
swapped body, forged-but-consistent      -> REFUSED   (this PASSED before)
one flipped body byte                    -> REFUSED   ("modified after certification")
forged emitted hash                      -> REFUSED
forged compiler version                  -> REFUSED
wrong source                             -> REFUSED
pre-certificate legacy artifact          -> REFUSED   ("no compilation certificate")

Without binding #3, an attacker re-signs the swapped body and both claims are
self-consistent. Rule: when a certificate has two halves, the check that ties them
together is the one that does the work.

(b) Whole-program specification — module-scoped clauses

module m
  requires <expr>
  ensures  <expr>
{ func main() type int int { ... } }

Declares what the program guarantees, at module scope, over the entry point (the
function exported as <module>_main). The clauses merge with the entry point's own
(A && B) and are discharged by the same Z3 contract prover — a module spec is
proved, not tested. A module with a spec but no main is refused, because the spec
would describe nothing. The PCC artifact records a module-spec layer.

satisfied spec                 -> accepted
violated ensures               -> REFUSED
unsatisfiable requires         -> REFUSED
spec with no entry point       -> REFUSED
no spec / function spec only   -> unaffected

Re-score: 6.60 / 10, 4th of 9

SVL_FORMAL_RATING.md §19. D4 8 → 9; the rank moved past OCaml (6.50).

The residual gap — stated plainly, not buried

This is not a proof that the WASM is correct.

What is proved What is not
the source satisfies its whole-program specification (Z3-discharged) that the emitted WASM refines the source
the artifact is the compilation of that source (translation validation) that the compiler is correct in general — it is validated empirically, by 22/22 differential execution
every substituted artifact is detected —

A reviewer who requires the obligation itself to be discharged on the WASM would hold
D4 at 8. §19.3 makes the band judgement explicit: a machine-checked chain — source proof →
pinned compiler → artifact bytes, with every substitution detected and the compiler
differentially validated — meets the bar, and the remaining gap is a compiler-correctness
gap rather than an assurance gap.

Verification

Gate Result
pytest 319 passed
spike suite 41/43 (the 2 are the declared stubs H36/H37)
corpus 25 compiled, 0 refused
probes 30 PASS / 0 FAIL / 3 INFO
differential execution 22/22 agree
verifier corpus 0 disagreements
mutation checks 6/6 · 2/2 · 3/3 · 4/4 · 4/4 · 5/5 · 6/6 · 3/3 · 4/4 reintroduced defects falsified their pinned test
clean-venv install pip install . → svlc version 0.7.0, sieve runs correct

Asset

svl-sieve-v0.7.0.wasm — the attested examples/sieve.svl build. Verify it:

python3 examples/attest.py --verify svl-sieve-v0.7.0.wasm

Not claimed

  • That the WASM is correct. The obligation is on the AST; the artifact binding is
    translation validation; the compiler is validated empirically.
  • Printed-output specification. The module spec covers the entry point's result;
    the program's output is not yet specified.
  • Semantic translation validation. The certificate binds bytes, not refinement.