code wiki / _hdl_build / nx_gatequality_test.nx
nx_gatequality_test.nx
buildroot/runtime/_hdl_build/nx_gatequality_test.nx
about
nx_gatequality_test.nx -- the gate for the coverage measurer.
A coverage tool that nothing checks is the joke it exists to prevent, and
worse, its failure mode is silence: an over-reporting coverage number reads
as reassurance and nobody goes looking.
The three properties below are the ones whose absence would make the
measurement anti-correlated with the truth rather than merely imprecise:
T1 COMMENTS STRIPPED. Gates here carry long headers that NAME the
functions they discuss. Matching raw text would mark a function
covered because someone wrote prose about it -- and the worse the
coverage, the likelier that prose exists.
T2 TOKEN-EXACT. Substring matching would credit si_class to a mention
of si_class_of, which is how a coverage tool starts reporting numbers
that are reassuring and false.
T3 TRANSITIVE. Found by verifying a row rather than trusting it: the
management API's gate drives it over HTTP and calls one dispatcher
directly, so direct-reach scored it 15 permil. Reachability through
the organ's own calls is the honest measure.
expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_gate.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 25 | func tw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 26 | func tn(v: i64) -> i64 { let b: *u8 = sys_mmap(24); var m: i64 = v; if m < 0 { sys_write(1, "-" as *u8, 1); m = 0 - m } let t: *u8 = sys_mmap(24); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } var i: i64 = 0; while i < k { b[i] = t[k - 1 - i]; i = i + 1 } sys_write(1, b, k); return 0 } |
| 27 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 32 | func x_is_ident(c: i64) -> i64 called by 1: x_has_token |
| 39 | func x_strip(src: *u8, n: i64, dst: *u8) -> i64 called by 1: main |
| 56 | func x_has_token(hay: *u8, hn: i64, name: *u8, nl: i64) -> i64 |
| 75 | func main() -> i64 |