Phase 29aa P3: Jump→Return single-pred rc propagation

This commit is contained in:
2025-12-28 01:16:52 +09:00
parent ed68e48ed1
commit 94ad562aa5
5 changed files with 200 additions and 11 deletions

View File

@ -1,9 +1,9 @@
# Self Current Task — Now (main)
## Current Focus: Phase 29aa P2No cleanup on Jump/Branch
## Current Focus: Phase 29aa P3Jump→Return single-predecessor propagation
**2025-12-27: Phase 29aa P2 完了**
- 目的: Jump/Branch 終端で cleanup を入れない契約を SSOT 化Fail-Fast guard
**2025-12-27: Phase 29aa P3 進行中**
- 目的: Jump→Return単一 predecessorで state 伝播し ReturnCleanup を成立
- 入口: `docs/development/current/main/phases/phase-29aa/README.md`
**2025-12-27: Phase 29z P2 closeout**

View File

@ -68,8 +68,9 @@ Related:
- 入口: `docs/development/current/main/phases/phase-29z/README.md`
- 指示書: `docs/development/current/main/phases/phase-29z/P0-RC_INSERTION_MINIMAL-INSTRUCTIONS.md`
- **Phase 29aaP2 COMPLETE: RC insertion safety expansionCFG-aware**
- **Phase 29aaP3 IN PROGRESS: RC insertion safety expansionCFG-aware**
- 進捗: P2 ✅ 完了Jump/Branch 終端で cleanup を入れない契約の SSOT 化)
- 次: P3Jump→Return single-predecessor state 伝播)
- 入口: `docs/development/current/main/phases/phase-29aa/README.md`
- **Phase 29xplanned, post self-host: De-Rust runtime for LLVM execution**

View File

@ -1,6 +1,6 @@
# Phase 29aa: RC insertion safety expansionCFG-aware design
Status: P2 Complete (No cleanup on Jump/Branch)
Status: P3 In Progress (Jump→Return single-predecessor propagation)
Scope: Phase 29z の単一block限定実装から、誤releaseを起こさない形で CFG-aware に拡張するための設計を固める。
Entry:
@ -22,3 +22,18 @@ Progress:
- P0: CFG-aware 設計の固定RcPlan/危険パターン/安全条件の契約)
- P1: rc_insertion を RcPlan の Plan→Apply 2-stage へ分離(挙動不変)
- P2: Jump/Branch 終端では cleanup を入れない契約を SSOT 化Fail-Fast guard
- P3: Jump→Return単一 predecessorで state 伝播し ReturnCleanup を成立させるP2維持
P3 SSOT:
- Contract:
- cleanup は Return block の BeforeTerminator のみJump/Branch block には入れない)
- Jump→Return かつ predecessor が 1 つの場合のみ state 伝播を許可
- 条件不一致で伝播/cleanup を試みたら debug_assert! で Fail-Fast
- Non-goals:
- Branch/PHI/loop/early-exit の cleanup
- multi-predecessor の合流PHI 問題回避)
- Jump block への release 挿入P2維持
- Acceptance:
- quick 154/154 PASS 維持
- `cargo run --bin rc_insertion_selfcheck --features rc-insertion-minimal` PASS
- 既定OFF維持featureなしは no-op