code wiki / (root) / nx_cdmap_referee.nx

nx_cdmap_referee.nx

buildroot/runtime/nx_cdmap_referee.nx

7209 B116 linesdepth 8pulls 13 transitivereach 0 importersview sourcekind tooltopic cdmap
docsdependenciesstructsconstsfunctions

about

nx_cdmap_referee.nx -- the position map's SECOND RULER as a program (datavis DV2a, 2026-09-15). Reads an emitted compare page and its api.json, re-derives the 2D cut's readability grade from the SVG alone (the heuristic critic must REPRODUCE what the page printed), then re-measures every label with real TrueType advances from a real sans face and grades again. usage: nx_cdmap_referee <index.html> <api.json> <regular.ttf> <bold.ttf> exit 0 AGREE the heuristic critic reproduces the published grade AND the metric critic finds the same defect count 1 DISAGREE either the page and its api.json disagree, or real glyph widths change the defect count 2 usage 3 UNPROVEN no cdmap on the page, labels and marks do not pair, the frame is unreadable, api.json lacks the grade, or the font cannot be read -- a verdict this program could not reach is named, never acquitted The verdict line is LAST. Every number it decides on is printed above it so an outside reader can recompute the call. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_cdmap_referee_lib.nx nx_gate_verdict.nx nx_cdmap_referee.nx

imports: nx_cdmap_referee_lib.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_puts sys_write p_alloc_i64 p_kv gv_puts ↻ gv_num 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_write ↻ sys_munmap p_unproven gv_puts ↻ cr_scan cr_find cr_slen cr_tag_end cr_attr cr_find ↻ cr_int_at cr_slen ↻ cr_in_note cr_rfind cr_find ↻ cr_boxes cl_text_h cr_w_heuristic

structs

none

consts

15const P_ARGC: i64 = 5
16const P_EXIT_AGREE: i64 = 0
17const P_EXIT_DISAGREE: i64 = 1
18const P_EXIT_USAGE: i64 = 2
19const P_EXIT_UNPROVEN: i64 = 3
20const P_BLOCK: *u8 = "readability_cut"

functions

22func p_kv(k: *u8, v: i64) -> i64 { gv_puts(" " as *u8); gv_puts(k); gv_puts("=" as *u8); gv_num(v); return 0 }
called by 2: p_critmain calls 2: gv_putsgv_num
23func p_crit(label: *u8, c: *i64) -> i64
called by 1: main calls 2: gv_putsp_kv
30func p_unproven(why: *u8) -> i64 { gv_puts(" UNPROVEN: " as *u8); gv_puts(why); gv_puts("\nverdict=UNPROVEN\n" as *u8); sys_exit(P_EXIT_UNPROVEN); return P_EXIT_UNPROVEN }
called by 1: main calls 1: gv_puts
31func p_alloc_i64(n: i64) -> *i64 { return sys_mmap(n * CR_I64_BYTES) as *i64 }
called by 1: main
33func main(argc: i64, argv: *i64) -> i64