pub struct BetaReducer { /* private fields */ }Expand description
A β-reducer with configurable strategy and step budget.
Implementations§
Source§impl BetaReducer
impl BetaReducer
Sourcepub fn new(strategy: Strategy, max_steps: usize) -> Self
pub fn new(strategy: Strategy, max_steps: usize) -> Self
Create a new reducer with the given strategy and step limit.
Sourcepub fn reduce(&self, term: &Term) -> (Term, usize, bool)
pub fn reduce(&self, term: &Term) -> (Term, usize, bool)
Reduce the term to normal form under the configured strategy.
Returns (result, steps_taken, converged).
Sourcepub fn is_normal_form(&self, term: &Term) -> bool
pub fn is_normal_form(&self, term: &Term) -> bool
Check if a term is already in normal form under this strategy.
Sourcepub fn count_steps(&self, term: &Term) -> Option<usize>
pub fn count_steps(&self, term: &Term) -> Option<usize>
Count reduction steps without storing intermediate terms.
Auto Trait Implementations§
impl Freeze for BetaReducer
impl RefUnwindSafe for BetaReducer
impl Send for BetaReducer
impl Sync for BetaReducer
impl Unpin for BetaReducer
impl UnsafeUnpin for BetaReducer
impl UnwindSafe for BetaReducer
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