STEP 1430 — D-FUMT₈ 汎用等価性検査器 (10 operator PASS)

2026-08-27 · STEP 1426 feasibility の 正式 tool 化 · 10/10 PASS 26 秒 · eqy + sby + bitwuzla

⚠ 命名 confusion 予防 (STEP 1446 retrofit): 別 tool の STEP 1429 「D-FUMT₈ 関数完全性検査器」 と 命名 近似 だが 完全別 layer + 別 concept — 前者 = MCP tool、 演算子集合 の functional completeness 判定 / 本 tool (STEP 1430) = Verilog RTL、 2 実装 の semantic equivalence 判定。 詳細対比 → docs/CROSS_REFERENCE_STEP1429_1430.md

要約

STEP 1426 で 実測した 「3-bit 全単射 で eqy 薄い wrapper OK」 の 藤本さん 見立て を **正式な 汎用 8 値 equivalence checker tool** に 昇格。 D-FUMT₈ ALU の 10 operator (NOP/AND/OR/NOT/OMEGA/PHI/PSI/XOR/ADIABATIC/RESET) それぞれで gold vs alt 実装の 意味等価性を bitwuzla SMT depth 1 exhaustive で verify、 **10/10 PASS 26 秒**。

実測 result

✅ 10/10 PASS in 26 秒
=== D-FUMT₈ equivalence check (10 operators) ===
  OSS_ROOT: /c/oss-cad-suite-parent/oss-cad-suite
  OP_DIR:   /c/Users/user/rei-aios/data/verilog/operators
  WORK_DIR: /c/Users/user/rei-aios/data/verilog/operators/_work

  [PASS] nop
  [PASS] and
  [PASS] or
  [PASS] not
  [PASS] omega
  [PASS] phi
  [PASS] psi
  [PASS] xor
  [PASS] adiabatic
  [PASS] reset

=== Summary ===
  PASS: 10 / 10
  FAIL: 0
  SKIP: 0
  Elapsed: 26s

Operator matrix (10 件)

#oparitygoldalt意味
1NOPu8-entry ternary chainout = aidentity
2ANDb32-entry casex + cross-tier if-elseflat 64-entry caseBelnap meet + higher-tier + LOW-wins
3ORb32-entry casex + cross-tier if-elseflat 64-entry caseBelnap join + higher-tier + LOW-wins
4NOTu8-entry ternary chainbit-algebra (flip_lower ∨ flip_zero_inf)classical-axis flip
5OMEGAu8-entry ternary chain{a[2], a[1], a[0] & ~a[2]}idempotent collapse
6PHIu8-entry ternary chaina ^ 3'b001pair-swap
7PSIu8-entry ternary chain{1'b0, a[1:0]}convergence (clear bit2)
8XORb64-entry ternary chaina ^ bbit-parallel XOR
9ADIABATICu(a==SELF) ? SELF : aout = aSELF-recover (tautologically identity)
10RESETu8-entry ternary chain (all 000)3'b000force FALSE

Quick start

# 前提: OSS CAD Suite installed (STEP 1426 で install 済 = C:/oss-cad-suite-parent/oss-cad-suite/)

# Single operator
bash scripts/eqy-dfumt8-check.sh not

# All 10 operators
bash scripts/eqy-dfumt8-check.sh all

実装 discipline 発見

1. case + output reg は $mem_v2 → xprop 通らない

初回 run で 6/10 が sby ERROR (Unhandled cell $mem_v2)。 Yosys が case-with-full-input-coverage を ROM primitive 化、 eqy 内部の xprop -formal pass が $mem_v2 対応外。

解決: gold を output wire + assign ... = (a==...) ? ... : ... chain 化 で 統一。 全 10 operator で assign form 統一 → 26 秒 で 10/10 PASS。

2. eqy strategy = sby 選択

sat strategy は output reg 系 skip、 sby 経由で SMT backend fallback = 汎用性高。

3. file format 規約: `ifdef GOLD/ALT split

各 operator の .v file 1 つに 2 実装を preprocessor で 埋め込み、 script が awk で 抽出。 file 数 半減 + 対応 pair の 明示。

Honest scope (7 条)

  1. 10 operator の 「gold vs alt」 equivalence proof のみ — 「回路 A vs 実際 synthesize 後 gate netlist」 は 未対応 (別 STEP candidate B.1)
  2. 8 値 = 2³ 全単射 encoding 前提、 5/7/9 値 の 場合 well-formedness constraint 必要
  3. gold impl 全て assign chain 統一 — 元 dfumt8_alu.v (case 形式) は 保持だが、 equivalence check target は chain 版 ($mem_v2 回避)、 元 code の 直接 verify は STEP 1426 sby 6-property BMC で cover
  4. make workaround — OSS CAD Suite Windows bundle に make 未同梱、 script 内 eqy -m + sby 手動 2 段 で 自動化
  5. SMT backend = bitwuzla (SBY default)、 depth 1 exhaustive で 全 input space (unary 2^3=8 or binary 2^6=64)
  6. spec 定義 fault は 検出しない — gold と alt が 同じ 齟齬 なら PASS、 spec 検証は Lean 4 refinement + SymbiYosys property assertion で 別途 cover
  7. novelty ゼロ — OSS CAD Suite 標準 workflow を D-FUMT₈ に 適用しただけ、 「世界初 8 値 equivalence checker」 主張なし

拡張 candidate (未来 STEP)

Artifact (STEP 1430)

Rei stack alignment