code wiki / (root) / nx_langspec_gate.nx

nx_langspec_gate.nx

buildroot/runtime/nx_langspec_gate.nx

16256 B214 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_langspec_gate.nx -- THE REFEREE for lang.plan rung LR5 (written specification plus conformance suite, watch symbol spec_conformance_run). THE ROW NAMES ONE TOOTH AND THIS GATE IS BUILT AROUND IT: "a planted deviation goes RED". A conformance runner that cannot fail is a certification costume, so the load-bearing question is not whether the suite passes -- it is whether the runner would NOTICE if the compiler stopped obeying the specification. That is asserted here by PLANTING a divergence between a written clause and the shipped compiler and requiring the runner to report DEVIATION and name the case. FIXTURES ARE ASSEMBLED AT RUNTIME into /tmp/nx_langspec_gate/, never committed beside the organ: a gate that shares a fixture with a production beat measures the fixture, and a detector that scans source finds its own fixture. The fixture spec, its three suites and its OWN conf are written here by this gate on every run, so the gate carries its own thresholds and never has to lower the live coverage ratchet to make its fixtures pass -- lowering the production floor to fit a test is editing the detector to flatter the measurement. WHY A SEPARATE CONF FIXTURE MATTERS. The production ratchet stands at full coverage. A fixture spec deliberately carries one clause NO case exercises, because the unexercised list is the rung's real deliverable and a list that is always empty cannot be shown to work. Its own conf sets a floor the fixture meets, so the two facts stay independent. SUBJECT: the SHIPPED runner (nx_langspec.elf, resolved from the cwd or from _offc/), driving the SHIPPED compiler. Nothing here simulates either. The absent-compiler control proves it: point the runner at a compiler that does not exist and it must ABSTAIN, not acquit and not convict. exit: gv_verdict (0 GREEN / 1 RED / 3 SKIP). license_tier: ORIGINAL. No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_ccgate_lib.nx nx_langspec_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_ccgate_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 ↻ lg_have sys_openat_rd 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 ↻ sys_munmap gv_puts ↻ gv_num ↻ gv_journal sys_openat_append

structs

none

consts

31const LG_DIR: *u8 = "/tmp/nx_langspec_gate\x00"
32const LG_CC: *u8 = "_offc/nx_cc_sovereign.elf\x00"
33const LG_CC_ABSENT: *u8 = "_offc/nx_cc_this_compiler_does_not_exist.elf\x00"
34const LG_PROD_SPEC: *u8 = "knowledge/specs/nishilang.spec\x00"
35const LG_PROD_SUITE: *u8 = "knowledge/specs/nishilang.suite\x00"
36const LG_PROD_CONF: *u8 = "knowledge/specs/nishilang_conformance.conf\x00"
37const LG_ARGV_SLOTS: i64 = 8
38const LG_EXIT_CONFORMANT: i64 = 0
39const LG_EXIT_DEVIATION: i64 = 1
40const LG_EXIT_UNOBSERVABLE: i64 = 3
41const LG_EXIT_EMPTY: i64 = 4

functions

43func lg_have(p: *u8) -> i64
called by 1: main calls 2: sys_openat_rdsys_close
50func lg_put(path: *u8, body: *u8) -> i64
63func lg_run(elf: *u8, verb: *u8, spec: *u8, suite: *u8, cc: *u8, conf: *u8, out: *u8) -> i64
78func main(argc: i64, argv: *i64) -> i64