code wiki / (root) / nx_paper_audit_cli.nx

nx_paper_audit_cli.nx

buildroot/runtime/nx_paper_audit_cli.nx

8002 B172 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind tooltopic paper
docsdependenciesstructsconstsfunctions

about

nx_paper_audit_cli.nx -- callable MCP/API surface for citation resolution (AS-3). nx_paper_audit <manuscript.md> <evidence.tsv> resolves every [ev:ID] against the ledger and checks the adjacent number matches. dangling = the row named does not exist contradicted= the printed number differs from the row it names unanchored = the citation supports prose, not a figure (reported, not an error) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0 (1 if NOT clean)

dependencies 2 imports · 0 importers

nx_paper_audit.nx nx_syscalls.nx nx_paper_audit_cli.nx

imports: nx_paper_audit.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main pac_puts sys_write pac_key pac_q sys_mmap sys_write ↻ pac_puts ↻ pac_q ↻ sys_exit sys_mmap ↻ pac_read sys_openat_rd sys_read sys_close pa_audit pf_lookup pf_eol pa_prev_num pa_range_eq pa_clean pac_pfx pa_rows pf_eol ↻ pa_row pf_eol ↻ pa_contains pac_num sys_mmap ↻ sys_write ↻ pa_integrity

structs

none

consts

12const K_MAGIC_1048576: i64 = 1048576
13const K_MAGIC_1048560: i64 = 1048560
14const K_MAGIC_262144: i64 = 262144
15const K_MAGIC_262128: i64 = 262128
16const K_MAGIC_4096: i64 = 4096
17const K_MAGIC_1024: i64 = 1024
18const K_MAGIC_4000: i64 = 4000

functions

20func pac_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: pac_keymain calls 1: sys_write
21func pac_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: pac_keymain calls 2: sys_mmapsys_write
22func pac_key(name: *u8) -> i64 { pac_q(); pac_puts(name); pac_q(); pac_puts(":" as *u8); return 0 }
called by 1: main calls 2: pac_qpac_puts
23func pac_num(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
33func pac_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
49func pac_pfx(s: *u8, pfx: *u8) -> i64
called by 1: main
57func main(argc: i64, argv: *i64) -> i64