code wiki / _hdl_build / nx_suitebench_lib.nx
nx_suitebench_lib.nx
buildroot/runtime/_hdl_build/nx_suitebench_lib.nx
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
imports: nx_syscalls.nx
imported by: nx_sbroot_probe.nxnx_suitebench.nxnx_suitebench_gate.nx
structs
| none |
consts
| 9 | const SB_NFIELD: i64 = 8 |
| 10 | const SB_HAS: i64 = 1 |
| 11 | const SB_LACKS: i64 = 0 |
| 12 | const SB_UNKNOWN: i64 = 9 |
| 13 | const SB_PARITY: i64 = 2 |
| 14 | const SB_MAXLVL: i64 = 3 |
| 15 | const SB_PIPE: i64 = 124 |
| 16 | const SB_HASH: i64 = 35 |
| 17 | const SB_NL: i64 = 10 |
| 61 | const SB_ROOTS: i64 = 4 |
functions
| 19 | func sb_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 20 | func sb_eq(a: *u8, b: *u8) -> i64 |
| 29 | func sb_atoi(s: *u8) -> i64 |
| 39 | func sb_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 62 | func sb_root(i: i64) -> *u8 |
| 68 | func sb_join(dst: *u8, pre: *u8, path: *u8) -> i64 |
| 78 | func sb_read_rooted(path: *u8, buf: *u8, cap: i64, scratch: *u8) -> i64 |
| 90 | func sb_which_root(path: *u8, scratch: *u8, probe: *u8, probecap: i64) -> i64 |
| 102 | func sb_find(buf: *u8, n: i64, needle: *u8) -> i64 |
| 116 | func sb_split(buf: *u8, start: i64, end: i64, fld: **u8) -> i64 |
| 137 | func sb_shortfall(honest: i64) -> i64 { return SB_MAXLVL - honest } |
| 140 | func sb_rank(has: i64, honest: i64) -> i64 { return (has+1)*sb_shortfall(honest) } |
| 142 | func sb_admit(has: i64, op: i64, honest: i64) -> i64 |
| 151 | func sb_is_ext(state: i64, cited: i64) -> i64 called by 1: main |