nx_sine.nx
buildroot/runtime/nx_sine.nx
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
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
| 52 | struct SineCtx |
consts
| 46 | const NX_MAGIC_9223372036854775807: i64 = 9223372036854775807 |
| 47 | const NX_MAGIC_1024: i64 = 1024 |
| 49 | const NX_SINE_MAX_SYMS: nx_int = 1024 |
| 50 | const NX_SINE_MAX_AXIOMS: nx_int = 512 |
| 63 | const NX_SINE_CTX_BYTES: nx_int = 64 |
functions
| 67 | func nx_sine_collect_term_syms(t: *Term, seen: *nx_int) called by 2: nx_sine_collect_term_symsnx_sine_collect_clause_syms calls 2: nx_sine_collect_term_symsnx_term_arg |
| 83 | func nx_sine_collect_clause_syms(c: *Clause, seen: *nx_int) called by 3: nx_sine_build_freqnx_sine_is_definernx_sine_select calls 2: nx_clause_lit_atnx_sine_collect_term_syms |
| 94 | func nx_sine_build_freq(ctx: *SineCtx, axioms: *Clause, n_axioms: nx_int) |
| 115 | func nx_sine_is_definer(ctx: *SineCtx, c: *Clause, s: nx_int) -> nx_int |
| 137 | func nx_sine_enqueue(ctx: *SineCtx, s: nx_int) called by 1: nx_sine_select |
| 156 | func nx_sine_select(axioms: *Clause, n_axioms: nx_int, |