code wiki / _hdl_build / nx_memplane_gate.nx

nx_memplane_gate.nx

buildroot/runtime/_hdl_build/nx_memplane_gate.nx

10074 B181 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_memplane_gate.nx -- SOVEREIGN gate for the memory-plane primitives. No shell, no fixtures. WHAT THIS REPLACES AND WHY -------------------------- Every gate written for the memory-plane organs this session was a `sh` script executed by WSL from PowerShell: Linux shell + Windows host + third-party runtime, sitting directly on the program path, in an estate whose own doctrine is bits-up sovereignty and whose own gates are ELF organs. I matched the shape of a test script instead of the shape of the estate's gates. The shell dependency was not merely impure, it CORRUPTED WORK TWICE IN ONE SESSION: * a generated .sh written with CRLF made `2>&1` a syntax error in dash; * a PowerShell single-quoted Replace put a LITERAL backtick-n into nx_memroot.nx, producing "UNRESOLVED identifier 'n'" -- source and deployed binary silently diverged until a build failed. Neither failure mode exists inside an organ. A gate could not be an organ while each organ owned `main()` -- there was nothing to import. With the primitives in nx_memplane_lib, the gate becomes what the estate's gates are: an organ that imports the lib and asserts IN-PROCESS. Every tooth below runs on string literals in memory, so this gate touches no filesystem at all and cannot be broken by a quoting or line-ending bug. Each tooth pins a defence that was learned ONCE and then MISSING from the next organ written -- which is precisely why the primitives now live in one place. exit: 0 = all teeth green; 1 = a defence regressed Sovereign: imports nx_memplane_lib (which imports only nx_syscalls). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_memplane_lib.nx nx_memplane_gate.nx

imports: nx_memplane_lib.nx

imported by: nobody (leaf or entry point)

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

main mp_cat mp_say mp_write_all sys_write mp_is_dump mp_streq mp_link_next mp_len mp_declparent mp_len ↻ mp_streq ↻ mp_is_md mp_len ↻ mp_nameptr mp_put mp_nameptr ↻ mp_hashr mp_len ↻ mp_get mp_hashr ↻ mp_eqr mp_nameptr ↻ mp_is_derived mp_len ↻ mp_catn 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

structs

none

consts

none

functions

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