pub struct FlatCC { /* private fields */ }Expand description
Flat union-find for congruence closure on term indices.
This is a simpler, more cache-friendly representation than
the HashMap-based approach above.
Implementations§
Source§impl FlatCC
impl FlatCC
Sourcepub fn find(&mut self, i: TermIdx) -> TermIdx
pub fn find(&mut self, i: TermIdx) -> TermIdx
Find the root of the equivalence class containing i.
Sourcepub fn are_equal(&mut self, i: TermIdx, j: TermIdx) -> bool
pub fn are_equal(&mut self, i: TermIdx, j: TermIdx) -> bool
Check if i and j are in the same class.
Sourcepub fn propagate_congruences(&mut self)
pub fn propagate_congruences(&mut self)
Propagate congruences: if fn(i) == fn(j) and arg(i) == arg(j), then result(i) == result(j).
Merges the result classes of congruent applications so that downstream
are_equal queries reflect these equalities.
Auto Trait Implementations§
impl Freeze for FlatCC
impl RefUnwindSafe for FlatCC
impl Send for FlatCC
impl Sync for FlatCC
impl Unpin for FlatCC
impl UnsafeUnpin for FlatCC
impl UnwindSafe for FlatCC
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