code wiki / (root) / nx_dom_oracle_gate.nx

nx_dom_oracle_gate.nx

buildroot/runtime/nx_dom_oracle_gate.nx

11430 B316 linesdepth 6pulls 15 transitivereach 0 importersview sourcekind gate/prooftopic dom
docsdependenciesstructsconstsfunctions

about

nx_dom_oracle_gate.nx -- BRUTE-FORCE DOMINANCE ORACLE for dom_fn.nx. The banked LICM awakening rung (nx_opt.nx DORMANT-COMPAT, 2026-06-10): "Awakening rung = dominance brute-force oracle FIRST, then this load." This gate IS that oracle. Definition-level ground truth: D dominates B iff removing D makes B unreachable from entry. Compares that, pairwise, against dom_compute_fn's idom chains over EVERY function of the FULL self-host compiler source (the exact merge-heavy CFGs that broke the 06-10 awakening), on the post-parse CFG AND the post-opt_run CFG (the shapes LICM actually sees inside the fixpoint). Skips (reported, never silent): functions with any block n_preds > 3 (the pred-truncation class -- opt_licm DECLINES these, so they are outside the awakening's blast zone) and functions with n_blocks > DOR_MAX_B (brute cost). NEGATIVE CONTROL: a deliberately corrupted idom entry must produce mismatches -- proves the comparator can see a lie. Verdict GREEN iff mismatches == 0 AND negctl fired. license_tier: ORIGINAL

dependencies 11 imports · 0 importers

nx_syscalls.nx nx_types.nx nx_lex_kinds.nx nx_outbuf.nx nx_ir.nx nx_tokenizer.nx nx_parse.nx nx_opt.nx nx_ir_validate.nx nx_import.nx nx_dom_oracle_gate.nx

diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_types.nxnx_lex_kinds.nxnx_outbuf.nxnx_ir.nxnx_tokenizer.nxnx_parse.nxnx_opt.nxnx_ir_validate.nxnx_import.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 dor_w sys_write sys_mmap expand_ctx_new sys_mmap ↻ expand_imports expand_imports_inner lex_source sys_mmap ↻ lexm_expand lexm_prescan lexm_isid is_alnum is_alpha is_digit lexm_body_end lexm_define lexm_init sys_mmap ↻ lexm_warn_body_too_long lexm_diag_cell lexm_emit_str lexm_emit_dec sys_write ↻ lexm_name_at lexm_body_at sys_mmap ↻ lexm_isid ↻ lexm_body_end ↻ lexm_for_expand lexm_isid ↻ lexm_body_end ↻ lexm_for_emit lexm_isid ↻ sys_mmap ↻ lexm_for_bound lexm_lookup lexm_name_at ↻ lexm_body_at ↻

structs

none

consts

30const DOR_MAX_B: i64 = 256
31const DOR_EXPAND_CAP: i64 = 4194304

functions

33func dor_w(s: *u8) -> i64
called by 2: dor_check_fnmain calls 1: sys_write
39func dor_wn(v: i64) -> i64
called by 2: dor_check_fnmain calls 2: sys_mmapsys_write
57func dor_bidx(f: *Function, bb: *BasicBlock) -> i64
called by 2: dor_reachdor_check_fn calls 1: block_at
68func dor_reach(f: *Function, skip: i64, reach: *u8, wl: *i64) -> i64
called by 1: dor_check_fn calls 2: dor_bidxblock_at
107func dor_chain_dom(idom_idx: *i64, n: i64, d: i64, b: i64) -> i64
called by 1: dor_check_fn
124func dor_check_fn(f: *Function, fname: *u8, cnt: *i64, negctl: i64) -> i64
213func main(argc: i64, argv: *i64) -> i64