code wiki / (root) / nx_chkarith_gate.nx

nx_chkarith_gate.nx

buildroot/runtime/nx_chkarith_gate.nx

8729 B169 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_ccgate_lib.nx nx_chkarith_gate.nx

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

main ccg_anchor_root sys_openat_rd sys_close sys_chdir sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mkdir ccg_pid ccg_path sys_mmap ↻ gv_ctr sys_mmap ↻ gv_head gv_puts sys_write ↻ ccg_build ccg_compile sys_mmap ↻ sys_openat_wr ccg_run sys_fork sys_dup3 sys_mmap ↻ sys_execve sys_exit ↻ sys_wait4

structs

none

consts

19const CG_TRAP: i64 = 72 // NX_TRAP_OVERFLOW -- the injected trap's exit_group code

functions

21func main(argc: i64, argv: *i64) -> i64