code wiki / _hdl_build / nx_inventory_gate.nx
nx_inventory_gate.nx
buildroot/runtime/_hdl_build/nx_inventory_gate.nx
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
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
structs
| none |
consts
| 9 | const IG_PREFIX: *u8 = "knowledge/store/inv-" |
functions
| 11 | func 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 } |
| 12 | func g_i(v: i64) -> i64 |
| 20 | func 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 } |
| 21 | func 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 } |
| 22 | func 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 } |
| 24 | func main() -> i64 |