code wiki / _hdl_build / _loopsynth_countnz.nx

_loopsynth_countnz.nx

buildroot/runtime/_hdl_build/_loopsynth_countnz.nx

1939 B59 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic loopsynth
docsdependenciesstructsconstsfunctions

about

SYNTHESIZED BY THE NISHI TEAM (fold schema, _loop_synth_authored): the loop skeleton is the sketch; INIT+STEP were derived from oracle queries and held-out-verified.

dependencies 1 imports · 0 importers

nx_syscalls.nx _loopsynth_countnz.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 sys_mmap _g_byte synth step _c_add _c_le sys_exit

structs

none

consts

none

functions

4func _c_le(a: i64, b: i64) -> i64 { if a <= b { return 1 } return 0 }
called by 1: step
5func _c_add(a: i64, b: i64) -> i64 { return a + b }
called by 1: step
6func _c_max(a: i64, b: i64) -> i64 { if a > b { return a } return b }
7func _c_min(a: i64, b: i64) -> i64 { if a < b { return a } return b }
8func _c_mul(a: i64, b: i64) -> i64 { return a * b }
9func _c_and(a: i64, b: i64) -> i64 { return a & b }
10func _c_shr(a: i64, b: i64) -> i64 { return a >> (b & 63) }
11func _c_sub(a: i64, b: i64) -> i64 { return a - b }
12func _c_shl(a: i64, b: i64) -> i64 { return a << (b & 63) }
13func _c_div(a: i64, b: i64) -> i64 { if b == 0 { return 0 } return a / b }
14func _c_mod(a: i64, b: i64) -> i64 { if b == 0 { return 0 } return a % b }
15func _c_abs(a: i64) -> i64 { if a < 0 { return 0 - a } return a }
16func step(a: i64, b: i64) -> i64 { return _c_add(a, _c_le(1, b)) }
called by 1: synth calls 2: _c_add_c_le
17func synth(buf: *u8, n: i64) -> i64
called by 1: main calls 1: step
23func _g_byte(seed: i64, i: i64) -> i64
called by 1: main
27func main() -> i64