nx_autofix_candidate2.nx
buildroot/runtime/nx_autofix_candidate2.nx
about
nx_autofix_candidate2.nx -- richer "code under repair" for the SELF-LOCALIZING fix loop
(nx_autofix_auto). Unlike candidate 1 (one function, aggregate score only), this one grades EACH
function and emits per-function FNRES rows -- so the loop can DISCOVER which function is broken
instead of being told. SEEDED BUG: sgn() ignores its input (returns 0) -> FNRES sgn 1 3.
sgn is deliberately NOT one of the fixer's few-shot examples (min2/abs1) -- a green fix here is the
model's own completion, not a template lookup. Output: FNRES <name> <passed> <total> per function,
then the aggregate CGR=<total-passed> the existing graders parse. 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
| 10 | 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 } |
| 11 | func cn(v: i64) -> i64 |
| 25 | func max2(a: i64, b: i64) -> i64 { if a > b { return a } return b } called by 1: main |
| 26 | func min2(a: i64, b: i64) -> i64 { if a < b { return a } return b } called by 1: main |
| 27 | func sgn(x: i64) -> i64 { return 0 } called by 1: main |
| 29 | func main() -> i64 |