code wiki / (root) / nx_str_gate.nx

nx_str_gate.nx

buildroot/runtime/nx_str_gate.nx

4972 B95 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic str
docsdependenciesstructsconstsfunctions

about

nx_str_gate.nx -- the gate for the string vocabulary 109 modules import. WHY: nx_gensota's gen-3 worklist ranked it #3 by importers with no gate sibling. It DOES carry a self-test -- inside its own main() -- and that is precisely the problem: expand_imports STRIPS func main from every non-root file, so that self-test runs ONLY when someone deliberately builds nx_str.nx as an entry point, which nothing does routinely, and NO rollup can read its result. ★LAW: A SELF-TEST INSIDE THE MODULE'S OWN main() IS STRIPPED FROM EVERY CONSUMER AND INVISIBLE TO EVERY RULER -- it is documentation that happens to compile. This gate re-derives the contract from OUTSIDE, in the ruler-readable shape. ⚠FINDING PINNED, NOT SILENTLY FIXED (T9/T10): nx_str_chr(s,0) returns the TERMINATOR index (C strchr convention) while nx_str_rchr(s,0) returns -1. The pair DISAGREES on the NUL convention. 109 importers may depend on either; this gate PINS today's behaviour so any future change is a loud diff, and the asymmetry is declared rather than quietly aligned. license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_str.nx nx_str_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_str.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap gv_head gv_puts sys_write sys_mmap ↻ nsg_lit3 nx_str_cpy nx_str_cat nx_str_len nx_str_len ↻ gv_check gv_puts ↻ nx_str_eq nx_str_cmp nx_str_starts_with nx_str_ends_with nx_str_len ↻ nx_str_str nx_str_len ↻ nx_str_memset nx_str_memcpy nx_str_memcmp nx_str_chr nx_str_rchr nx_str_len ↻ gv_verdict gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec

structs

none

consts

19const NSG_BUF: i64 = 64

functions

21func nsg_lit3(p: *u8, a: i64, b: i64, c: i64) -> i64
called by 1: main
26func main() -> i64