code wiki / _hdl_build / nx_food_stirfry_gate.nx

nx_food_stirfry_gate.nx

buildroot/runtime/_hdl_build/nx_food_stirfry_gate.nx

13435 B197 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic food
docsdependenciesstructsconstsfunctions

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

nx_food_science.nx nx_nishi_builder.nx nx_ad_serve.nx nx_syscalls.nx nx_food_stirfry_gate.nx

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

main g_p sys_write fd_seed sys_mmap ss_begin ss_begin_cap sys_mmap ↻ as_len fd_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 ss_add ss_add2 ss_w32 ss_len ↻ fd_seg_next sys_mmap ↻ ss_manifest ss_manifest_file sys_mmap ↻ ss_cat ↻ ss_readall ↻ ss_commit ss_segid_ok sys_mmap ↻ ss_cat ↻ ss_catn sys_mmap ↻

structs

none

consts

16const FG_PREFIX: *u8 = "/tmp/food_g-"
17const FG_CAT: *u8 = "/tmp/nishi_food_gate.tsv"

functions

19func 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 3: g_nameg_showmain calls 1: sys_write
20func g_i(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
28func g_name(h: *i64, idx: i64) -> i64 { let names: *i64 = h[4] as *i64; g_p(names[idx] as *u8); return 0 }
called by 1: g_show calls 1: g_p
29func g_show(h: *i64, build: *i64, nb: i64) -> i64
called by 1: main calls 2: g_pg_name
34func 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
35func 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
36func 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
38func main() -> i64