code wiki / _hdl_build / _loop_synth_authored.nx
_loop_synth_authored.nx
buildroot/runtime/_hdl_build/_loop_synth_authored.nx
about
AUTHORED BY THE NISHI BUILDER (nx_module_author loop-synth template) -- S4 fold schema.
Schema-with-holes synthesis; tutoring: specs/2026-06-09-tutoring-code-synthesis-rung2-schemas.md
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 9 | const LS_NPAIR: i64 = 16 |
| 10 | const LS_NCOMP: i64 = 12 |
| 11 | const LS_MAXTERM: i64 = 60000 |
| 12 | const LS_MAXLVL: i64 = 3 |
| 13 | const LS_HCAP: i64 = 131072 |
| 14 | const LS_BUDGET: i64 = 4000000 |
functions
| 4 | func _ls_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 5 | func _ls_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; 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 } |
| 6 | func _ls_fputs(fd2: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd2,s,n); return 0 } |
| 7 | func _ls_fnum(fd2: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd2,"-" as *u8,1)}; 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(fd2,bb,k); return 0 } |
| 8 | func _ls_fsig(fd2: i64, v: i64) -> i64 { if v < 0 { _ls_fputs(fd2, "0 - " as *u8); _ls_fnum(fd2, 0 - v) } else { _ls_fnum(fd2, v) } return 0 } |
| 15 | func ls_arity(c: i64) -> i64 { if c == 12 { return 1 } return 2 } |
| 16 | func ls_comm(c: i64) -> i64 { if c == 2 { return 1 } if c == 3 { return 1 } if c == 4 { return 1 } if c == 5 { return 1 } if c == 6 { return 1 } return 0 } called by 1: ls_enum_steps |
| 17 | func ls_apply(c: i64, a: i64, b: i64) -> i64 |
| 32 | func ls_vech(vecs: *i64, ix: i64) -> i64 called by 1: ls_insert |
| 39 | func ls_vec_eq(vecs: *i64, x: i64, y: i64) -> i64 called by 1: ls_insert |
| 44 | func ls_insert(vecs: *i64, hash: *i64, nterm: i64) -> i64 |
| 57 | func ls_enum_steps(pa: *i64, pb: *i64, cons: *i64, ncon: i64, terms: *i64, vecs: *i64, hash: *i64, stats: *i64) -> i64 |
| 147 | func ls_eval(terms: *i64, ix: i64, a: i64, b: i64) -> i64 |
| 157 | func ls_byte(seed: i64, i: i64) -> i64 |
| 161 | func ls_run(init: i64, terms: *i64, ix: i64, seed: i64, len: i64) -> i64 |
| 167 | func ls_oracle(oid: i64, seed: i64, len: i64) -> i64 |
| 180 | func ls_check_spec(init: i64, terms: *i64, ix: i64, oid: i64, lens: *i64) -> i64 |
| 194 | func ls_verify(init: i64, terms: *i64, ix: i64, oid: i64) -> i64 |
| 206 | func ls_comp_name(c: i64) -> *u8 called by 1: ls_emit_term |
| 220 | func ls_emit_term(ofd: i64, terms: *i64, ix: i64) -> i64 |
| 230 | func ls_emit_module(path: *u8, init: i64, terms: *i64, ix: i64) -> i64 |
| 287 | func ls_corpus_line(label: *u8, verdict: *u8, init: i64, terms: *i64, ix: i64, scanned: i64) -> i64 |
| 300 | func ls_solve(label: *u8, path: *u8, oid: i64, cons: *i64, ncon: i64, terms: *i64, nk: i64, lens: *i64) -> i64 |
| 333 | func main() -> i64 |