pub struct AlphaCache { /* private fields */ }Expand description
An alpha-equivalence cache for repeated comparisons.
Caches the result of alpha_equiv to avoid redundant traversals.
Implementations§
Source§impl AlphaCache
impl AlphaCache
Sourcepub fn query(&self, e1: &Expr, e2: &Expr) -> Option<bool>
pub fn query(&self, e1: &Expr, e2: &Expr) -> Option<bool>
Check the cache, returning cached result if available.
Sourcepub fn alpha_equiv_cached(&mut self, e1: &Expr, e2: &Expr) -> bool
pub fn alpha_equiv_cached(&mut self, e1: &Expr, e2: &Expr) -> bool
Check alpha equivalence, using and updating the cache.
Sourcepub fn num_non_equiv(&self) -> usize
pub fn num_non_equiv(&self) -> usize
Return the number of cached non-equivalences.
Trait Implementations§
Source§impl Clone for AlphaCache
impl Clone for AlphaCache
Source§impl Debug for AlphaCache
impl Debug for AlphaCache
Auto Trait Implementations§
impl !Send for AlphaCache
impl !Sync for AlphaCache
impl Forget for AlphaCache
impl Freeze for AlphaCache
impl Move for AlphaCache
impl RefUnwindSafe for AlphaCache
impl Unpin for AlphaCache
impl UnsafeUnpin for AlphaCache
impl UnwindSafe for AlphaCache
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