docs: Phase 190-impl-D complete - NumberAccumulation PHI wiring fixed

- Fixed ValueId collision between body-local and carrier params
- Added ExitLine contract verifier (debug assertions)
- Updated test files to use Main box
- E2E verified: atoi→12, parse_number→123

🤖 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-09 03:07:15 +09:00
parent f8d3fb08ba
commit 1af92d8aea
5 changed files with 94 additions and 12 deletions

View File

@ -4,9 +4,16 @@
//
// Note: Phase 190-impl-D found that body-local variable support is incomplete.
// Using loop variable directly for now.
//
// Expected calculation:
// i=0: result = 0*10 + 0 = 0
// i=1: result = 0*10 + 1 = 1
// i=2: result = 1*10 + 2 = 12
// i=3: break (condition i >= 3)
// Expected result: 12
static box AtoiImpl {
method main() {
static box Main {
main() {
local result
result = 0
local i
@ -19,6 +26,7 @@ static box AtoiImpl {
result = result * 10 + i
i = i + 1
}
return result
print(result)
return 0
}
}

View File

@ -5,8 +5,8 @@
// Expected: i=1,2,3 → num = 0*10+1 = 1 → 1*10+2 = 12 → 12*10+3 = 123
// Result should be 123
static box ParseNumberImpl {
method main() {
static box Main {
main() {
local num
num = 0
local i
@ -19,6 +19,6 @@ static box ParseNumberImpl {
i = i + 1
}
print(num)
return num
return 0
}
}