docs: Phase 113 if-only partial assign parity

- Create phases/phase-113/README.md (background, fixed pattern, verification)
- Update 10-Now.md with Phase 113 completion
- Update 01-JoinIR-Selfhost-INDEX.md with Phase 113 entry

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-18 01:58:56 +09:00
parent ba25fe6d01
commit 70fe0da549
3 changed files with 47 additions and 9 deletions

View File

@ -40,6 +40,7 @@ JoinIR の箱構造と責務、ループ/if の lowering パターンを把握
- `docs/development/current/main/joinir-boundary-builder-pattern.md`
4. JoinIR 設計地図(現役の地図)
- `docs/development/current/main/design/joinir-design-map.md`
- ControlTree / StepTree構造SSOT: `docs/development/current/main/design/control-tree.md`
5. Loop Canonicalizer設計 SSOT
- `docs/development/current/main/design/loop-canonicalizer.md`
- 実装Phase 137-2: `src/mir/loop_canonicalizer/mod.rs`
@ -61,13 +62,19 @@ JoinIR の箱構造と責務、ループ/if の lowering パターンを把握
- `docs/development/current/main/phases/phase-102/README.md`
14. Phase 103: if-only regression baselineVM + LLVM EXE / plan
- `docs/development/current/main/phases/phase-103/README.md`
15. Phase 104: loop(true) break-only digitsVM + LLVM EXE
15. Phase 113: if-only partial assign parity片側代入の保持 merge
- `docs/development/current/main/phases/phase-113/README.md`
16. Phase 104: loop(true) break-only digitsVM + LLVM EXE
- `docs/development/current/main/phases/phase-104/README.md`
16. Phase 107: json_cur find_balanced_* depth scanVM + LLVM EXE
17. Phase 107: json_cur find_balanced_* depth scanVM + LLVM EXE
- `docs/development/current/main/phases/phase-107/README.md`
6. MIR BuilderContext 分割の入口
18. Phase 108: Pattern2 policy router SSOT入口の薄さを固定
- `docs/development/current/main/phases/phase-108/README.md`
19. Phase 109: error_tags hints SSOTFail-Fast + hint の語彙固定)
- `docs/development/current/main/phases/phase-109/README.md`
20. MIR BuilderContext 分割の入口)
- `src/mir/builder/README.md`
7. Scope/BindingIdshadowing・束縛同一性の段階移行
21. Scope/BindingIdshadowing・束縛同一性の段階移行
- `docs/development/current/main/phase73-scope-manager-design.md`
- `docs/development/current/main/PHASE_74_SUMMARY.md`
- `docs/development/current/main/PHASE_75_SUMMARY.md`
@ -75,16 +82,16 @@ JoinIR の箱構造と責務、ループ/if の lowering パターンを把握
- `docs/development/current/main/phase78-bindingid-promoted-carriers.md`
- `docs/development/current/main/phase80-bindingid-p3p4-plan.md`P3/P4 への配線計画)
- `docs/development/current/main/phase81-pattern2-exitline-contract.md`promoted carriers の ExitLine 契約検証)
8. Boxification feedbackPhase 7885 の振り返りと Phase 86 推奨)
22. Boxification feedbackPhase 7885 の振り返りと Phase 86 推奨)
- `docs/development/current/main/phase78-85-boxification-feedback.md`
9. Phase 86: Carrier Init Builder + Error Tags ✅
23. Phase 86: Carrier Init Builder + Error Tags ✅
- **Status**: COMPLETE (2025-12-13)
- **Modules**:
- `src/mir/builder/control_flow/joinir/merge/carrier_init_builder.rs` (+8 tests)
- `src/mir/join_ir/lowering/error_tags.rs` (+5 tests)
- **Achievements**: SSOT 確立CarrierInit → ValueId 生成統一、エラータグ中央化、DebugOutputBox 完全移行)
- **Impact**: 987/987 tests PASS, +13 unit tests, Single Responsibility validated
10. Phase 87: LLVM Exe Line SSOT ✅
24. Phase 87: LLVM Exe Line SSOT ✅
- **Status**: COMPLETE (2025-12-13)
- **SSOT**: `tools/build_llvm.sh` - Single pipeline for .hako → executable
- **Deliverables**:
@ -93,11 +100,11 @@ JoinIR の箱構造と責務、ループ/if の lowering パターンを把握
- Integration smoke: `tools/smokes/v2/profiles/integration/apps/phase87_llvm_exe_min.sh` (SKIP if no LLVM)
- **Policy**: No script duplication, integration smoke only (not quick), graceful SKIP
- **Impact**: Standard procedure established, prerequisites documented
11. 代表的な Phase 文書(現役ラインとの接点だけ絞ったもの)
24. 代表的な Phase 文書(現役ラインとの接点だけ絞ったもの)
- `docs/development/current/main/phase33-16-INDEX.md`
- `docs/development/current/main/phase33-17-joinir-modularization-analysis.md`
- `docs/development/current/main/phase183-selfhost-depth2-joinir-status.md`
12. Phase 8690Loop frontendsの要約1枚
25. Phase 8690Loop frontendsの要約1枚
- `docs/development/current/main/phase86-90-loop-frontends-summary.md`
Phase 文書は歴史や検証ログも含むので、「JoinIR の現役設計を確認した上で、必要なときだけ掘る」という前提で読んでね。

View File

@ -1,5 +1,12 @@
# Self Current Task — Now (main)
## 2025-12-18Phase 113 完了 ✅
**Phase 113: if-only partial assign parity**
- if-onlyelse なし)の片側代入で「保持 merge」パターンを VM/LLVM で固定
- Fixture: phase113_if_only_partial_assign_min.hako
- Smoke: VM + LLVM EXE parity 検証済み
## 2025-12-18Phase 112 完了 ✅
**Phase 112: StepTree Capability Guard (strict-only)**

View File

@ -0,0 +1,24 @@
# Phase 113: if-only partial assign parity
## Background
if-only (no else) で片側だけ代入がある場合、else 側では変数の元の値を「保持」する必要がある。
これは PHI ノードの incoming として、else 側に元の ValueId を渡す「保持 merge」パターン。
## What is Fixed
- `x=1; if flag==1 { x=2 } print(x)` パターン
- flag=0 のとき x は 1 のままelse 側の暗黙保持)
- flag=1 のとき x は 2 に更新
## Verification
```bash
# VM
bash tools/smokes/v2/profiles/integration/apps/phase113_if_only_partial_assign_vm.sh
# LLVM EXE
bash tools/smokes/v2/profiles/integration/apps/phase113_if_only_partial_assign_llvm_exe.sh
```
Expected output: `1\n2`