feat(plan): Phase 282 P5 - Pattern3 ExtractionBased Migration & Classification
- Pattern3 extraction logic separated to extractors/pattern3.rs - ExtractionBased strategy: pure functions, Fail-Fast, SSOT - Pattern classification restored (AST-based pattern detection) - Pattern1 extractor migrated (extractors/pattern1.rs) - Documentation: phase-282 README updated, joinir-architecture updated 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -163,7 +163,7 @@ Pattern numbers (1-9+) became architectural decision points:
|
||||
- `seq(a, b)`: Sequential composition (Normal wiring)
|
||||
- `if_(header, cond, t, e, join)`: Conditional composition (Branch wiring)
|
||||
- `loop_(loop_id, header, after, body)`: Loop composition (Break/Continue wiring)
|
||||
- `cleanup(body, cleanup)`: Cleanup composition (planned, Phase 280+)
|
||||
- `cleanup(main, cleanup_frag, normal_target, ret_target)`: Cleanup composition (Normal/Return wiring; Phase 281)
|
||||
|
||||
**Reference**: `docs/development/current/main/design/edgecfg-fragments.md` (Active SSOT)
|
||||
|
||||
@ -183,36 +183,36 @@ Both routes converge on the same Frag composition SSOT:
|
||||
- Plan route: Handles complex scan patterns (Pattern6/7) via DomainPlan → CorePlan → Frag
|
||||
- Both routes use same Frag composition API for CFG lowering (no duplication)
|
||||
|
||||
### Pattern Absorption Status (Phase 280)
|
||||
### Pattern Absorption Status (Phase 281)
|
||||
|
||||
| Pattern | Structure | Status | Absorption Target |
|
||||
|---------|-----------|--------|-------------------|
|
||||
| **Pattern6** | ScanWithInit (forward scan) | Plan-based (Phase 273) | **Phase 280 C: Frag refactor target** |
|
||||
| **Pattern7** | SplitScan (conditional split) | Plan-based (Phase 273) | **Phase 280 C: Frag refactor target** |
|
||||
| Pattern8 | BoolPredicateScan (is_integer) | JoinIR-based | Phase 281+ (migration planned) |
|
||||
| **Pattern6** | ScanWithInit (early-exit) | ✅ compose-based (Phase 281) | absorbed (hand-roll removed) |
|
||||
| **Pattern7** | SplitScan (then/else join) | ✅ compose-based (Phase 281) | absorbed (hand-roll removed) |
|
||||
| Pattern8 | BoolPredicateScan (is_integer) | JoinIR-based | Phase 283+ (migration planned) |
|
||||
| Pattern9 | AccumConstLoop (bridge) | JoinIR-based (Phase 271) | 撤去条件 defined (minimal loop SSOT) |
|
||||
| Pattern1-5 | Legacy (SimpleWhile, Break, IfPhi, Continue, InfiniteEarlyExit) | JoinIR-based | Test/error stubs (not absorbed) |
|
||||
|
||||
**Phase 280 Focus**: Pattern6/7 preparation (documentation of hand-rolled locations, defer refactor to Phase 281)
|
||||
**Phase 281 Result**: Pattern6/7 absorbed (compose SSOT), hand-rolled Frag eliminated
|
||||
|
||||
**Absorption criteria** (Pattern6/7 → Frag composition):
|
||||
1. Hand-rolled Frag construction identified (function name + 識別コメント)
|
||||
2. TODO comments documenting future compose_* migration path
|
||||
3. Behavior-preserving refactor deferred to Phase 281 (Phase 280 = SSOT positioning only)
|
||||
3. Behavior-preserving refactor completed in Phase 281
|
||||
|
||||
### Absorption Timeline
|
||||
|
||||
**Phase 280 (Current)**: SSOT positioning + 導線固定
|
||||
**Phase 280 (Complete)**: SSOT positioning + 導線固定
|
||||
- A: Documentation (edgecfg-fragments.md → Active SSOT)
|
||||
- B: API solidification (compose.rs contract verification)
|
||||
- C: Pattern preparation (Pattern6/7 hand-rolled locations documented)
|
||||
- **Goal**: Establish Frag composition as THE absorption destination
|
||||
- **Non-Goal**: Full Pattern6/7 migration (deferred to Phase 281)
|
||||
|
||||
**Phase 281 (Planned)**: Full Pattern6/7 absorption
|
||||
- Replace hand-rolled Frag construction with compose_* calls
|
||||
- Behavior-preserving verification (smoke tests)
|
||||
- Goal: Pattern6/7 use compose::if_/loop_ exclusively
|
||||
**Phase 281 (Complete)**: Full Pattern6/7 absorption
|
||||
- Pattern7: body cond_match → `compose::if_()`
|
||||
- Pattern6: early-exit → `compose::cleanup()`(Normal/Return wiring)
|
||||
- Behavior-preserving verification (VM/LLVM smokes)
|
||||
|
||||
**Phase 282 (Planned)**: Router shrinkage
|
||||
- Pattern numbers → test labels only
|
||||
|
||||
Reference in New Issue
Block a user