feat(VCR-ISA-001): extend generate-not-mirror Rocq ISA model to nine i64 pseudo-ops (41→50)#773
Merged
Conversation
…i64 pseudo-ops (41→50)
Wave-2 lane: add the single-pseudo-op i64 register-pair shapes the selector
already emits but were DSL-uncovered — i64.clz/ctz/popcnt (unary counts),
i64.mul/shl/shr_u/shr_s (binary pairs), and i64.rotl/rotr (rotates). Each is
ONE flat-model pseudo-op (I64{Clz,Ctz,Popcnt,Mul,Shl,ShrU,ShrS,Rotl,Rotr}Pseudo)
with a fixed-register ancestor in CorrectnessI64.v, so the DSL work is pure
register-generalization + re-export of the GENERATED Gen.rule_X — same pattern
as i64.eqz (#767) and the I64SetCond family.
Per the #667 architecture: the shipped sel_dsl::RULES table EMITS
VcrSelRulesGenerated.v (Module Gen) + generated.rs; VcrSelRules.v DEFINES
rule_X := Gen.rule_X and states the 9 new correctness Qed directly about the
generated sequences — a table change regenerates Gen and breaks the matching
proof (drift unrepresentable at the instruction-sequence level).
Side conditions are minimal because each pseudo-op reads every operand half
into a local BEFORE any set_reg: NONE for the unary counts (rd may alias
rn_lo — the R0,R0,R1 in-place emit is admitted); a SINGLE rd_hi <> rd_lo for
the pair/rotate shapes (the high write must not destroy the low result word).
NOT the increment-3 three-condition pair set (those were flags-coupled ADDS+ADC
pairs). Statements are value-level like the i64.eqz ancestor (no exec_wasm_instr
hypothesis — the i64 ops aren't in WasmSemantics); shift/rotate count is the
low half only (combine_i32 cnt I32.zero), matching the _bits_spec axioms.
New TemplateOp shapes: I64PairBin (mul/shl/shr), I64PairRot (rotl/rotr),
I64UnaryCount (clz/ctz/popcnt), with matching template_expr (Rust ArmOp) and
coq_instrs (Coq constructor) generator arms. Three dispatch fns
(i64_unary_count_rule / i64_pair_bin_rule / i64_rot_rule) wire the delegation
in select_with_stack (delegation SelectWithStack — select_default's blind arms
are the holdout, unchanged).
Byte-invisible: SYNTH_NO_SEL_DSL=1 vs default is bit-identical for these ops
(mirror-pinned by sel_dsl_mirror_pin_i64_pair_rules_select_with_stack_242,
extended with dedicated count/rotate/pair-bin probe windows; probed 16→25).
Every select_with_stack emit site uses alloc_consecutive_pair, so rd_hi<>rd_lo
holds by construction.
Rocq green: bazel test //coq:verify_proofs (rocq_proofs + vcr_sel_rules_coverage
both PASS). Manifest + coverage gates updated (41→50). Docs + claims.yaml in
follow-up commits.
Refs #667 (VCR-ISA-001 lineage), #242.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
…-ops (41→50, 476→485) Re-derive the CI-pinned counts after landing the nine wave-2 i64 rules: - 476 → 485 Qed (README.md x3, CLAUDE.md, coq/STATUS.md headline + Total) - 41 → 50 selector-DSL rules / Qed theorems (claims.yaml SYNTH-SEL-DSL-RULES + SYNTH-SEL-DSL-COVERAGE-STATUS-MD, README/CLAUDE prose) - coq/STATUS.md per-op-family table: i64 mul (model-only → DSL-served), i64 shifts/rotates (5 → DSL-served), i64 bit-manip clz/ctz/popcnt (3 → DSL-served); DSL total 41→50 (26%→32%), model-only 95→86 (61%→55%); footnote 1 extended to the new pseudo-op-tier families. Verified green: python3 scripts/claim_check.py claims.yaml -> 19/19 hold. Refs #667 (VCR-ISA-001), #242. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
avrabe
added a commit
that referenced
this pull request
Jul 16, 2026
… WasmCert anchor + VCR-ISA 41→50, A64 7→50, 12× beat-LLVM, MC/DC provenance) (#775) Five oracle-gated lanes across semantics/capability/perf/assurance: - VCR-WASM-001 (#771): WasmCert-Coq source anchor (i32.add refinement, 474→476) - VCR-ISA-001 (#773): generate-not-mirror 41→50 ops (476→485 Qed) - #538 (#769): AArch64 milestone 2 — 7→50 integer ops, honest div/rem decline - #494 (#770): proof-carrying rem_u elision — 12× beat over clang -Os - #396 (#774): synth-provenance-v1 MC/DC source-to-object map (VCR-DEC-003) #757 stays OPEN (accepted residual — 7 reconstructions all green, needs reporter module; #772 lands them as regression guards). i64.trunc_f64 + #761 residuals noted. Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Wave-2 extension of the VCR-ISA-001 "generate, don't mirror" Rocq ISA model (#667 lineage, #242 epic): add the nine single-pseudo-op i64 register-pair shapes the selector already emits but were DSL-uncovered — 41 → 50 rules / Qed.
New ops (each a single flat-model pseudo-op with a fixed-register ancestor in
CorrectnessI64.v, so the DSL work is pure register-generalization + re-export, exactly likei64.eqz#767):i64.clz/i64.ctz/i64.popcntI64{Clz,Ctz,Popcnt}Pseudoi64.mul/i64.shl/i64.shr_u/i64.shr_sI64{Mul,Shl,ShrU,ShrS}Pseudoi64.rotl/i64.rotrI64{Rotl,Rotr}PseudoArchitecture (#667)
The shipped
sel_dsl::RULEStable EMITSVcrSelRulesGenerated.v(Module Gen) +generated.rs;VcrSelRules.vDEFINESrule_X := Gen.rule_Xand states the 9 new correctness Qed directly about the generated sequences. A table change regeneratesGenand breaks the matching proof — drift is unrepresentable at the instruction-sequence level. Demonstrated: flippingGen.rule_i64_mulfromI64MulPseudotoI64ShlPseudomakesrule_i64_mul_correctfail to compile (//coq:rocq_proofs FAILED TO BUILD); reverted.Side conditions (minimal, and correct)
Each pseudo-op reads every operand half into a local BEFORE any
set_reg, so:rdmay aliasrn_lo— theR0,R0,R1in-place emit is admitted);rd_hi <> rd_lo(the high write must not destroy the low result word).NOT the increment-3 three-condition pair set — those were flags-coupled ADDS+ADC pairs. Every
select_with_stackemit site usesalloc_consecutive_pair, sord_hi <> rd_loholds by construction. Statements are value-level like thei64.eqzancestor (noexec_wasm_instrhypothesis — the i64 ops aren't inWasmSemantics.v); shift/rotate count is the low half only (combine_i32 cnt I32.zero), matching the_bits_specaxioms.Verification
bazel test //coq:verify_proofs—//coq:rocq_proofs+//coq:vcr_sel_rules_coverageboth PASS (all 50 rules, 50 Qed, 0 Admitted in the rule table).SYNTH_NO_SEL_DSL=1vs default is bit-identical for these ops — mirror-pinned bysel_dsl_mirror_pin_i64_pair_rules_select_with_stack_242, extended with dedicated count/rotate/pair-bin probe windows (probed 16→25, each a byte-equality assert). The nineselect_defaultblind arms are the holdout, unchanged (Delegation::SelectWithStack).cargo test -p synth-cli --test frozen_codegen_bytes) 10/10 intact;cargo test -p synth-synthesis --lib624/624.python3 scripts/claim_check.py claims.yaml→ 19/19 hold (476→485 Qed, 41→50 rules, STATUS coverage 26%→32%).clippy --workspace --all-targets -D warningsclean.Refs #667 (VCR-ISA-001), #242. Do not merge without review.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L