tomoaki
09b968256f
feat(normalization): Phase 253 - mutable_accumulator_analyzer detector pattern
**Core Change**: Refactor from "validator" to "detector" pattern
**Before** (Fail-Fast):
- Err for non-accumulator assignments (i = i - 1, i = s.length(), etc.)
- JoinIR pipeline aborted on detection
**After** (Detector):
- Ok(None) for non-accumulator patterns (other lowering paths can handle)
- Only Add operator supported (i = i + 1)
- Other operators/patterns return None gracefully
**Modified Behavior** (6 locations):
1. L112-116: operator != Add → Ok(None)
2. L149-152: RHS MethodCall/Call → Ok(None)
3. L153-156: RHS complex expression → Ok(None)
4. L158-161: Left operand reversed → Ok(None)
5. L162-165: Left operand not Variable → Ok(None)
6. L166-170: Value not BinaryOp → Ok(None)
**Tests** (11/11 PASS):
- 2 existing tests updated (Err → Ok(None))
- 3 new tests added:
- test_decrement_not_accumulator (i = i - 1)
- test_complex_rhs_not_accumulator (x = x + (i + 1))
- test_non_binop_assignment_not_accumulator (i = s.length())
**Documentation**:
- Updated docstring to reflect detector strategy
- Detection Strategy section added with all Ok(None) cases
**Status**:
- ✅ mutable-acc-spec errors eliminated
- ⚠️ quick profile still FAIL: StringUtils.index_of/2 not JoinIR-supported (Phase 254 scope)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-19 20:38:57 +09:00
..
2025-12-17 05:32:17 +09:00
2025-12-13 07:05:30 +09:00
2025-12-17 02:12:34 +09:00
2025-12-11 20:54:33 +09:00
2025-12-16 07:02:14 +09:00
2025-12-11 20:54:33 +09:00
2025-12-16 07:02:14 +09:00
2025-12-13 05:58:57 +09:00
2025-12-16 07:02:14 +09:00
2025-12-11 20:54:33 +09:00
2025-12-17 06:10:38 +09:00
2025-12-19 20:38:57 +09:00
2025-12-17 05:32:35 +09:00
2025-12-13 06:33:44 +09:00
2025-12-16 07:02:14 +09:00
2025-12-16 07:02:14 +09:00
2025-12-11 20:54:33 +09:00