code wiki / (root) / nx_wordclust_gate.nx

nx_wordclust_gate.nx

buildroot/runtime/nx_wordclust_gate.nx

7569 B118 linesdepth 6pulls 12 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_wordclust_gate.nx -- GATE for the PPMI word clusterer (nx_wordclust), driven IN-PROCESS on a PLANTED NXPPMI1 model under /tmp/nx_wordclust_gate (six words, three orthogonal context vectors, written by the library's own fixture writer through the ONE loader's format). Proves: the fixture is read back by the canonical loader, words the model knows resolve and one it does not reads -1, k-medoids at K=3 groups the three synonym pairs and separates the three pairs, a word unseen at build time is assigned on demand to its pair's cluster, ids spell as two bytes and -1 as one, two builds agree, and a missing model fails closed (no clusters, never a crash). Every fixture asserts its own condition first. No network. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_gatekit_lib.nx nx_reviewmine_lib.nx nx_wordclust.nx nx_gate_verdict.nx nx_wordclust_gate.nx

imports: nx_syscalls.nxnx_gatekit_lib.nxnx_reviewmine_lib.nxnx_wordclust.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

structs

none

consts

14const G_ROOT: *u8 = "/tmp/nx_wordclust_gate"
15const G_MODEL: *u8 = "/tmp/nx_wordclust_gate/mini.ppmi"
16const G_MISSING: *u8 = "/tmp/nx_wordclust_gate/absent.ppmi"
17const G_I64: i64 = 8
18const G_NW: i64 = 6
19const G_MODEL_BYTES: i64 = 280 // 32 + 6*8 + 7*8 + 6*8 + 6*8 + 6*8
20const G_K: i64 = 3
21const G_BUILD_WORDS: i64 = 5 // food is held back and assigned on demand

functions

23func main() -> i64