docs(phase29an): add p10 exitmap facts scaffold
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
## Current Focus: Phase 29an(Skeleton/Feature Facts)
|
||||
|
||||
Next: Phase 29an P9(Skeleton unification inference, unused)
|
||||
Next: Phase 29an P10(ExitMap facts scaffold)
|
||||
運用ルール: integration filter で phase143_* は回さない(JoinIR 回帰は phase29ae pack のみ)
|
||||
運用ルール: phase286_pattern9_* は legacy pack (SKIP) を使う
|
||||
移行道筋 SSOT: `docs/development/current/main/design/coreplan-migration-roadmap-ssot.md`
|
||||
@ -12,6 +12,11 @@ Next: Phase 29an P9(Skeleton unification inference, unused)
|
||||
- 変更: `src/mir/builder/control_flow/plan/planner/build.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 P9 完了** ✅
|
||||
- 目的: SkeletonFacts の一意化推論 API を追加し、0/1/2+ 境界をテストで固定(未接続・仕様不変)
|
||||
- 変更: `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 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,69 @@
|
||||
---
|
||||
Status: Active
|
||||
Scope: code(仕様不変、Feature合成の足場)
|
||||
Related:
|
||||
- docs/development/current/main/phases/phase-29an/README.md
|
||||
- docs/development/current/main/design/coreplan-skeleton-feature-model.md
|
||||
- docs/development/current/main/design/exitkind-cleanup-effect-contract-ssot.md
|
||||
- docs/development/current/main/phases/phase-29ae/README.md
|
||||
---
|
||||
|
||||
# Phase 29an P10: ExitMap FeatureFacts の足場(型だけ先に追加、未接続)
|
||||
|
||||
Date: 2025-12-29
|
||||
Status: Ready for execution
|
||||
Scope: FeatureFacts を “ExitMap/cleanup 合成” に繋ぐ語彙の足場を作る(未接続、仕様不変)
|
||||
|
||||
## Objective
|
||||
|
||||
- Skeleton+Feature 合成の中核である `ExitMap` を、Facts 側の語彙として先に定義する
|
||||
- P10 では **型と変換導線の足場だけ**(解析は次の P11 以降)
|
||||
|
||||
## Non-goals
|
||||
|
||||
- 既存ルーティング/観測/エラー文字列の変更
|
||||
- `Ok(None)` gate の変更
|
||||
- exit の対応付け(どの break/continue がどこへ)を推論する
|
||||
- cleanup/value_join を実装する(P12+)
|
||||
|
||||
## Implementation
|
||||
|
||||
### Step 1: ExitKind/ExitMapFacts を feature_facts に追加(SSOT語彙)
|
||||
|
||||
Update:
|
||||
- `src/mir/builder/control_flow/plan/facts/feature_facts.rs`
|
||||
|
||||
Add types(最小):
|
||||
- `enum ExitKindFacts { Return, Break, Continue }`
|
||||
- `struct ExitMapFacts { kinds_present: std::collections::BTreeSet<ExitKindFacts> }`
|
||||
|
||||
Add field:
|
||||
- `LoopFeatureFacts { exit_map: Option<ExitMapFacts>, ... }`
|
||||
|
||||
Populate(P10では未接続):
|
||||
- `exit_map: None` を既定
|
||||
|
||||
注意:
|
||||
- 既存の `ExitUsageFacts` はそのまま残す(ExitMapFacts を使うのは P11+)
|
||||
- `ExitKindFacts` は将来 `Unwind` を追加できる形にする(P12以降)
|
||||
|
||||
### Step 2: unit tests(型・既定値の固定)
|
||||
|
||||
Update/add tests in `feature_facts.rs`:
|
||||
- `try_extract_loop_feature_facts()` が `exit_map: None` を返すこと
|
||||
|
||||
### Step 3: LoopFacts/CanonicalLoopFacts の projection は触らない(仕様不変)
|
||||
|
||||
P10では `canonicalize_loop_facts` の projection は増やさない。
|
||||
(projection拡張は P11 でまとめてやる)
|
||||
|
||||
## 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(p10): add exitmap feature facts scaffold\"`
|
||||
|
||||
@ -88,6 +88,11 @@ Status: ✅ COMPLETE(実装コミット: `195b424cc`)
|
||||
- 指示書: `docs/development/current/main/phases/phase-29an/P9-SKELETON-UNIFICATION-INFERENCE-INSTRUCTIONS.md`
|
||||
- ねらい: Skeleton 一意化の境界を Facts 側で SSOT 化(未接続、仕様不変)
|
||||
|
||||
Status: ✅ COMPLETE(実装コミット: `0354c17eb`)
|
||||
|
||||
## Next(planned)
|
||||
|
||||
- P10: Feature 合成(ExitMap / ValueJoin / Cleanup)を CorePlan 合成へ繋ぐ
|
||||
- P10: ExitMap FeatureFacts の足場(型だけ先に追加、未接続)
|
||||
- 指示書: `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 だけ)を追加
|
||||
|
||||
Reference in New Issue
Block a user