feat(joinir): Phase 131-11 A-C - InfiniteEarlyExit パターン追加(検出部分)

## Step A: Feature Detection
- LoopPatternKind::InfiniteEarlyExit (Pattern 5) 追加
- LoopFeatures::is_infinite_loop フィールド追加
- detect_infinite_loop() で loop(true) 検出

## Step B: Classification Logic
- classify() を更新: Pattern 5 を Pattern 4 より優先
- Pattern 4 を狭化: has_continue && !has_break のみ
- 誤ルーティング完全除去

## Step C: Pattern Module
- pattern5_infinite_early_exit.rs 新規作成
- Fail-Fast 設計: 超狭い shape guard
- lowering はスケルトン(Phase 131-11-D で実装)

## 動作確認
- Pattern 5 正常検出 
- Shape guards 動作(1 break, 1 continue, 1 carrier)
- Pattern 4 誤ルーティング回避 

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-14 09:59:34 +09:00
parent e1d706d2e0
commit 233a49d902
8 changed files with 253 additions and 17 deletions

View File

@ -164,6 +164,10 @@ pub fn try_lower_loop_pattern_to_joinir(
return Some(inst);
}
}
LoopPatternKind::InfiniteEarlyExit => {
// Phase 131-11: Not implemented yet in LoopForm-based router
eprintln!("[try_lower_loop_pattern] ⚠️ Pattern 5 (InfiniteEarlyExit) not implemented in LoopForm router");
}
LoopPatternKind::Unknown => {
eprintln!("[try_lower_loop_pattern] ❌ Unknown pattern, fallback to existing lowering");
}