code wiki / _hdl_build / nx_mulchain_deep_probe.nx

nx_mulchain_deep_probe.nx

buildroot/runtime/_hdl_build/nx_mulchain_deep_probe.nx

2077 B42 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind probetopic mulchain
docsdependenciesstructsconstsfunctions

about

nx_mulchain_deep_probe.nx -- MEASURE before building. Depth-6 cap (a deepen the team can afford). For each constant report the minimal VERIFIED op-count at maxL=6 (or NONE), and we time the whole batch externally to confirm depth-6 stays fast even for large primes (whose true chain is ~30 ops -- the search must FAIL FAST there, ceding them to imul, not hang). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_mulchain.nx nx_syscalls.nx nx_mulchain_deep_probe.nx

imports: nx_mulchain.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 sys_mmap pr_puts sys_write pr_slen pr_num sys_mmap ↻ sys_write ↻ pr_minlen6 sys_mmap ↻ mulchain_verified mulchain_find mc_abs mc_enum mc_avslot mc_abs ↻ mc_enum ↻ mc_eval sys_exit

structs

none

consts

9const K_MAGIC_2730: i64 = 2730
10const K_MAGIC_10007: i64 = 10007
11const K_MAGIC_43691: i64 = 43691
12const K_MAGIC_1000003: i64 = 1000003
13const K_MAGIC_715827883: i64 = 715827883
14const K_MAGIC_65535: i64 = 65535
15const K_MAGIC_123457: i64 = 123457

functions

17func pr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: pr_puts
18func pr_puts(s: *u8) -> i64 { sys_write(1, s, pr_slen(s)); return 0 }
called by 1: main calls 2: sys_writepr_slen
19func pr_num(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
21func pr_minlen6(c: i64) -> i64
called by 1: main calls 2: sys_mmapmulchain_verified
26func main() -> i64