feat(phi): Phase 26-B-2 - BodyLocalPhiBuilder実装完了

BodyLocalPhiBuilder Box実装 - BodyLocal変数PHI生成判定専門化

# 実装内容
- BodyLocalPhiBuilder struct実装(~440行)
- BodyLocal変数のPHI生成判定統一API
- 包括的ユニットテスト(12テスト、100%カバレッジ)

# 提供機能
1. should_generate_exit_phi() - 変数単体のPHI生成要否判定
2. filter_exit_phi_candidates() - Exit PHI候補フィルタリング
3. classify_variable() - 変数分類取得(Pinned/Carrier/BodyLocalExit/BodyLocalInternal)
4. inspector_mut/inspector() - LocalScopeInspectorBox参照取得

# 分類ロジック
- Pinned: 常にExit PHI必要
- Carrier: 常にExit PHI必要
- BodyLocalExit: 全Exit predで定義 → PHI必要
- BodyLocalInternal: 一部Exit predで定義 → PHI不要(Option C修正)

# テスト結果
 12/12テスト全PASS
 skip_whitespace実シナリオ検証済み
 __pin$一時変数フィルタリング検証済み

# Box-First理論
- 責任分離: BodyLocal PHI判定を単一Boxに集約
- 組み合わせ: LoopVarClassBox + LocalScopeInspectorBoxを活用
- テスト容易性: 独立してテスト可能

# 次のステップ
Phase 26-B-3: 既存コード統合(loopform_builder.rs等)

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-11-20 17:45:15 +09:00
parent 33186e1e20
commit 54f6ce844b
2 changed files with 502 additions and 0 deletions

View File

@ -20,6 +20,7 @@ pub mod loop_var_classifier;
// Phase 26-B: Box-First Refactoring
pub mod phi_input_collector;
pub mod body_local_phi_builder;
// Public surface for callers that want a stable path:
// Phase 1: No re-exports to avoid touching private builder internals.