nx_autofix_candidate4.nx
buildroot/runtime/nx_autofix_candidate4.nx
about
nx_autofix_candidate4.nx -- third self-localizing candidate, one rung HARDER: the seeded bug is
SEMANTIC and only PARTIALLY failing. absdiff() returns a-b, which passes absdiff(7,3)=4 and
absdiff(5,5)=0 but fails absdiff(3,7) with -4 -- so a fixer that only pattern-matches "function
broken -> rewrite from name" has less to go on, and the repair needs order-aware logic. To support
this, the output contract adds FNCASE rows for FAILING cases only:
FNCASE <fn> <in1> <in2> want <w> got <g>
The auto loop feeds those rows verbatim to the local maker = pure machine feedback (no Claude
authorship anywhere in the prompt content). FNRES + CGR stay as before. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 11 | func cw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 12 | func cn(v: i64) -> i64 |
| 25 | func fncase(fn: *u8, a: i64, b: i64, want: i64, got: i64) -> i64 |
| 31 | func max2(a: i64, b: i64) -> i64 { if a > b { return a } return b } called by 1: main |
| 32 | func absdiff(a: i64, b: i64) -> i64 { return a - b } called by 1: main |
| 34 | func main() -> i64 |