code wiki / (root) / nx_virtio_spec_oracle_gate.nx

nx_virtio_spec_oracle_gate.nx

buildroot/runtime/nx_virtio_spec_oracle_gate.nx

10980 B194 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic virtio
docsdependenciesstructsconstsfunctions

about

nx_virtio_spec_oracle_gate.nx -- THE ORACLE ROW FOR `smallos`: corroborate OUR declared virtio-MMIO register map against the PUBLISHED OASIS SPECIFICATION -- a document WE DID NOT WRITE. WHY THIS EXISTS (and why it is not just another self-test). nx_evidence_verdict.nx clause 5 TRIANGULATION requires >=2 distinct method classes with >=1 MECHANISTIC, and defines the ORACLE class as agreement with an INDEPENDENT implementation or external ground truth -- explicitly "something WE DID NOT WRITE". Every other gate in this lane is MECH and SELF-AUTHORED: I wrote the questions AND the answers. MEASURED 2026-08-15: smallos therefore carried exactly ONE method class, min_classes=2 binds, and the domain COULD NOT REACH PROVEN no matter how many of its own gates went green. ******A DOMAIN THAT CAN ONLY EVER CITE ITSELF HAS A CEILING NO AMOUNT OF GREEN CAN RAISE. WHAT I REFUSED, recorded so nobody quietly does it: this estate has TWO rv64 simulators (rv64im_min_sim, nx_rv64_fast) and a differential between them LOOKS like clause 5's "second-implementation cross-check". It does not qualify -- BOTH ARE OURS. **A CROSS-CHECK BETWEEN TWO THINGS YOU WROTE MEASURES YOUR CONSISTENCY, NOT YOUR CORRECTNESS.** THE SUBJECT: knowledge/specs/EXTERNAL-virtio-v1.2-oasis.html, fetched 2026-08-15 over the sovereign HTTPS stack from docs.oasis-open.org (2,678,562 B, byte-verified on copy). It is the ONLY external virtio ground truth in the corpus -- before the fetch there was NONE (`virtio-v1` across knowledge/ = 0 matches, corpus_complete=1 over 176,785 files). THE CHECK, and its CEILING STATED PLAINLY: for every register offset and identity constant OUR spec DECLARES, assert the literal appears in the OASIS document. This is PRESENCE-IN-THE-NORMATIVE-TEXT, which is WEAKER than parsing the register table: a literal could in principle occur in unrelated prose. It is corroboration, NOT derivation, and it must never be quoted as more. What makes it worth having anyway is the NEG-CONTROL below: a FABRICATED offset must be ABSENT, which proves the check can discriminate rather than saying yes to everything. *A PRESENCE TEST WITHOUT AN ABSENCE CONTROL IS A FUNCTION THAT RETURNS TRUE. DATA-DRIVEN (rule 11): the constants are READ OUT OF OUR SPEC at runtime, never retyped here, so the gate cannot drift from the thing it certifies. Adding a register to the spec extends this gate for free. exit: gv_verdict (0 GREEN / 1 RED / 3 SKIP) license_tier: ORIGINAL. Read-only. No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_virtio_spec_oracle_gate.nx

imports: nx_syscalls.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_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 ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close gv_need gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻

structs

none

consts

36const VO_SPEC_EXT: *u8 = "knowledge/specs/EXTERNAL-virtio-v1.2-oasis.html"
37const VO_SPEC_OURS: *u8 = "knowledge/specs/virtio_blk_sector_virt.spec"
40const VO_BOGUS: *u8 = "0x0AB7"
41const VO_NL: i64 = 10
42const VO_SP: i64 = 32

functions

44func vo_p(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: vo_nmain calls 1: sys_write
45func vo_n(v: i64) -> i64
called by 1: main calls 3: vo_psys_mmapsys_write
58func vo_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: vo_hasvo_starts
63func vo_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
called by 1: vo_has
65func vo_has(buf: *u8, n: i64, lit: *u8) -> i64
called by 1: main calls 2: vo_lenvo_lc
87func vo_is_sovereign(buf: *u8, ls: i64, le: i64) -> i64
called by 1: main
96func vo_starts(buf: *u8, ls: i64, le: i64, pfx: *u8) -> i64
called by 1: main calls 1: vo_len
106func vo_lastfield_tail(buf: *u8, ls: i64, le: i64, out: *u8) -> i64
called by 1: main
121func main() -> i64