Skip to content

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
avrabe merged 1 commit into
mainfrom
feat/50-vcr-wasm-i64-wire
Jul 18, 2026
Merged

feat(VCR-WASM-001): wire i64 add/sub/mul/and/or/xor into exec_wasm_instr — close the op-level-only residual (#242)#820
avrabe merged 1 commit into
mainfrom
feat/50-vcr-wasm-i64-wire

Conversation

@avrabe

@avrabe avrabe commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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_instr returned None for their constructors. This lane wires them and lands the executor-level proofs.

What changed

  • coq/Synth/WASM/WasmSemantics.v — wires I64Add/I64Sub/I64Mul/I64And/I64Or/I64Xor into exec_wasm_instr (via pop2_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 real exec_wasm_instr and 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 .v headers + coq/STATUS.md.

Ops wired (6)

i64.add, i64.sub, i64.mul, i64.and, i64.or, i64.xor

Proof verification method

bazel test //coq:verify_proofsobserved 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_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. python3 scripts/claim_check.py claims.yaml25/25 hold.

Frozen-bytes confirmation (CRITICAL for this lane)

exec_wasm_instr is 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_bytes10/10 passed, unchanged.

Rivet

New sw-verification SWVER-021 with links: type: verifies / target: VCR-WASM-001; SWVER-020 updated. rivet validate introduces zero new ERROR: 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

…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

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe
avrabe merged commit 4256222 into main Jul 18, 2026
39 checks passed
@avrabe
avrabe deleted the feat/50-vcr-wasm-i64-wire branch July 18, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant