code wiki / (root) / nx_indexed_subsume_test.nx

nx_indexed_subsume_test.nx

buildroot/runtime/nx_indexed_subsume_test.nx

4249 B107 linesdepth 8pulls 11 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_indexed_subsume_test.nx -- discrim-tree-backed forward subsumption. Verifies the indexed lookup gives the same answer as the linear scan.

dependencies 10 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_unify.nx nx_resolution.nx nx_subsumption.nx nx_tautology.nx nx_disctree.nx nx_saturation.nx nx_indexed_subsume_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nxnx_unify.nxnx_resolution.nxnx_subsumption.nxnx_tautology.nxnx_disctree.nxnx_saturation.nx

imported by: nobody (leaf or entry point)

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

main println sys_write strlen sys_mmap nx_saturation_new sys_mmap ↻ nx_dt_new sys_mmap ↻ nx_dt_node_new sys_mmap ↻ push nx_sat_move_to_processed nx_result_err sys_mmap ↻ nx_sat_proc_at nx_result_ok sys_mmap ↻ nx_sat_index_clause nx_sat_proc_at ↻ nx_clause_lit_at nx_dt_insert sys_mmap ↻ nx_dt_linearize nx_dt_linearize ↻ nx_term_arg nx_dt_node_descend nx_dt_node_new ↻ sys_mmap ↻ mk_unit nx_clause_new sys_mmap ↻ nx_clause_add nx_result_err ↻ nx_clause_lit_at ↻ nx_result_ok ↻ nx_lit_make sys_mmap ↻ mk_p_var sys_mmap ↻

structs

none

consts

15const SYM_A: nx_int = 100
16const SYM_B: nx_int = 101
17const SYM_P: nx_int = 200
18const SYM_Q: nx_int = 201
19const VAR_X: nx_int = 0

functions

21func mk_p(p_sym: nx_int, c_sym: nx_int) -> *Term
called by 1: main calls 2: sys_mmapnx_term_app
27func mk_p_var(p_sym: nx_int, var_id: nx_int) -> *Term
called by 1: main calls 2: sys_mmapnx_term_app
33func mk_unit(atom: *Term) -> *Clause
40func push(s: *Saturation, c: *Clause)
46func compare(name: *u8, s: *Saturation, q: *Clause, expected: nx_int) -> nx_int
61func main() -> nx_exit