code wiki / _hdl_build / _loop_synth_authored.nx

_loop_synth_authored.nx

buildroot/runtime/_hdl_build/_loop_synth_authored.nx

17365 B403 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic loop
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx _loop_synth_authored.nx

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

main _ls_puts sys_write sys_mmap ls_enum_steps ls_insert ls_vech ls_vec_eq ls_arity ls_apply ls_comm _ls_num sys_mmap ↻ sys_write ↻ ls_solve ls_check_spec ls_run ls_eval ls_eval ↻ ls_arity ↻ ls_apply ↻ ls_byte ls_oracle ls_byte ↻ ls_verify ls_run ↻ ls_oracle ↻ _ls_puts ↻ _ls_num ↻ ls_emit_term _ls_fputs sys_write ↻ _ls_fsig _ls_fputs ↻ _ls_fnum sys_mmap ↻ sys_write ↻ ls_comp_name ls_emit_term ↻ ls_arity ↻

structs

none

consts

9const LS_NPAIR: i64 = 16
10const LS_NCOMP: i64 = 12
11const LS_MAXTERM: i64 = 60000
12const LS_MAXLVL: i64 = 3
13const LS_HCAP: i64 = 131072
14const LS_BUDGET: i64 = 4000000

functions

4func _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 }
called by 2: ls_solvemain calls 1: sys_write
5func _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 }
called by 2: ls_solvemain calls 2: sys_mmapsys_write
6func _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 }
7func _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 }
8func _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 }
15func ls_arity(c: i64) -> i64 { if c == 12 { return 1 } return 2 }
16func 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
17func ls_apply(c: i64, a: i64, b: i64) -> i64
32func ls_vech(vecs: *i64, ix: i64) -> i64
called by 1: ls_insert
39func ls_vec_eq(vecs: *i64, x: i64, y: i64) -> i64
called by 1: ls_insert
44func ls_insert(vecs: *i64, hash: *i64, nterm: i64) -> i64
called by 1: ls_enum_steps calls 2: ls_vechls_vec_eq
57func ls_enum_steps(pa: *i64, pb: *i64, cons: *i64, ncon: i64, terms: *i64, vecs: *i64, hash: *i64, stats: *i64) -> i64
147func ls_eval(terms: *i64, ix: i64, a: i64, b: i64) -> i64
157func ls_byte(seed: i64, i: i64) -> i64
called by 2: ls_runls_oracle
161func ls_run(init: i64, terms: *i64, ix: i64, seed: i64, len: i64) -> i64
167func ls_oracle(oid: i64, seed: i64, len: i64) -> i64
called by 2: ls_check_specls_verify calls 1: ls_byte
180func ls_check_spec(init: i64, terms: *i64, ix: i64, oid: i64, lens: *i64) -> i64
called by 1: ls_solve calls 2: ls_runls_oracle
194func ls_verify(init: i64, terms: *i64, ix: i64, oid: i64) -> i64
called by 1: ls_solve calls 2: ls_runls_oracle
206func ls_comp_name(c: i64) -> *u8
called by 1: ls_emit_term
220func ls_emit_term(ofd: i64, terms: *i64, ix: i64) -> i64
230func ls_emit_module(path: *u8, init: i64, terms: *i64, ix: i64) -> i64
287func ls_corpus_line(label: *u8, verdict: *u8, init: i64, terms: *i64, ix: i64, scanned: i64) -> i64
300func ls_solve(label: *u8, path: *u8, oid: i64, cons: *i64, ncon: i64, terms: *i64, nk: i64, lens: *i64) -> i64
333func main() -> i64