Commit Graph

1065 Commits

Author SHA1 Message Date
7d2967cfbf phase29af(p4): layout consistency fail-fast 2025-12-29 05:59:01 +09:00
bd4937d89d phase29af(p2+p3): regression entrypoint + carrier layout ssot 2025-12-29 05:44:59 +09:00
9bc9454726 phase29af(p1): add boundary hygiene contract checks 2025-12-29 05:27:14 +09:00
19f2c6b7f6 phase29af(p0): pattern2 boundary hygiene ssot 2025-12-29 05:12:15 +09:00
cf95afbd83 fix(joinir/merge): stabilize Pattern2 entry remap 2025-12-29 03:58:45 +09:00
11adec0abd fix(joinir/merge): prevent header PHI init clobber on latch preds 2025-12-29 02:36:15 +09:00
dd8c2709bd fix(joinir): stabilize phase1883 latch/entry preds 2025-12-28 23:39:51 +09:00
1e1679f361 phase29ac(p1): normalize pattern6 reverse scan and flip smoke to PASS 2025-12-28 16:54:01 +09:00
209b04d808 docs(phase29ab): closeout P1-P9 2025-12-28 16:36:15 +09:00
b52788b3f6 phase29ab(p6): freeze pattern6 scan-with-init near-miss with fixture+smoke 2025-12-28 15:38:19 +09:00
bea2a8d9bb phase29ab(p5): freeze pattern7 split-scan near-miss with fixture+smoke 2025-12-28 14:32:19 +09:00
10e6a15552 refactor: unify string helpers and pattern2 derived slot 2025-12-28 13:22:02 +09:00
84e1cd7c7b phase29ab(p3): fix PromoteDecision contract and add negative smokes 2025-12-28 10:57:55 +09:00
280a5a8187 docs+api: finalize phase29ab P3 contract and update examples 2025-12-28 10:57:48 +09:00
bf9c5105c3 phase29ab(p2): add seg trim fixture+smoke and docs 2025-12-28 09:03:56 +09:00
3bd0c817be phase29ab(p1): pattern2 carrier binding policy + loopbodylocal fixture 2025-12-28 07:19:03 +09:00
d743503603 phase29aa(p8): propagate null_values across jump chain 2025-12-28 06:32:31 +09:00
d3cf73f2ae phase29aa(p7): deterministic ReleaseStrong values ordering 2025-12-28 05:59:22 +09:00
120167bb6e phase29aa(p6): intersect multi-pred return join state 2025-12-28 05:20:45 +09:00
02c01758b3 phase29aa(p5): multi-pred return join when states match 2025-12-28 04:43:19 +09:00
ca91be349d Refactor JoinIR lowerers and boundary 2025-12-28 03:52:52 +09:00
3e2086cc78 refactor(expr_lowerer): split types and tests 2025-12-28 03:21:43 +09:00
6f485beb1e refactor(join_ir_runner): split runner and analyzer tests 2025-12-28 02:56:57 +09:00
79c2953a1f refactor(modules): split kernel exports and join_ir lowerers 2025-12-28 02:38:51 +09:00
bf7b203586 phase29aa(p4): propagate rc state along jump chain to return 2025-12-28 01:56:36 +09:00
0269fc2ed4 Reduce build warnings 2025-12-28 01:34:46 +09:00
b104d6af5f Fix snake case in scan_with_init_minimal 2025-12-28 01:18:58 +09:00
94ad562aa5 Phase 29aa P3: Jump→Return single-pred rc propagation 2025-12-28 01:16:52 +09:00
7ab042ca91 refactor: split large modules into submodules 2025-12-27 21:43:37 +09:00
f654dd316d Reduce unused warnings in tests and helpers 2025-12-27 17:49:42 +09:00
0d6229d5a2 Stabilize joinir tests and env guards 2025-12-27 17:41:30 +09:00
88ead0df9f builder: split MirBuilder core methods 2025-12-27 16:45:13 +09:00
ad469ec2ff ownership: split ast_analyzer into modules 2025-12-27 16:24:51 +09:00
e6aeccb793 loop_canonicalizer: split canonicalizer tests 2025-12-27 16:20:11 +09:00
7be0b0c28e phase29aa: RcPlan + guard no cleanup on jump/branch 2025-12-27 16:09:26 +09:00
b6e80943a3 phase29aa(p1): rc insertion plan/apply refactor 2025-12-27 16:02:32 +09:00
a916066631 phase29z(p2): return cleanup and null propagation doc alignment 2025-12-27 15:26:42 +09:00
5a3d45ce53 phase29z(p1): handle explicit drop in rc insertion 2025-12-27 15:16:46 +09:00
977f105e4e phase29z(p0): minimal RC insertion overwrite release 2025-12-27 15:03:05 +09:00
d9a1513991 docs(joinir): Phase 287 P8 - Add rewriter README/guard 2025-12-27 13:56:44 +09:00
5e7434c6d4 refactor(joinir): Phase 287 P7 - Remove unused rewriter box scaffolding 2025-12-27 13:37:57 +09:00
f225e27007 refactor(joinir): Phase 287 P6 - Remove scan stage (2-stage pipeline) 2025-12-27 13:25:15 +09:00
ce2b4b97e5 refactor(joinir): Tighten plan stage helper visibility 2025-12-27 13:18:54 +09:00
8774bf2fde refactor(joinir): Phase 287 P5 - Stages facade re-export 2025-12-27 13:14:45 +09:00
3c52ba954e refactor(joinir): Phase 287 P4 - Modularize plan stage (facade) 2025-12-27 12:48:33 +09:00
3224d83a7b refactor(joinir): Phase 287 P3 - Split instruction_rewriter into stages 2025-12-27 12:17:34 +09:00
fe895e8838 refactor(joinir): Phase 287 P2 - Modularize contract_checks (facade pattern)
- contract_checks.rs (846行) を facade 化
- 6モジュールへ分割(1 module = 1 contract):
  - terminator_targets.rs (208行) - Branch/Jump検証
  - exit_bindings.rs (35行) - exit_bindings ↔ exit_phis
  - carrier_inputs.rs (145行) - carrier_inputs完全性
  - boundary_creation.rs (160行) - B1/C2不変条件
  - entry_params.rs (317行) - Entry param一貫性
  - mod.rs (30行) - Facade
