code wiki / (root) / nx_inst_gen.nx

nx_inst_gen.nx

buildroot/runtime/nx_inst_gen.nx

3402 B88 linesdepth 6pulls 6 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_inst_gen.nx -- instance generation (Inst-Gen). Per Vampire-displacement roadmap Phase 2. Korovin + Voronkov 2003 alternative to resolution: instead of resolving complementary literals away (producing a single resolvent), INSTANTIATE both clauses with the unifier (producing two more-specific clauses). The downstream SAT-coupled prover (iProver, Vampire+SAT) then works on ground instances to prove UNSAT. Inst-Gen excels at problems with large finite Herbrand universes where resolution blows up but ground reasoning succeeds. Standard formulation: C ∨ L D ∨ ¬L' σ = mgu(L, L') ---------------------- (C ∨ L)σ (D ∨ ¬L')σ Both resulting clauses keep their full literal sets -- σ just makes them more specific. No literals are removed. This is the crucial difference from resolution. API: nx_inst_gen(c1, i, c2, j, c1_out, c2_out) -> *NxResult Caller allocates c1_out + c2_out; primitive populates both with the σ-applied versions.

dependencies 6 imports · 1 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_unify.nx nx_resolution.nx nx_inst_gen.nx nx_inst_gen_test.nx

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

imported by: nx_inst_gen_test.nx

structs

none

consts

none

functions

43func nx_inst_apply_clause(c: *Clause, sigma: *Subst, out: *Clause) -> *NxResult
62func nx_inst_gen(c1: *Clause, i: nx_int,