nx_probe_closure_lift.nx
buildroot/runtime/nx_probe_closure_lift.nx
about
nx_probe_closure_lift.nx -- LN13b BEHAVIOUR WITNESS: a non-capturing function literal is lifted,
its address is a value, and CALLING that value computes what the body says.
WHY THIS IS A SELF-CHECKING PROGRAM AND NOT A LIST OF ASSERTIONS IN A GATE. The defect this rung
closes is not "does it compile" -- the pre-fix compiler REFUSED the construct outright, which is
easy to detect. The defect worth guarding is the one that survives a green compile: a literal
that lifts to the wrong body, binds the wrong parameter, or returns the caller's first argument
because a synthesized return carried value id 0. None of those change the exit status of the
COMPILER; all of them change the exit status of THIS PROGRAM. So the witness is a run, and the
gate reads only its exit code -- 0 means every arithmetic identity below held.
Each check returns a DISTINCT non-zero code so a failure names itself without a debugger.
license_tier: ORIGINAL. Pure arithmetic, no syscalls beyond exit. No hw writes (Rule 26).
dependencies 0 imports · 0 importers
imports: none
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
| 15 | func plf_double(x: i64) -> i64 { return x + x } |
| 17 | func plf_apply1(f: func(i64) -> i64, v: i64) -> i64 { return f(v) } called by 1: main |
| 19 | func main(argc: i64, argv: **u8) -> i64 calls 1: plf_apply1 |