feat(VCR-WASM-001): wire i64 add/sub/mul/and/or/xor into exec_wasm_instr — close the op-level-only residual (#242)#820
Merged
Conversation
…str + executor-level refinement (#242) Closes the "op-level-only" residual for the six i64 arithmetic/bitwise ops. exec_wasm_instr previously returned None for the I64Add/I64Sub/I64Mul/I64And/ I64Or/I64Xor constructors, so those ops carried an op-level refinement lemma (I64.op = wasmcert_i64_op) but no executor-level lemma through the real executor. This batch: - WasmSemantics.v: wires the six ops into exec_wasm_instr (pop2_i64 / VI64, mirroring their proven i32 twins). - WasmCertBridge.v: adds the six executor-level refinement theorems (i64_{add,sub,mul,and,or,xor}_exec_refines_wasmcert), each routing through the real exec_wasm_instr and pinning the pushed value to the INDEPENDENT WasmCert reference. All 22 i64 integer ops now carry BOTH op-level and executor-level refinement. exec_wasm_instr is the semantics MODEL, not the code generator: the change is byte-invisible (frozen_codegen_bytes 10/10 unchanged). Proof gate: `bazel test //coq:verify_proofs` observed GREEN (//coq:rocq_proofs + //coq:vcr_sel_rules_coverage PASSED, exit 0) via nix+bazel. Bookkeeping (same commit): rocq_qed 585 -> 591 (+6 Qed), wasmcert_bridge_qed 98 -> 104; CLAUDE.md + coq/STATUS.md + claims.yaml bumped; artifacts/status.json + docs/status/FEATURE_MATRIX.md regenerated via `claim_check.py --emit-status`; claim_check green 25/25. Residual prose flipped in the .v headers and STATUS.md. New rivet sw-verification SWVER-021 (verifies VCR-WASM-001); SWVER-020 updated. Honest scope: the WasmCert reference remains a hand TRANSCRIPTION of the pinned coq9.0-wasm-2.2.0 sources (real external dep still blocked on unfree CompCert 3.16). Remaining WASM op coverage (div/rem trap rules, clz/ctz/popcnt, wrap/extend/reinterpret conversions, memory, control flow) is the named follow-up (Part B not done — named as follow-up). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VCR-WASM-001 (Track B) — v0.50 hub Lane 3 (DEPTH, proof)
Closes the "op-level-only" named residual from the v0.49 i64 transcription batch (#814). Six i64 arithmetic/bitwise ops (add/sub/mul/and/or/xor) had op-level refinement only because synth's WASM executor model
exec_wasm_instrreturnedNonefor their constructors. This lane wires them and lands the executor-level proofs.What changed
coq/Synth/WASM/WasmSemantics.v— wiresI64Add/I64Sub/I64Mul/I64And/I64Or/I64Xorintoexec_wasm_instr(viapop2_i64/VI64, mirroring their proven i32 twins).coq/Synth/WASM/WasmCertBridge.v— six new executor-level refinement theorems (i64_{add,sub,mul,and,or,xor}_exec_refines_wasmcert), each routing through the realexec_wasm_instrand pinning the pushed value to the INDEPENDENT WasmCert reference. The op-level lemmas they route through already existed and are proven.Result: all 22 i64 integer ops now carry BOTH op-level and executor-level refinement. Residual prose flipped in the
.vheaders +coq/STATUS.md.Ops wired (6)
i64.add,i64.sub,i64.mul,i64.and,i64.or,i64.xorProof verification method
bazel test //coq:verify_proofs— observed GREEN (nix+bazel,. nix-daemon.sh)://coq:rocq_proofs PASSED,//coq:vcr_sel_rules_coverage PASSED, "2 tests pass", exit 0.New Qed count
585 → 591 (+6 executor-level theorems; no new helper lemmas).
wasmcert_bridge_qed98 → 104. CLAUDE.md + coq/STATUS.md + claims.yaml bumped,artifacts/status.json+docs/status/FEATURE_MATRIX.mdregenerated viaclaim_check.py --emit-status.python3 scripts/claim_check.py claims.yaml→ 25/25 hold.Frozen-bytes confirmation (CRITICAL for this lane)
exec_wasm_instris the semantics model, NOT the code generator (zero Rust references to it). Extending it is byte-invisible:cargo test -p synth-cli --test frozen_codegen_bytes→ 10/10 passed, unchanged.Rivet
New sw-verification
SWVER-021withlinks: type: verifies / target: VCR-WASM-001;SWVER-020updated.rivet validateintroduces zero newERROR:lines (error count 52 → 52 with/without the artifact).Honest scope
Still a hand TRANSCRIPTION of the pinned coq9.0-wasm-2.2.0 sources — the real external dep stays blocked on the unfree CompCert 3.16 the current nixpkgs pin propagates. After this batch: all 22 i64 integer ops are executor-level (was 16 executor-level + 6 op-level-only). Remaining WASM op coverage (div/rem trap rules, clz/ctz/popcnt, wrap/extend/reinterpret conversions, memory, control flow) is the named follow-up.
Part B
Not done — named as follow-up (the wrap/extend/reinterpret conversion family is a full lane on its own; Part A alone is a complete lane).
Epic #242.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L