docs(phase29an): add p11 exitmap presence

This commit is contained in:
2025-12-30 03:18:42 +09:00
parent b71434ffe4
commit 0d18427543
4 changed files with 74 additions and 2 deletions

View File

@ -2,7 +2,7 @@
## Current Focus: Phase 29anSkeleton/Feature Facts
Next: Phase 29an P10ExitMap facts scaffold
Next: Phase 29an P11ExitMap 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 P10ExitMap 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`

View File

@ -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`(外側に影響しない)を維持
## Verificationrequired
- `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\"`

View File

@ -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はやらない、仕様不変