code wiki / _hdl_build / nx_food_stirfry_gate.nx
nx_food_stirfry_gate.nx
buildroot/runtime/_hdl_build/nx_food_stirfry_gate.nx
about
nx_food_stirfry_gate.nx -- GATE: proves the Nishi food-science stir-fry chooser (rung 0 of the food
branch). Seeds a hermetic temp store, opens the world, and asserts the capability across nine
dimensions: T1 deterministic, T2 role-complete (a real stir-fry: 1 protein/2 veg/1 aromatic/1 sauce),
T3 preference-responsive (more spicy preference -> a spicier build), T4 availability-constrained (an
unavailable ingredient never appears), T5 allergen hard-exclude (an avoided ingredient never appears),
T6 negative-control / liar-kill (no protein -> honest INCOMPLETE not a fabricated pick; unknown id is
rejected LOUD), T7 MEASURED EXCEED (the chosen build beats a naive strongest-ingredient build on the
published food-science objective -- capability is the exceed), T8 sovereignty floor (0 third-party JS),
T9 teach-the-builder (a food domain is registered into the universal catalog -- the team GROWS).
Emits a preview to knowledge/staging/food/page.html. license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_food_science.nxnx_nishi_builder.nxnx_ad_serve.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
| 16 | const FG_PREFIX: *u8 = "/tmp/food_g-" |
| 17 | const FG_CAT: *u8 = "/tmp/nishi_food_gate.tsv" |
functions
| 19 | 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 } |
| 20 | func g_i(v: i64) -> i64 |
| 28 | func g_name(h: *i64, idx: i64) -> i64 { let names: *i64 = h[4] as *i64; g_p(names[idx] as *u8); return 0 } |
| 29 | func g_show(h: *i64, build: *i64, nb: i64) -> i64 |
| 34 | func g_count_role(roles: *i64, nb: i64, rc: i64) -> i64 { var c: i64 = 0; var i: i64 = 0; while i < nb { if roles[i] == rc { c = c + 1 } i = i + 1 } return c } called by 1: main |
| 35 | func g_in_build(build: *i64, nb: i64, idx: i64) -> i64 { var i: i64 = 0; while i < nb { if build[i] == idx { return 1 } i = i + 1 } return 0 } called by 1: main |
| 36 | func g_bytes_eq(a: *u8, la: i64, b: *u8, lb: i64) -> i64 { if la != lb { return 0 } var i: i64 = 0; while i < la { if a[i] != b[i] { return 0 } i = i + 1 } return 1 } called by 1: main |
| 38 | func main() -> i64 |