nx_demodulation.nx
buildroot/runtime/nx_demodulation.nx
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
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_result.nxnx_unify.nxnx_resolution.nxnx_term_order.nx
imported by: nx_demodulation_test.nx
structs
| 33 | struct Equation |
consts
| 38 | const NX_EQUATION_BYTES: nx_int = 16 |
functions
| 40 | func nx_eqn_make(lhs: *Term, rhs: *Term) -> *Equation |
| 51 | func nx_eqn_orient(st: *KboState, lhs: *Term, rhs: *Term, |
| 64 | func nx_demodulate_term(eqn: *Equation, t: *Term) -> *Term |
| 100 | func nx_demodulate_clause(eqn: *Equation, c: *Clause, c_out: *Clause) -> nx_int |
| 120 | func nx_demodulate_fixpoint(eqn: *Equation, t: *Term, max_steps: nx_int) -> *Term calls 1: nx_demodulate_term |