pub enum Step<O, I, V> {
Show 13 variants
Join {
target: VarId,
lookups: Vec<IndexLookup<O, I>>,
atom_id: usize,
},
ExtractChild {
target: VarId,
parent: VarId,
pos: I,
},
CheckChildEq {
parent: VarId,
pos: I,
expected: PatVar,
},
CheckEq {
a: VarId,
b: VarId,
},
CheckEqGlobal {
local: VarId,
global: GlobalVarId,
},
BindGlobal {
target: VarId,
global: GlobalVarId,
},
CopyBinding {
target: VarId,
other: VarId,
},
ExpandA {
node: VarId,
children: Vec<PatVar>,
pre: Option<SeqVarId>,
suf: Option<SeqVarId>,
},
DecomposeAC {
node: VarId,
elems: Vec<(PatVar, RMult)>,
rest: Option<MsetVarId>,
idempotent: bool,
},
DecomposeACI {
node: VarId,
elems: Vec<PatVar>,
rest: Option<SetVarId>,
},
ExtractLitVal {
node: VarId,
val: LitValVarId,
},
CheckLit {
node: VarId,
value: V,
},
CheckPred {
guard: PredGuard<O, V>,
},
}Variants§
Join
Fields
lookups: Vec<IndexLookup<O, I>>ExtractChild
Fields
pos: IChild position, I-wide for the same reason as
IndexLookup::ByChildPos: it is read back through
EGraph::child_at, which offsets into the node’s span in the child pool.
CheckChildEq
CheckEq
CheckEqGlobal
BindGlobal
Bind an as-yet unbound variable to a global’s class. The dual of
CheckEqGlobal: an (= x g) atom CHECKS when x already has a value
and BINDS when it does not. Without this a rule whose only atom is such
an equality compiles to a plan that binds nothing, and materializing a
match then reads an unset variable.
CopyBinding
ExpandA
DecomposeAC
DecomposeACI
ExtractLitVal
CheckLit
Keep the match only if node’s literal payload equals value. The constant
counterpart of Step::ExtractLitVal: that one binds the payload to a pattern
variable, this one pins it to a literal written in the pattern.
CheckPred
Keep the match only if the guard evaluates to a true boolean over the literal values bound so far.
Trait Implementations§
impl<O: Eq, I: Eq, V: Eq> Eq for Step<O, I, V>
impl<O: PartialEq, I: PartialEq, V: PartialEq> StructuralPartialEq for Step<O, I, V>
Auto Trait Implementations§
impl<O, I, V> Freeze for Step<O, I, V>
impl<O, I, V> RefUnwindSafe for Step<O, I, V>where
Vec<IndexLookup<O, I>>: RefUnwindSafe,
I: RefUnwindSafe,
V: RefUnwindSafe,
PredGuard<O, V>: RefUnwindSafe,
impl<O, I, V> Send for Step<O, I, V>
impl<O, I, V> Sync for Step<O, I, V>
impl<O, I, V> Unpin for Step<O, I, V>
impl<O, I, V> UnsafeUnpin for Step<O, I, V>where
Vec<IndexLookup<O, I>>: UnsafeUnpin,
I: UnsafeUnpin,
V: UnsafeUnpin,
PredGuard<O, V>: UnsafeUnpin,
impl<O, I, V> UnwindSafe for Step<O, I, V>where
Vec<IndexLookup<O, I>>: UnwindSafe,
I: UnwindSafe,
V: UnwindSafe,
PredGuard<O, V>: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.