code wiki / _hdl_build / nx_assembly_gate.nx

nx_assembly_gate.nx

buildroot/runtime/_hdl_build/nx_assembly_gate.nx

6239 B95 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_assembly_gate.nx -- GATE: a whole-PRODUCT digital twin -- a REFRIGERATOR, modeled as an assembly tree from the real supply chain, with the nx_bom PCB control board composed in as a subsystem. T1 EFF COUNTS -- the assembly multiplies correctly (2 doors -> effective count 2). T2 ROLLED COST -- exact total bill of materials = 14005 cents ($140.05), summed over the whole tree. T3 ROLLED MASS -- exact total mass = 46950 g (46.95 kg). T4 PART COUNT -- 9 real parts. T5 SOURCEABLE -- all parts in stock -> 0 shortfalls; dropping door stock to 1 (need 2) -> a real shortfall (liar-kill). T6 COMPOSE PCB -- the control board cost = the nx_bom PCB twin (the PCB is a SUBSYSTEM of the fridge). GREEN iff all. Sovereign nx_cc->nxasm. The same engine scales to a car (a bigger tree). expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_assembly.nx nx_bom.nx nx_syscalls.nx nx_assembly_gate.nx

imports: nx_assembly.nxnx_bom.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 w sys_write sys_mmap bom_total_cents bom_qty asm_eff_count wn w ↻ sys_mmap ↻ sys_write ↻ asm_total asm_part_count asm_shortfalls sys_exit

structs

none

consts

none

functions

14func w(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: wnmain calls 1: sys_write
15func wn(v: i64) -> i64 { var m: i64=v; if m<0{w("-" as *u8);m=0-m} 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; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 }
called by 1: main calls 3: wsys_mmapsys_write
17func main() -> i64