code wiki / (root) / nx_sine.nx

nx_sine.nx

buildroot/runtime/nx_sine.nx

7815 B216 linesdepth 6pulls 6 transitivereach 5 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_sine.nx -- Sine (Sumo INference Engine) axiom selection. Per Vampire-displacement roadmap Phase 2. Critical for the CASC LTB (Large Theory Batch) division -- problems may have thousands of axioms but the conjecture only needs a few dozen. Sine picks the relevant subset before saturation, often shrinking the search space by 100x or more. Hoder + Voronkov 2011 standard formulation: tolerance T (typically 1.0 to 3.0) For each symbol s in the problem, count freq(s) = number of axioms containing s. For each symbol s, the "D-relation" picks definitional axioms: d(s) = { axiom A : s ∈ symbols(A) ∧ freq(s) ≤ T * min { freq(t) : t ∈ symbols(A) } } Selection algorithm (fixpoint): selected = ∅ queue = symbols(conjecture) while queue not empty: s = pop(queue) for each A in d(s) not in selected: add A to selected add new symbols of A to queue return selected Output: subset of axioms reachable from the conjecture's symbols through definition chains. Bits-up nx_int, no f64. tolerance is Q10 (1024 = 1.0).

dependencies 6 imports · 5 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_unify.nx nx_resolution.nx nx_sine.nx nx_avatar_solve_test.nx nx_casc_runner_test.nx nx_sine_test.nx nx_solve.nx nx_solve_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nxnx_unify.nxnx_resolution.nx

imported by: nx_avatar_solve_test.nxnx_casc_runner_test.nxnx_sine_test.nxnx_solve.nxnx_solve_test.nx

structs

52struct SineCtx

consts

46const NX_MAGIC_9223372036854775807: i64 = 9223372036854775807
47const NX_MAGIC_1024: i64 = 1024
49const NX_SINE_MAX_SYMS: nx_int = 1024
50const NX_SINE_MAX_AXIOMS: nx_int = 512
63const NX_SINE_CTX_BYTES: nx_int = 64

functions

67func nx_sine_collect_term_syms(t: *Term, seen: *nx_int)
83func nx_sine_collect_clause_syms(c: *Clause, seen: *nx_int)
94func nx_sine_build_freq(ctx: *SineCtx, axioms: *Clause, n_axioms: nx_int)
115func nx_sine_is_definer(ctx: *SineCtx, c: *Clause, s: nx_int) -> nx_int
137func nx_sine_enqueue(ctx: *SineCtx, s: nx_int)
called by 1: nx_sine_select
156func nx_sine_select(axioms: *Clause, n_axioms: nx_int,