code wiki / (root) / nx_fbench_negctl.nx

nx_fbench_negctl.nx

buildroot/runtime/nx_fbench_negctl.nx

857 B17 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind benchtopic fbench
docsdependenciesstructsconstsfunctions

about

nx_fbench_negctl.nx -- NEGATIVE CONTROL v2 (output-level) for the forge gap-bench judge. Builds GREEN on purpose but prints a WRONG result line (54, hardcoded). The byte-exact output comparator MUST reject it, and the source-literal check MUST flag the hardcode. v1 finding (banked): the simple `1 +\n2` multi-line-expr shape did NOT trip nx_cc on 2026-07-12 -- the statement-boundary gotcha is shape-dependent; build-level judge discrimination is witnessed by the three raw-condition failures instead.

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_fbench_negctl.nx

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

main nc_puts nc_slen sys_write sys_exit

structs

none

consts

none

functions

9func nc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: nc_puts
11func nc_puts(s: *u8) -> i64 { let n: i64 = nc_slen(s); sys_write(1, s, n); return 0 }
called by 1: main calls 2: nc_slensys_write
13func main(argc: i64, argv: *i64) -> i64
calls 2: nc_putssys_exit