|
|
dc4eda9cdc
|
docs: Phase 195 implementation status + Phase 196 (Select bug) planning
Phase 195 implementation complete (Lowerer side):
- loop_with_if_phi_minimal.rs: multi-carrier PHI generation (sum + count)
- pattern3_with_if_phi.rs: dynamic single/multi-carrier handling
- ExitLine/CarrierVar.join_id: NO CHANGES NEEDED (existing infra worked!)
- YAGNI principle validated - PhiGroupBox was not necessary
Blocker discovered: Nested Select→Branch+Phi conversion bug
- JoinIR correctly generates: ValueId(20) = phi [(bb3, 14), (bb4, 18)]
- MIR incorrectly produces: %27 = phi [%28, bb8], [%32, bb9] (undefined)
- Root cause: joinir_block.rs Select expansion (bridge layer)
- NOT a Phase 195 issue - pre-existing bug in Select conversion
Phase 196 planned (NEW):
- 196-1: Document select_expansion / instruction_rewriter responsibilities
- 196-2: Formalize "1 Select = 3 blocks + 1 PHI" interface
- 196-3: Debug block reuse / block ID mapping
- 196-4: Fix and E2E test (phase195_sum_count.hako → 72)
Documentation updates:
- phase195-pattern3-extension-design.md: Implementation Status section
- CURRENT_TASK.md: Phase 195 complete + Phase 196 TODO
- joinir-architecture-overview.md: P3 Lowerer complete, bridge blocker noted
Key insight: "Pattern side is done, problem is in bridge side"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2025-12-09 13:58:31 +09:00 |
|
|
|
22f97b67b1
|
docs: Phase 195 Pattern 3 extension design (multi-carrier support)
Phase 195 design document for P3 (If-Else PHI) multi-carrier expansion:
- Goal: Handle 2-3 carriers in if-else branches simultaneously
- Scope: if-complete multi-carrier updates (flag+buffer, sum+count patterns)
Task breakdown:
- 195-1: Loop inventory (_parse_string simple, if-sum patterns)
- 195-2: LoopUpdateSummary/CarrierInfo design (multi-carrier support)
- 195-3: Pattern3 lowerer design (PhiGroup vs ExitLine extension)
- 195-4: Implementation scope (2-3 carriers, existing UpdateKind range)
- 195-5: Documentation updates (CURRENT_TASK.md + overview)
Design decisions:
- ✅ ExitLine extension (no PhiGroupBox - YAGNI principle)
- ✅ Both-branch carrier definition check (unchanged = use previous value)
- ❌ No ConditionEnv expansion (Phase 200+ deferred)
- ❌ LoopBodyLocal + MethodCall mix deferred to Phase 195+
Target loops:
1. JsonParser _parse_string (escaped flag + buffer)
- Carrier 1: escaped (BoolFlag) - conditional flag
- Carrier 2: buffer (StringAppend) - else-only update
2. selfhost if-sum (sum + count)
- Carrier 1: sum (NumberAccumulation) - then-only update
- Carrier 2: count (CounterLike) - then-only update
Test cases designed:
- phase195_flag_buffer.hako (BoolFlag + StringAppend)
- phase195_sum_count.hako (NumberAccumulation + CounterLike)
Expected outcome:
- phase195-pattern3-extension-design.md (complete design spec)
- Clear implementation scope for Phase 195-impl
- Path to 40% → 60% JsonParser coverage
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2025-12-09 13:22:14 +09:00 |
|