code wiki / _hdl_build / nx_suitebench_lib.nx

nx_suitebench_lib.nx

buildroot/runtime/_hdl_build/nx_suitebench_lib.nx

6193 B155 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind bench
docsdependenciesstructsconstsfunctions

about

nx_suitebench_lib.nx -- the pure core of the suite ruler: file reading, literal citation search, the in-place row splitter, and the two ranking keys. NO main, so BOTH the CLI (nx_suitebench) and the gate (nx_suitebench_gate) drive the SAME bytes. This is the library-split the CONNECT lane already paid for: an organ that carries main() is unimportable, so its gate ends up re-implementing the logic it claims to verify -- and then the gate proves a copy, not the shipped code. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_suitebench_lib.nx nx_sbroot_probe.nx nx_suitebench.nx nx_suitebench_gate.nx

imports: nx_syscalls.nx

imported by: nx_sbroot_probe.nxnx_suitebench.nxnx_suitebench_gate.nx

structs

none

consts

9const SB_NFIELD: i64 = 8
10const SB_HAS: i64 = 1
11const SB_LACKS: i64 = 0
12const SB_UNKNOWN: i64 = 9
13const SB_PARITY: i64 = 2
14const SB_MAXLVL: i64 = 3
15const SB_PIPE: i64 = 124
16const SB_HASH: i64 = 35
17const SB_NL: i64 = 10
61const SB_ROOTS: i64 = 4

functions

19func sb_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: sb_padsb_find
20func sb_eq(a: *u8, b: *u8) -> i64
called by 2: mainmain
29func sb_atoi(s: *u8) -> i64
called by 2: mainmain
39func sb_read(path: *u8, buf: *u8, cap: i64) -> i64
62func sb_root(i: i64) -> *u8
68func sb_join(dst: *u8, pre: *u8, path: *u8) -> i64
78func sb_read_rooted(path: *u8, buf: *u8, cap: i64, scratch: *u8) -> i64
called by 3: mainmainmain calls 3: sb_joinsb_rootsb_read
90func sb_which_root(path: *u8, scratch: *u8, probe: *u8, probecap: i64) -> i64
called by 2: mainmain calls 3: sb_joinsb_rootsb_read
102func sb_find(buf: *u8, n: i64, needle: *u8) -> i64
called by 2: mainmain calls 1: sb_len
116func sb_split(buf: *u8, start: i64, end: i64, fld: **u8) -> i64
called by 2: mainmain
137func sb_shortfall(honest: i64) -> i64 { return SB_MAXLVL - honest }
called by 2: sb_ranksb_admit
140func sb_rank(has: i64, honest: i64) -> i64 { return (has+1)*sb_shortfall(honest) }
called by 1: main calls 1: sb_shortfall
142func sb_admit(has: i64, op: i64, honest: i64) -> i64
called by 1: main calls 1: sb_shortfall
151func sb_is_ext(state: i64, cited: i64) -> i64
called by 1: main