nx_chkarith_gate.nx
buildroot/runtime/nx_chkarith_gate.nx
about
nx_chkarith_gate.nx -- GATE for LN1 checked integer arithmetic (lang.plan rung LN1, symbol
chk_add_overflow). The rung's done-rule: i64 add and mul trap or refuse on overflow under a
declared mode (--chkarith); an overflowing add TRAPS; an in-range program is byte-identical
to today under the default (nothing is emitted unless the flag is on -- the equivalence net
nx_cc_equiv_gate is the byte ruler for that half, this gate is the behaviour ruler).
Subjects: the toolchain compiler (argv[1], default the live builder) + runtime/nx_checked_arith.nx
+ runtime/nx_checked_arith_const.nx.
Driver = nx_ccgate_lib (the ONE compiler-gate driver, extracted from the LN3 gate): data captures in
/tmp/nxchk/, RUNNABLES under _build/ (NAS /tmp is noexec), per-pid paths, phase exit codes PRINTED
before the teeth.
Usage: nx_chkarith_gate [compiler_elf] (CWD = the tree root, like nx_cc_equiv_gate)
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_ccgate_lib.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
| 19 | const CG_TRAP: i64 = 72 // NX_TRAP_OVERFLOW -- the injected trap's exit_group code |
functions
| 21 | func main(argc: i64, argv: *i64) -> i64 |