- Total: 846 → 895行(+49行モジュール境界オーバーヘッド)
- 意味論不変: エラータグ/ヒント文すべて保存
- Fail-Fast遵守: silent fallback追加なし
- 検証: Build 0 errors / Pattern6 RC=9 / quick 154/154 PASS

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 11:05:40 +09:00
de1cd1fea0 refactor(joinir): Phase 287 P1 - Modularize ast_feature_extractor (facade pattern)
Extracted pattern recognizers from ast_feature_extractor.rs (1,148 lines) into
specialized modules under pattern_recognizers/ directory.

**Structure**:
- ast_feature_extractor.rs: Facade (135 lines, re-exports)
- pattern_recognizers/: 8 modules (1,126 lines total)
  - continue_break.rs: continue/break/return detection
  - infinite_loop.rs: loop(true) detection
  - if_else_phi.rs: if-else PHI pattern detection
  - carrier_count.rs: carrier variable counting
  - parse_number.rs: parse_number pattern (+ read_digits)
  - parse_string.rs: parse_string pattern (+ continue pattern)
  - skip_whitespace.rs: skip_whitespace pattern

**Contract**:
- Semantic invariance: All existing APIs preserved via re-exports
- No routing changes, no detection spec changes
- Public API unchanged (facade pattern)

**Verification**:
- Build: 0 errors, 0 warnings
- Pattern6: RC:9 (maintained)
- Smoke tests: 154/154 PASS

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 10:42:17 +09:00
e51777b448 refactor(joinir): Phase 287 P0.6 - Final mod.rs cleanup
Add comprehensive modularization summary comment documenting the
complete Phase 287 P0 refactoring journey.

Changes:
- MOD: merge/mod.rs: Add modularization summary (19 lines)
- Final size: 1,053 lines (was 1,555 in Phase 286)
- Total reduction: -502 lines (-32%)

Modularization Summary:
- P0.1: debug_assertions.rs (verification functions)
- P0.2: value_remapper.rs (ValueId remapping helper)
- P0.3: entry_selector.rs (SSOT entry function selection)
- P0.4: header_phi_prebuild.rs (PHI pre-build orchestration)
- P0.5: boundary_logging.rs (consolidated logging)

Remaining in mod.rs (orchestrator only):
- Public API: merge_joinir_mir_blocks()
- Phase 1-6 pipeline coordination
- Phase 3.5: Parameter → PHI dst remapping (complex, kept inline)
- Phase 6: Boundary reconnection and expr_result resolution

SSOT Principles Enforced:
 Entry selection: boundary.loop_header_func_name > continuation_func_ids
 No string-based heuristics ("k_exit" prefix matching eliminated)
 Logging: debug/verbose only (no constant logs in quick profile)
 Reserved ValueIds: PHI dsts protected from conflicts

Verification:
- Build: 0 errors
- Pattern6: RC:9 
- Smoke: 154/154 PASS (verified via quick profile)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 10:27:44 +09:00
91daec104f refactor(joinir): Phase 287 P0.5 - Extract boundary_logging
Extract boundary logging functions to boundary_logging.rs (112 lines).
Consolidates scattered trace.stderr_if() calls into focused functions.

SSOT Principle:
- Only use trace.stderr_if(..., debug/verbose) - NO constant logs
- Prevents noise in quick smoke tests
- Consistent logging format across boundary operations

Changes:
- NEW: merge/boundary_logging.rs (112 lines)
- MOD: merge/mod.rs: 1,027 → ~973 lines (-54 lines)
- Functions:
  - log_boundary_info() - Comprehensive boundary logging (verbose mode)
  - log_merge_complete() - Merge completion summary (debug mode)

Logging Consolidated:
- Boundary join_inputs / host_inputs
- Exit bindings (carrier mappings)
- Condition bindings (if any)
- Carrier info (if present)
- Merge completion summary

Verification:
- Build: 0 errors
- Pattern6: RC:9 
- Smoke: 154/154 PASS (verified via quick profile)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 10:25:21 +09:00