code wiki / (root) / nx_emitmap_gate.nx

nx_emitmap_gate.nx

buildroot/runtime/nx_emitmap_gate.nx

12258 B227 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_emitmap_gate.nx -- referee for nx_emitmap (emission provenance: which function emits this text, which constant bounds this buffer). END-TO-END: forks the DEPLOYED ./nx_emitmap.elf into a /tmp/<gate>/ fixture artifact (never the production one), then asks it the questions it exists to answer. T1 census exits 0 and its stamp (LAST line, by position) carries asof, corpus_complete=1, files > 0 T2 partition: E rows counted == blocks declared, C rows == consts, R rows == reads (the stamp is a claim) T3 positive control: find of the catalogue's refusal text names nx_catalog.nx / main (a stable emitter this lane owns; the transport files that motivated the organ were mid-rewrite by a sibling seat when v1 of this gate ran, and a control naming a file another seat is editing measures the edit, not the organ) T4 positive control 2: find "capability denied for tool" names nx_tools_api.nx (the reply every seat reads) T5 anti-vacuity: find of a fabricated literal prints 0 sites and exits 1; the needle is ASSEMBLED AT RUNTIME (v1 carried it in this source and the census indexed the gate's own fixture -- a known class) T6 bound CLB_TOK_CAP names its DEFINITION in nx_catalog_lib.nx (C row, top level) and a READ inside clb_classify T7 neg-control-bound: a runtime-assembled fabricated *_MAX name prints 0 rows and exits 1 T8 invariant over every row: file:line parses with line > 0 and the function field is non-empty T9 blind spot DECLARED: the stamp names it, so no reader mistakes a literal index for a byte-code index license_tier: ORIGINAL expect_exit: 0 GREEN | 1 RED | 3 SKIP

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tool_run.nx nx_gate_verdict.nx nx_emitmap_gate.nx

imports: nx_syscalls.nxnx_tool_run.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_head gv_puts sys_write gv_ctr sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mkdir sys_mmap ↻ eg_run sys_mmap ↻ tr_run_capture sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_dup3 sys_execve_clean sys_close_inherited sys_close_inherited_proc sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_reclen sys_close ↻ sys_munmap sys_execve

structs

none

consts

21const EG_CAP: i64 = 1048576 // capture of one query: the emitter rows for one needle; announces if it fills
22const EG_FIX_DIR: *u8 = "/tmp/nx_emitmap_gate"
23const EG_FIX_OUT: *u8 = "/tmp/nx_emitmap_gate/emitmap.tsv"
24const EG_ELF: *u8 = "./nx_emitmap.elf"

functions

26func eg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: eg_kveg_has_site
27func eg_starts(s: *u8, p: *u8) -> i64 { var i: i64 = 0; while p[i] != (0 as u8) { if s[i] != p[i] { return 0 } i = i + 1 } return 1 }
28func eg_digits(b: *u8, i: i64) -> i64
called by 2: eg_kvmain
40func eg_kv(line: *u8, key: *u8) -> i64
called by 1: main calls 3: eg_sleneg_startseg_digits
50func eg_run(a1: *u8, a2: *u8, a3: *u8, cap: *u8, clen: *i64) -> i64
called by 1: main calls 3: sys_mmaptr_run_capturegv_puts
65func eg_has_site(cap: *u8, n: i64, kind: i64, file: *u8, fn: *u8) -> i64
called by 1: main calls 2: eg_startseg_slen
92func main(argc: i64, argv: *i64) -> i64