docs(phase29an): add p11 exitmap presence
This commit is contained in:
@ -19,7 +19,7 @@ Scope: Repo root の旧リンク互換。現行の入口は `docs/development/cu
|
||||
`docs/development/current/main/design/coreplan-migration-roadmap-ssot.md` が移行タスクの Done 判定の入口。
|
||||
|
||||
**Next implementation (CorePlan Step-B / Facts SSOT)**
|
||||
`docs/development/current/main/phases/phase-29an/P10-EXITMAP-FEATURE-FACTS-SCAFFOLD-INSTRUCTIONS.md`
|
||||
`docs/development/current/main/phases/phase-29an/P11-EXITMAP-PRESENCE-FROM-EXITUSAGE-INSTRUCTIONS.md`
|
||||
|
||||
**2025-12-29: Phase 29am P0 COMPLETE (CorePlan If/Exit lowerer/verifier)**
|
||||
CorePlan の If/Exit を lowerer/verifier で扱えるようにして、CorePlan 移行の土台を作った。
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
## Current Focus: Phase 29an(Skeleton/Feature Facts)
|
||||
|
||||
Next: Phase 29an P10(ExitMap facts scaffold)
|
||||
Next: Phase 29an P11(ExitMap presence from ExitUsage)
|
||||
運用ルール: integration filter で phase143_* は回さない(JoinIR 回帰は phase29ae pack のみ)
|
||||
運用ルール: phase286_pattern9_* は legacy pack (SKIP) を使う
|
||||
移行道筋 SSOT: `docs/development/current/main/design/coreplan-migration-roadmap-ssot.md`
|
||||
@ -17,6 +17,11 @@ Next: Phase 29an P10(ExitMap facts scaffold)
|
||||
- 変更: `src/mir/builder/control_flow/plan/facts/skeleton_facts.rs`
|
||||
- 検証: `cargo build --release` / `./tools/smokes/v2/run.sh --profile quick` / `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh`
|
||||
|
||||
**2025-12-29: Phase 29an P10 完了** ✅
|
||||
- 目的: ExitMapFacts の語彙足場(型)を追加(未接続・仕様不変)
|
||||
- 変更: `src/mir/builder/control_flow/plan/facts/feature_facts.rs`
|
||||
- 検証: `cargo build --release` / `./tools/smokes/v2/run.sh --profile quick` / `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh`
|
||||
|
||||
**2025-12-29: Phase 29an P7 完了** ✅
|
||||
- 目的: CanonicalLoopFacts に skeleton/exit_usage の projection を追加(挙動不変)
|
||||
- 変更: `src/mir/builder/control_flow/plan/normalize/canonicalize.rs` / `src/mir/builder/control_flow/plan/planner/build.rs`
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
---
|
||||
Status: Active
|
||||
Scope: code(仕様不変、Feature合成の最小ステップ)
|
||||
Related:
|
||||
- docs/development/current/main/phases/phase-29an/README.md
|
||||
- docs/development/current/main/design/exitkind-cleanup-effect-contract-ssot.md
|
||||
- docs/development/current/main/phases/phase-29ae/README.md
|
||||
---
|
||||
|
||||
# Phase 29an P11: ExitMapFacts “presence” を ExitUsageFacts から埋める(保守的、仕様不変)
|
||||
|
||||
Date: 2025-12-29
|
||||
Status: Ready for execution
|
||||
Scope: ExitMapFacts を “存在集合” として最小で埋める(対応付け/CFGはやらない)
|
||||
|
||||
## Objective
|
||||
|
||||
- `LoopFeatureFacts.exit_map` を `None` 固定から前進させ、**presence だけ**を埋める
|
||||
- break/continue/return が観測されたら、その kind を `kinds_present` に追加
|
||||
- 依然として “どの出口がどこへ” は扱わない(それは CorePlan/Frag の領域)
|
||||
|
||||
## Non-goals
|
||||
|
||||
- 既存ルーティング/観測/エラー文字列の変更
|
||||
- `Ok(None)` gate の変更
|
||||
- ExitMap の対応付け(join/edge/exit block 特定)
|
||||
- cleanup/value_join の実装
|
||||
|
||||
## Implementation
|
||||
|
||||
Update:
|
||||
- `src/mir/builder/control_flow/plan/facts/feature_facts.rs`
|
||||
|
||||
### Step 1: ExitMapFacts を構築して `exit_map: Some(...)` にする
|
||||
|
||||
In `try_extract_loop_feature_facts()`:
|
||||
- `exit_usage` を先に抽出(既存)
|
||||
- `kinds_present` を `BTreeSet` で作る
|
||||
- `has_return` → insert Return
|
||||
- `has_break` → insert Break
|
||||
- `has_continue` → insert Continue
|
||||
- `exit_map = if kinds_present.is_empty() { None } else { Some(ExitMapFacts { kinds_present }) }`
|
||||
- `LoopFeatureFacts { exit_usage, exit_map, value_join: None, cleanup: None }`
|
||||
|
||||
### Step 2: unit tests を更新/追加
|
||||
|
||||
Update tests in `feature_facts.rs`:
|
||||
- break/continue/return が立つケースで `exit_map` が `Some` になり、`kinds_present` が3種を含む
|
||||
- nested loop だけのケースは `exit_map == None`(外側に影響しない)を維持
|
||||
|
||||
## Verification(required)
|
||||
|
||||
- `cargo build --release`
|
||||
- `./tools/smokes/v2/run.sh --profile quick`
|
||||
- `./tools/smokes/v2/profiles/integration/joinir/phase29ae_regression_pack_vm.sh`
|
||||
|
||||
## Commit
|
||||
|
||||
- `git add -A && git commit -m \"phase29an(p11): populate exitmap presence from exit usage\"`
|
||||
|
||||
@ -96,3 +96,10 @@ Status: ✅ COMPLETE(実装コミット: `0354c17eb`)
|
||||
- 指示書: `docs/development/current/main/phases/phase-29an/P10-EXITMAP-FEATURE-FACTS-SCAFFOLD-INSTRUCTIONS.md`
|
||||
- P11: ExitMapFacts の “presence” を ExitUsageFacts から埋める(still conservative)
|
||||
- P12: cleanup/value_join の足場(型・projection・verifier だけ)を追加
|
||||
|
||||
Status: ✅ COMPLETE(実装コミット: `b71434ffe`)
|
||||
|
||||
## P11: ExitMap presence from ExitUsage (still conservative)
|
||||
|
||||
- 指示書: `docs/development/current/main/phases/phase-29an/P11-EXITMAP-PRESENCE-FROM-EXITUSAGE-INSTRUCTIONS.md`
|
||||
- ねらい: ExitMapFacts を “存在集合” として最小で埋める(対応付け/CFGはやらない、仕様不変)
|
||||
|
||||
Reference in New Issue
Block a user