pub struct VariantIndex<'a, Cfg: EGraphConfig> {
pub full: &'a IndexStore<Cfg>,
pub delta: &'a IndexStore<Cfg>,
pub delta_atom: Option<usize>,
}Expand description
The context one semi-naive variant needs: the full and delta indices,
and which atom (by stable atom_id) is the delta-restricted one.
Not a new abstraction — just the bundle the matcher needs in place of a
bare &IndexStore. A delta_atom of None is the naive view: every
atom reads full (and delta is never consulted).
Fields§
§full: &'a IndexStore<Cfg>§delta: &'a IndexStore<Cfg>§delta_atom: Option<usize>Implementations§
Source§impl<'a, Cfg: EGraphConfig> VariantIndex<'a, Cfg>
impl<'a, Cfg: EGraphConfig> VariantIndex<'a, Cfg>
Sourcepub fn naive(full: &'a IndexStore<Cfg>) -> Self
pub fn naive(full: &'a IndexStore<Cfg>) -> Self
Naive view: every atom reads full. delta is aliased to full and
never read (mode is always Full).
Sourcepub fn variant(
full: &'a IndexStore<Cfg>,
delta: &'a IndexStore<Cfg>,
delta_atom: usize,
) -> Self
pub fn variant( full: &'a IndexStore<Cfg>, delta: &'a IndexStore<Cfg>, delta_atom: usize, ) -> Self
Variant i: atom i reads delta, atoms < i read full∖delta, atoms
> i read full.
Trait Implementations§
Source§impl<Cfg: EGraphConfig> Clone for VariantIndex<'_, Cfg>
impl<Cfg: EGraphConfig> Clone for VariantIndex<'_, Cfg>
impl<Cfg: EGraphConfig> Copy for VariantIndex<'_, Cfg>
Auto Trait Implementations§
impl<'a, Cfg> Freeze for VariantIndex<'a, Cfg>where
&'a IndexStore<Cfg>: Freeze,
impl<'a, Cfg> RefUnwindSafe for VariantIndex<'a, Cfg>where
&'a IndexStore<Cfg>: RefUnwindSafe,
impl<'a, Cfg> Send for VariantIndex<'a, Cfg>where
&'a IndexStore<Cfg>: Send,
impl<'a, Cfg> Sync for VariantIndex<'a, Cfg>where
&'a IndexStore<Cfg>: Sync,
impl<'a, Cfg> Unpin for VariantIndex<'a, Cfg>where
&'a IndexStore<Cfg>: Unpin,
impl<'a, Cfg> UnsafeUnpin for VariantIndex<'a, Cfg>where
&'a IndexStore<Cfg>: UnsafeUnpin,
impl<'a, Cfg> UnwindSafe for VariantIndex<'a, Cfg>where
&'a IndexStore<Cfg>: UnwindSafe,
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