code wiki / (root) / _probe_mulpow2_guard.nx

_probe_mulpow2_guard.nx

buildroot/runtime/_probe_mulpow2_guard.nx

3175 B76 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind probetopic probe
docsdependenciesstructsconstsfunctions

about

Adversarial probe: reproduce the EXACT log2-by-halving + k<W guard logic from nx_eqsat_apply_rule_mul_pow2 (lines 447-471) on hostile constants, to test whether the guard has a hole. We do NOT import nx_eqsat (that would drag the gsim); we transcribe the guard arithmetic 1:1.

dependencies 1 imports · 0 importers

nx_syscalls.nx _probe_mulpow2_guard.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 guard_decision _emit_num sys_mmap ↻ sys_write _nl sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

8const NX_EQSAT_W: i64 = 64

functions

10func _emit_num(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
19func _nl() -> i64 { let z: *u8 = sys_mmap(2); z[0] = 10; sys_write(1, z, 1); return 0 }
called by 1: main calls 2: sys_mmapsys_write
23func guard_decision(cval: i64, out_k: *i64, out_pow2: *i64) -> i64
called by 1: main
45func main() -> i64