code wiki / (root) / nx_skin_ita_gate.nx

nx_skin_ita_gate.nx

buildroot/runtime/nx_skin_ita_gate.nx

6610 B147 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic skin
docsdependenciesstructsconstsfunctions

about

nx_skin_ita_gate.nx -- GATE for genome-driven skin albedo (charsim R0). The tooth that matters is T5: the SAME baker with two different genomes must emit DIFFERENT skin. The incumbent (twelve hardcoded sRGB constants) passes every other tooth here and FAILS that one -- so this gate is calibrated to fail the thing it replaced, not merely to agree with what it kept. T4 is the anti-vacuity tooth: a locus that produced one skin tone would satisfy monotonicity and round-tripping perfectly while spanning none of the published classification. Neg-controls named neg-control-* so the gate-law census can see them. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_skin_ita.nx nx_gate_verdict.nx nx_skin_ita_gate.nx

imports: nx_syscalls.nxnx_skin_ita.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap si_model_version si_lstar_of_byte si_linear_of_byte si_root5_e3 si_cbrt_e5 sg_abs gv_check gv_puts ↻ si_byte_of_linear si_linear_of_byte ↻ si_linear_of_byte ↻ si_lstar_of_gene si_class_of_lstar si_albedo_of_gene

structs

none

consts

14const SG_ANCHOR_BYTE: i64 = 128
15const SG_ANCHOR_LSTAR: i64 = 53590
16const SG_LTOL: i64 = 300 // 0.3 L* -- covers the fixed-point residue, far under one class
17const SG_RTOL: i64 = 1200 // 1.2 L* -- covers 8-bit quantisation on the round trip
18const SG_STEPS: i64 = 20
19const SG_HUE_MAX: i64 = 1000
20const SG_UNDER: i64 = 0 - 500
21const SG_OVER: i64 = 5000
22const SG_BYTES: i64 = 256

functions

24func sg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
26func main(argc: i64, argv: *i64) -> i64