|
|
23ebb86e6e
|
docs(joinir): Phase 47 - Normalized P3 (If-Sum) design
Complete design for extending Normalized JoinIR to Pattern3 (if-sum) loops,
reusing 90% of existing P2 infrastructure.
Key insight: P3 already uses P2's Structured JoinIR foundation (Phase 220
ConditionEnv integration), so Normalized extension is straightforward.
Design documents:
- phase47-norm-p3-design.md: Complete P3 Normalized design
- Infrastructure reuse analysis (ConditionEnv, CarrierInfo, ExitLine)
- Representative loops identified (phase212_if_sum_min primary target)
- StepScheduleBox extension (IfCond, ThenUpdates, ElseUpdates)
- JpInst reuse (If instruction already exists)
- Implementation strategy (dev-only → canonical)
- File impact estimate (~365 lines, pure additive)
- phase47-test-files-inventory.md: P3 test file catalog
- 3 P3 test files analyzed
- phase212_if_sum_min.hako: Single carrier (PRIMARY)
- phase217_if_sum_multi_min.hako: Multi-carrier (sum + count)
- phase218_json_if_sum_min.hako: Variable accumulation (sum + i)
Architecture:
- Unified Normalized for P1/P2/P3 (same pipeline)
- Conditional updates only difference vs P2
- No P2 code changes needed (pure additive)
Benefits:
- 90% infrastructure reuse from P2
- Proven incremental rollout (dev → canonical)
- Clear path to P4 (continue pattern)
Implementation roadmap:
- Phase 47-A: Minimal sum_count (dev-only)
- Phase 47-B: array_filter (body-local + method calls)
- Phase 47-C: Canonical promotion
Updates:
- joinir-architecture-overview.md: Added Phase 47 section
- CURRENT_TASK.md: Updated Phase 47 entry (Design Complete)
Status: Design phase complete, ready for implementation
|
2025-12-12 04:50:26 +09:00 |
|