docs(phase256): document P1.13.5 boundary SSOT unification

Phase 256.8.5 Cleanup: Document the completion of boundary SSOT
unification across Pattern4/6/7.

Updates:
- Phase 256 README: Add P1.13.5 section with implementation details
- 10-Now.md: Add P1.13.5 to recent fixes list

Documentation highlights:
- Background: Pattern2 fix needed horizontal expansion
- Implementation: SSOT unified across all patterns (2,3,4,6,7)
- Benefits: Structural prevention of entry param mismatch
- Results: ~40 lines of duplication eliminated, magic numbers removed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-20 20:11:45 +09:00
parent 636b1406bc
commit 8394b2d6fd
2 changed files with 27 additions and 0 deletions

View File

@ -62,6 +62,7 @@
- P1.5-DBG: boundary entry params の契約チェックを追加VM実行前 fail-fast
- P1.6: 契約チェックの薄い集約 `run_all_pipeline_checks()` を導入pipeline の責務を縮退)。
- P1.13: Pattern2 boundary entry params を `join_module.entry.params` SSOT へ寄せたValueId 推測生成の撤去)。
- P1.13.5: Boundary SSOT 統一Pattern4/6/7 横展開 + 共通ヘルパ `get_entry_function()` 抽出)。
## 2025-12-20Phase 257last_index_of early return loop🔜

View File

@ -522,6 +522,32 @@ Hint: parameter ValueId mismatch indicates boundary.join_inputs constructed in w
- Fixture: `apps/tests/phase257_p0_last_index_of_min.hako`
- Integration smokes: `phase257_p0_last_index_of_vm.sh`, `phase257_p0_last_index_of_llvm_exe.sh`
### P1.13.5: Boundary SSOT Unification - Pattern4/6/7 (完了)
背景:
- P1.13 で Pattern2 の boundary entry_param_mismatch を根治したが、同じ hardcoded ValueId パターンが Pattern4/6/7 にも存在していた
実施内容:
- Pattern4/6/7 の `boundary.join_inputs` を hardcoded ValueId(0), ValueId(PARAM_MIN + k) から撤去
- 全パターン2, 3, 4, 6, 7`join_module.entry.params.clone()` を SSOT として統一
- Fail-fast validationparams count mismatchを全パターンに追加
- 共通ヘルパ `get_entry_function()` を抽出(`patterns/common/joinir_helpers.rs`
修正ファイル:
- `src/mir/builder/control_flow/joinir/patterns/pattern4_with_continue.rs`
- `src/mir/builder/control_flow/joinir/patterns/pattern6_scan_with_init.rs`
- `src/mir/builder/control_flow/joinir/patterns/pattern7_split_scan.rs`
- `src/mir/builder/control_flow/joinir/patterns/common/joinir_helpers.rs` (新規・ヘルパ追加)
結果:
- Entry param mismatch の構造的防止(全パターン統一)
- Magic number の完全撤去PARAM_MIN の hardcoded 使用ゼロ)
- コードの保守性・一貫性向上(~40行の重複削減
コミット:
- `636b1406b` refactor(joinir): extract get_entry_function helper
- `17049d236` docs(phase256): document P1.13.5 boundary SSOT unification
P1.5 Task 3:
- `ValueId(57)` が「何の JoinIR 値の remap 結果か」を確定し、定義側dstが MIR に落ちているかを追う
- 例: `sep_len = sep.length()` の BoxCall dst が収集/変換/順序のどこかで欠けていないか