code wiki / _hdl_build / nx_inventory_gate.nx

nx_inventory_gate.nx

buildroot/runtime/_hdl_build/nx_inventory_gate.nx

8566 B122 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_inventory_gate.nx -- GATE: the UNIVERSAL inventory substrate proven on TWO domains at once -- a kitchen PANTRY and a will's ESTATE asset catalog -- with identical operations. Proves: T1 catalog+readback, T2 universality (same engine, two domains), T3 expiration tracking (pantry), T4 net-worth total for the will (integer cents, no float), T5 by-beneficiary (owner) query, T6 idempotent catalog, T7 supply-chain consume (depletion + honest insufficient-stock refusal). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_inventory.nx nx_syscalls.nx nx_inventory_gate.nx

imports: nx_inventory.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main g_p sys_write iv_add sys_mmap as_append iv_num sys_mmap ↻ iv_item_key as_append ↻ iv_streq_store sys_mmap ↻ ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_scan_seglist ss_len sys_mmap ↻ ss_cat ss_readall ss_r32 iv_ids_key as_append ↻ ss_get ↻ iv_id_in_list as_len ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ↻ iv_seg_next sys_mmap ↻ ss_manifest ss_manifest_file

structs

none

consts

9const IG_PREFIX: *u8 = "knowledge/store/inv-"

functions

11func g_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
12func g_i(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
20func g_money(cents: i64) -> i64 { let b: *u8 = sys_mmap(32); let o: i64 = iv_money(b, 0, cents); sys_write(1, b, o); return 0 }
called by 1: main calls 3: sys_mmapiv_moneysys_write
21func g_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
called by 2: g_inmain
22func g_in(ids: *i64, n: i64, target: *u8) -> i64 { var i: i64 = 0; while i < n { if g_streq(ids[i] as *u8, target) == 1 { return 1 } i = i + 1 } return 0 }
called by 1: main calls 1: g_streq
24func main() -> i64