## Phase 286 P2.3: Pattern9 AccumConstLoop Plan化 PoC - DomainPlan::Pattern9AccumConstLoop 追加 - PlanNormalizer::normalize_pattern9_accum_const_loop() 実装 - PHI 2本(loop_var, acc_var) - const/var 両方 OK(sum = sum + 1 または sum = sum + i) - Pattern9 は Pattern1 より優先(より具体的なパターン) - Integration test: phase286_pattern9_frag_poc PASS (return: 3) - Regression: quick 154 PASS ## Phase 287: Router table-driven Plan extraction - PLAN_EXTRACTORS static table で Pattern6/7/4/9/1 を統一管理 - PlanExtractorEntry/PlanExtractorVariant 構造体追加 - try_plan_extractors() で ~100行 → 3行に集約 - メンテナンス性向上(新 Pattern 追加はテーブル1行追加のみ) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4.2 KiB
CURRENT_TASK (moved)
Status: SSOT
Scope: Repo root の旧リンク互換。現行の入口は docs/development/current/main/10-Now.md。
- Now:
docs/development/current/main/10-Now.md - Backlog:
docs/development/current/main/30-Backlog.md
Handoff (current)
状況(SSOT)
2025-12-26: Phase 286 P2.2 COMPLETE (Hygiene: extractor重複排除 + router小整理)
Pattern1/Pattern4 の Plan/Frag PoC 完了後、extractor の extract_loop_increment_plan を common_helpers.rs に統一、router の 3行パターン(normalize→verify→lower)を lower_via_plan() ヘルパーで共通化。~65行削減、quick 154 PASS 維持。
2025-12-26: Phase 286 P2.3 COMPLETE (Pattern9 AccumConstLoop Plan化 PoC) Pattern9 (AccumConstLoop) を Plan/Frag SSOT に移行完了。PHI 2本(loop_var, acc_var)、const/var 両方 OK。Pattern9 は Pattern1 より先にチェック(より具体的なパターン)。quick 154 PASS 維持。
- 現行の入口:
docs/development/current/main/10-Now.md - Phase 286 詳細:
docs/development/current/main/phases/phase-286/README.md - 次の候補:
docs/development/current/main/30-Backlog.md - Design goal:
docs/development/current/main/design/join-explicit-cfg-construction.md
直近の道筋(JoinIR / Normalized)
設計方針メモ(SSOT候補)
-
ExprLowererBox(式SSOT)
- 役割:
AST(expr)→(prelude: Vec<Inst>, value: ValueId)(ANF含む) - pure/impure/whitelist/strict の契約を集約(入口SSOT)
- 役割:
-
ConditionLowererBox(条件→分岐SSOT)
- 役割:
AST(cond)→BranchPlan(短絡なら分岐語彙で組む) - 評価順は ExprLowererBox に委譲(ANFで順序固定)
&&/||は制御として扱い、式で無理しない
- 役割:
-
ControlLowererBox(制御SSOT)
- 役割:
StepNode/ControlTree→ JoinIR(継続 + env) if/loopはここ、条件の中身は ConditionLowererBox に委譲
- 役割:
-
Phase 139: if-only
post_kの return lowering をReturnValueLowererBoxに統一(DONE)docs/development/current/main/phases/phase-139/README.md
-
Phase 140:
NormalizedExprLowererBox初版(pure expression のみ)(DONE)- SSOT:
docs/development/current/main/design/normalized-expr-lowering.md docs/development/current/main/phases/phase-140/README.md
- SSOT:
-
Phase 141 P0: impure 拡張点(contract)を SSOT 化(Call/MethodCall はまだ out-of-scope)(DONE)
docs/development/current/main/phases/phase-141/README.md
-
Phase 141 P1: “既知 intrinsic だけ” を許可して段階投入(DONE)
docs/development/current/main/phases/phase-141/README.md
-
Phase 141 P1.5: known intrinsic registry + available_inputs 3-source merge + diagnostics(DONE)
docs/development/current/main/phases/phase-141/README.md
-
Phase 142-loopstmt P0: 正規化単位を statement(loop 1個)へ寄せる(DONE)
docs/development/current/main/phases/phase-142-loopstmt/README.md
-
Phase 142-loopstmt P1: LLVM EXE smoke(同 fixture)を追加(DONE)
docs/development/current/main/phases/phase-142-loopstmt/README.md
-
Phase 141 P2+: Call/MethodCall(effects + typing)を分離して段階投入
- Historical context:
docs/development/current/main/investigations/joinir-generalization-study.md
- Historical context:
-
Phase 143-loopvocab P0/P1: loop 内 if/break/continue の語彙追加(DONE)
docs/development/current/main/phases/phase-143-loopvocab/README.md
-
Phase 143-loopvocab P2: else 対称化(B-C / C-B)(DONE)
docs/development/current/main/phases/phase-143-loopvocab/README.md
-
Phase 145-anf P0/P1/P2: ANF(impure hoist + 再帰的線形化)(DONE)
docs/development/current/main/phases/phase-145-anf/README.md
-
Phase 146(in progress): Loop/If 条件式へ ANF を横展開(順序固定と診断)
docs/development/current/main/phases/phase-146/README.md
Resolved (historical)
WSL EXDEV / cargo build failure (resolved)
- 2025-12-18:
Invalid cross-device link (os error 18)によりcargo buildが失敗する事象があったが、wsl --shutdown再起動後に復旧。 - 再発時のワークアラウンド:
tools/build_llvm.shは EXDEV を避けるためTMPDIRをtarget/...配下へ寄せる。