code wiki / _hdl_build / nx_charjudge_gate.nx

nx_charjudge_gate.nx

buildroot/runtime/_hdl_build/nx_charjudge_gate.nx

10048 B277 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_charjudge_gate.nx -- the LIAR-KILLER battery for the v2 character judge, all fixtures SYNTHETIC + deterministic (no file deps): a composed "character" (smooth bg + textured figure + border contours + face patch with an eye pair), its eyeless twin, a flat blob, an aligned-16px patch-scramble of the composed image, and the smooth+noise+palette COLLAGE that games v1. Teeth assert the HUMAN ordering, per-axis kills, determinism, and the conf override path. Designing this battery already killed two contour-axis designs before they shipped (plain run-length: dense noise is fully connected; scramble seams are long lines) -- that is the gate doing its job at design time. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_charjudge_lib.nx nx_charjudge_gate.nx

imports: nx_syscalls.nxnx_charjudge_lib.nx

imported by: nobody (leaf or entry point)

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

main gw sys_write sys_mmap chg_composed chg_px chg_blob chg_px ↻ chg_scramble sys_mmap ↻ chg_collage chg_px ↻ chj_judge sys_mmap ↻ chj_conf_load chj_conf_defaults sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close chj_slot_for chj_keyeq chj_luma chj_cells chj_palette sys_mmap ↻ chj_contour sys_mmap ↻ chj_face sys_mmap ↻ chj_face_scan sys_mmap ↻ gn sys_mmap ↻ sys_write ↻ tooth gw ↻

structs

none

consts

10const CHG_W: i64 = 256
11const CHG_H: i64 = 256
12const CHG_LCG_A: i64 = 1103515245
13const CHG_LCG_C: i64 = 12345
14const CHG_LCG_M: i64 = 2147483647

functions

16func gw(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 2: toothmain calls 1: sys_write
17func gn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
28func chg_px(r: i64, g: i64, b: i64) -> i64
41func chg_composed(fb: *i64, eyes: i64) -> i64
called by 1: main calls 1: chg_px
106func chg_blob(fb: *i64) -> i64
called by 1: main calls 1: chg_px
139func chg_scramble(src: *i64, dst: *i64) -> i64
called by 1: main calls 1: sys_mmap
172func chg_collage(fb: *i64) -> i64
called by 1: main calls 1: chg_px
196func tooth(name: *u8, ok: i64, fails: *i64) -> i64
called by 1: main calls 1: gw
204func main() -> i64