code wiki / (root) / nx_demodulation.nx

nx_demodulation.nx

buildroot/runtime/nx_demodulation.nx

5402 B130 linesdepth 6pulls 7 transitivereach 1 importersview sourcekind sketch/demo
docsdependenciesstructsconstsfunctions

about

nx_demodulation.nx -- term rewriting via oriented equations. Per Vampire-displacement roadmap Phase 1 step 3. An oriented equation l = r (with l >_KBO r) is a rewrite rule. Demodulation rewrites every subterm of a target that matches l to the corresponding instance of r, normalizing terms before they re-enter the saturation loop. Together with subsumption, this is the second-largest pruner in Vampire-class provers. Match direction: l is the pattern, target subterm is the term. We walk the target outermost-first; on any successful match we substitute and recurse into the result. Single-pass per call -- callers run it to a fixpoint when full normal form is required. Bits-up nx_int. Result-typed for orientation.

dependencies 7 imports · 1 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_result.nx nx_unify.nx nx_resolution.nx nx_term_order.nx nx_demodulation.nx nx_demodulation_test.nx

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

imported by: nx_demodulation_test.nx

structs

33struct Equation

consts

38const NX_EQUATION_BYTES: nx_int = 16

functions

40func nx_eqn_make(lhs: *Term, rhs: *Term) -> *Equation
called by 1: nx_eqn_orient calls 1: sys_mmap
51func nx_eqn_orient(st: *KboState, lhs: *Term, rhs: *Term,
64func nx_demodulate_term(eqn: *Equation, t: *Term) -> *Term
100func nx_demodulate_clause(eqn: *Equation, c: *Clause, c_out: *Clause) -> nx_int
120func nx_demodulate_fixpoint(eqn: *Equation, t: *Term, max_steps: nx_int) -> *Term