pub struct AppliedId {
pub id: Id,
pub m: SlotMap,
}Expand description
AppliedIds are invocations of e-classes.
Recall that in slotted egraphs, e-classes have arguments - and in order to talk about the set of terms in an e-class, you always need to invocate your e-class using a bunch of arguments. This “invocation” is what an AppliedId represents. The Id part identifies an e-class, and the SlotMap is used to map the argument-slots of the e-class to the values that you put into them.
Fields§
§id: Id§m: SlotMapImplementations§
Source§impl AppliedId
impl AppliedId
pub fn new(id: Id, m: SlotMap) -> Self
pub fn apply_slotmap(&self, m: &SlotMap) -> AppliedId
pub fn apply_slotmap_partial(&self, m: &SlotMap) -> AppliedId
pub fn apply_slotmap_fresh(&self, m: &SlotMap) -> AppliedId
pub fn slots(&self) -> SmallHashSet<Slot>
pub fn slots_mut(&mut self) -> Vec<&mut Slot>
pub fn null() -> Self
Trait Implementations§
Source§impl LanguageChildren for AppliedId
impl LanguageChildren for AppliedId
fn all_slot_occurrences_iter_mut(&mut self) -> impl Iterator<Item = &mut Slot>
fn public_slot_occurrences_iter_mut( &mut self, ) -> impl Iterator<Item = &mut Slot>
fn applied_id_occurrences_iter_mut( &mut self, ) -> impl Iterator<Item = &mut AppliedId>
fn all_slot_occurrences_iter(&self) -> impl Iterator<Item = &Slot>
fn public_slot_occurrences_iter(&self) -> impl Iterator<Item = &Slot>
fn applied_id_occurrences_iter(&self) -> impl Iterator<Item = &AppliedId>
fn to_syntax(&self) -> Vec<SyntaxElem>
fn from_syntax(elems: &[SyntaxElem]) -> Option<Self>
fn weak_shape_impl(&mut self, m: &mut (SlotMap, u32))
Source§impl Ord for AppliedId
impl Ord for AppliedId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for AppliedId
impl PartialOrd for AppliedId
impl Eq for AppliedId
impl StructuralPartialEq for AppliedId
Auto Trait Implementations§
impl Freeze for AppliedId
impl RefUnwindSafe for AppliedId
impl Send for AppliedId
impl Sync for AppliedId
impl Unpin for AppliedId
impl UnsafeUnpin for AppliedId
impl UnwindSafe for AppliedId
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