code wiki / (root) / nx_pageref_gate.nx

nx_pageref_gate.nx

buildroot/runtime/nx_pageref_gate.nx

13320 B201 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_pageref_gate.nx -- the IN-PROCESS referee for nx_pageref_lib: the asset-reference vocabulary and the 404-fallback extension class. In-process ON PURPOSE -- the sibling nx_page_verify_gate proves the DEPLOYED verifier end-to-end over the real edge, and a gate that fork/execs a deployed elf cannot be mutation-proven. This one imports the lib, so nx_gate_bite can substitute a mutant and watch it die. EVERY ORACLE BELOW IS A HAND-WRITTEN LITERAL, NEVER A SECOND CALL INTO THE LIB. A tooth that calls the same function on both sides of its comparison cannot fail: it agrees with a mutant as readily as with the truth. The skip lengths (5 for src plus its quote, 10 for data-glb plus its quote) and the extension indices are typed out here independently of pr_len and pr_binext. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_pageref_lib.nx nx_pageref_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_pageref_lib.nx

imported by: nobody (leaf or entry point)

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

main 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 ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ gv_check gv_puts ↻ prg_is pr_attr_hit pr_nattr pr_attr pr_starts pr_len pr_len ↻ pr_declared_hit pr_starts ↻ pr_len ↻ pr_declared_type pr_len ↻ pr_starts ↻ pr_nbinext pr_binext pr_ext_class pr_lastdot

structs

none

consts

16const PRG_SKIP_SRC: i64 = 5 // src= plus its opening quote
17const PRG_SKIP_DATAGLB: i64 = 10 // data-glb= plus its opening quote
18const PRG_ATTR_SRC: i64 = 0
19const PRG_ATTR_DATAGLB: i64 = 1
20const PRG_QUOTE_DQ: i64 = 34
21const PRG_QUOTE_SQ: i64 = 39
22const PRG_MISS: i64 = 0 - 1
23const PRG_EXT_PNG: i64 = 0
24const PRG_EXT_JS: i64 = 3
25const PRG_EXT_GLB: i64 = 4
26const PRG_EXT_VRM: i64 = 5
27const PRG_EXT_WASM: i64 = 6
28const PRG_EXT_NXDV: i64 = 7
29const PRG_EXT_NXA: i64 = 8
31const PRG_ATTR_DECLARED: i64 = 2
32const PRG_SKIP_CONTENT: i64 = 9 // content= plus its opening quote
33const PRG_OFF_META_ATTR: i64 = 23 // <meta name="nishi-nxa" is 22 bytes; the space puts content= at 23
34const PRG_OFF_DESC_ATTR: i64 = 25 // <meta name="description" is 24 bytes; the space puts content= at 25
35const PRG_OFF_DIV_ATTR: i64 = 16 // <div data-x="1" is 15 bytes; the space puts content= at 16
37const PRG_OFF_IMG_ATTR: i64 = 5 // the five bytes of an img tag opening put src= at 5
38const PRG_OFF_CANV_ATTR: i64 = 8 // the eight bytes of a canvas tag opening put data-glb= at 8
39const PRG_CH_s: i64 = 115
40const PRG_CH_d: i64 = 100
41const PRG_CH_o: i64 = 111
42const PRG_CH_c: i64 = 99
43const PRG_LT: i64 = 60
44const PRG_BANG: i64 = 33
45const PRG_OUT_SLOTS: i64 = 2
46const PRG_WORD_BYTES: i64 = 8
47const PRG_BIN_BYTES: i64 = 8
48const PRG_DOCT_BYTES: i64 = 5
49const PRG_WASM_B1: i64 = 97 // a
50const PRG_WASM_B2: i64 = 115 // s
51const PRG_WASM_B3: i64 = 109 // m

functions

55func prg_is(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
57func prg_declared(f: *u8) -> i64
70func main() -> i64