code wiki / _hdl_build / nx_isotope_gate.nx
nx_isotope_gate.nx
buildroot/runtime/_hdl_build/nx_isotope_gate.nx
about
nx_isotope_gate.nx -- chemistry external-reference loop, VERIFY + LIAR-KILL gate. Compares OUR periodic
table's exact isotope masses (nx_chem_periodic nx_chem_atomic_data_table_118: iso_mass_q4 = exact mass of
the most-abundant isotope * 10000) against the NIST Atomic Weights reference held in the SOVEREIGN seg_store
(key "iso:<Z>:<A>", populated by nx_isotope_ingest from the foundationed NIST data) -- NOT a TSV.
For each element we look up NIST's Relative Atomic Mass for OUR most-abundant isotope (Z, iso_a_q0) and
assert iso_mass_q4 == NIST_q4 (exact integer; both are mass*10000 rounded). disagree>0 is a real finding
(our value drifted from NIST). missing = our isotope not in this NIST subset = honestly UNVERIFIED (reported,
never claimed verified). LIAR-KILL neg-control proves the lookup distinguishes known values + a missing key.
GREEN iff neg-control OK AND disagree==0. Writes knowledge/status/isotope_gate.log. license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_seg_store.nxnx_uxf_decode.nxnx_chem_periodic.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 IG_STORE: *u8 = "knowledge/store/isotope-" |
| 17 | const IG_LOG: *u8 = "knowledge/status/isotope_gate.log" |
functions
| 19 | func ig_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 20 | func ig_wn(fd: i64, v: i64) -> i64 { let b: *u8=sys_mmap(16); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)} let t: *u8=sys_mmap(16); var k: i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1}; sys_write(fd,b,k); return 0 } |
| 21 | func ig_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 } called by 1: ig_ref |
| 22 | func ig_itoa(v: i64, dst: *u8) -> i64 { var m: i64=v; let t: *u8=sys_mmap(24); var k: i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{dst[i]=t[k-1-i];i=i+1} dst[k]=0 as u8; return k } |
| 23 | func ig_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8){ if s[i]>=(48 as u8){ if s[i]<=(57 as u8){ v=v*10+(s[i]-48) } } i=i+1 } return v } called by 1: ig_ref |
| 26 | func ig_ref(z: i64, a: i64) -> i64 |
| 43 | func main() -> i64 |