nx_cdmap_referee.nx
buildroot/runtime/nx_cdmap_referee.nx
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
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
structs
| none |
consts
| 15 | const P_ARGC: i64 = 5 |
| 16 | const P_EXIT_AGREE: i64 = 0 |
| 17 | const P_EXIT_DISAGREE: i64 = 1 |
| 18 | const P_EXIT_USAGE: i64 = 2 |
| 19 | const P_EXIT_UNPROVEN: i64 = 3 |
| 20 | const P_BLOCK: *u8 = "readability_cut" |
functions
| 22 | func p_kv(k: *u8, v: i64) -> i64 { gv_puts(" " as *u8); gv_puts(k); gv_puts("=" as *u8); gv_num(v); return 0 } |
| 23 | func p_crit(label: *u8, c: *i64) -> i64 |
| 30 | func 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 } |
| 31 | func p_alloc_i64(n: i64) -> *i64 { return sys_mmap(n * CR_I64_BYTES) as *i64 } called by 1: main |
| 33 | func main(argc: i64, argv: *i64) -> i64 |