pub struct KnuthBendixCompletion {
pub trs: TermRewriteSystem,
pub pending: Vec<(Term, Term)>,
pub max_steps: usize,
}Expand description
A simple Knuth-Bendix completion procedure.
Given a set of equations, attempts to produce a confluent and terminating TRS.
Fields§
§trs: TermRewriteSystem§pending: Vec<(Term, Term)>Pending equations (lhs, rhs) to orient.
max_steps: usizeMaximum completion steps.
Implementations§
Source§impl KnuthBendixCompletion
impl KnuthBendixCompletion
Sourcepub fn new(
sig: Signature,
equations: Vec<(Term, Term)>,
max_steps: usize,
) -> Self
pub fn new( sig: Signature, equations: Vec<(Term, Term)>, max_steps: usize, ) -> Self
Create a new KB completion instance from initial equations.
Sourcepub fn run(&mut self) -> bool
pub fn run(&mut self) -> bool
Run the completion procedure. Returns true if completion succeeded (no unorientable equations remain).
Sourcepub fn result_rules(&self) -> &[RewriteRule]
pub fn result_rules(&self) -> &[RewriteRule]
Return the resulting confluent TRS rules.
Auto Trait Implementations§
impl Freeze for KnuthBendixCompletion
impl RefUnwindSafe for KnuthBendixCompletion
impl Send for KnuthBendixCompletion
impl Sync for KnuthBendixCompletion
impl Unpin for KnuthBendixCompletion
impl UnsafeUnpin for KnuthBendixCompletion
impl UnwindSafe for KnuthBendixCompletion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more