pub struct NarrowingSystem {
pub trs: Trs,
pub var_counter: u32,
}Expand description
A narrowing system: computes all possible narrowing steps of a term w.r.t. a TRS.
Narrowing generalises rewriting to terms with variables: a term t narrows
to t' if there is a substitution σ and a rule l → r such that
t[σ]_p = l[σ] for some non-variable position p, and t' = t[r]_p[σ].
Fields§
§trs: TrsThe underlying TRS used for narrowing steps.
var_counter: u32Variable counter for generating fresh variable names.
Implementations§
Source§impl NarrowingSystem
impl NarrowingSystem
Sourcepub fn narrow_step(&mut self, t: &Term) -> Vec<(Substitution, Term)>
pub fn narrow_step(&mut self, t: &Term) -> Vec<(Substitution, Term)>
Compute one level of narrowing steps from term t.
Returns a list of (substitution, narrowed_term) pairs.
Sourcepub fn basic_narrow(
&mut self,
t: &Term,
depth: usize,
) -> Vec<(Substitution, Term)>
pub fn basic_narrow( &mut self, t: &Term, depth: usize, ) -> Vec<(Substitution, Term)>
Basic narrowing: perform up to depth levels of narrowing from t.
Returns all reachable (substitution, term) pairs.
Sourcepub fn narrowing_unify(
&mut self,
s: &Term,
t: &Term,
depth: usize,
) -> Option<Substitution>
pub fn narrowing_unify( &mut self, s: &Term, t: &Term, depth: usize, ) -> Option<Substitution>
Unification via narrowing: tries to unify s and t by narrowing s toward t.
Trait Implementations§
Source§impl Clone for NarrowingSystem
impl Clone for NarrowingSystem
Source§fn clone(&self) -> NarrowingSystem
fn clone(&self) -> NarrowingSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NarrowingSystem
impl RefUnwindSafe for NarrowingSystem
impl Send for NarrowingSystem
impl Sync for NarrowingSystem
impl Unpin for NarrowingSystem
impl UnsafeUnpin for NarrowingSystem
impl UnwindSafe for NarrowingSystem
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