Skip to main content

Step

Enum Step 

Source
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

§target: VarId
§lookups: Vec<IndexLookup<O, I>>
§atom_id: usize

Stable atom index in the compile-time numbering. Bridges the fixed atom order (which defines semi-naive variants) to the dynamic execution order chosen by the scheduler. Not used by the naive matcher; consumed by semi-naive variant dispatch.

§

ExtractChild

Fields

§target: VarId
§parent: VarId
§pos: I

Child 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

Fields

§parent: VarId
§pos: I
§expected: PatVar
§

CheckEq

Fields

§

CheckEqGlobal

Fields

§local: VarId
§

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.

Fields

§target: VarId
§

CopyBinding

Fields

§target: VarId
§other: VarId
§

ExpandA

Fields

§node: VarId
§children: Vec<PatVar>
§

DecomposeAC

Fields

§node: VarId
§elems: Vec<(PatVar, RMult)>
§idempotent: bool
§

DecomposeACI

Fields

§node: VarId
§elems: Vec<PatVar>
§

ExtractLitVal

Fields

§node: VarId
§

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.

Fields

§node: VarId
§value: V
§

CheckPred

Keep the match only if the guard evaluates to a true boolean over the literal values bound so far.

Fields

§guard: PredGuard<O, V>

Trait Implementations§

Source§

impl<O: Clone, I: Clone, V: Clone> Clone for Step<O, I, V>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<O: Debug, I: Debug, V: Debug> Debug for Step<O, I, V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<O: Eq, I: Eq, V: Eq> Eq for Step<O, I, V>

Source§

impl<O: PartialEq, I: PartialEq, V: PartialEq> PartialEq for Step<O, I, V>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

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>
where Vec<IndexLookup<O, I>>: Freeze, I: Freeze, V: Freeze, PredGuard<O, V>: Freeze,

§

impl<O, I, V> RefUnwindSafe for Step<O, I, V>

§

impl<O, I, V> Send for Step<O, I, V>
where Vec<IndexLookup<O, I>>: Send, I: Send, V: Send, PredGuard<O, V>: Send,

§

impl<O, I, V> Sync for Step<O, I, V>
where Vec<IndexLookup<O, I>>: Sync, I: Sync, V: Sync, PredGuard<O, V>: Sync,

§

impl<O, I, V> Unpin for Step<O, I, V>
where Vec<IndexLookup<O, I>>: Unpin, I: Unpin, V: Unpin, PredGuard<O, V>: Unpin,

§

impl<O, I, V> UnsafeUnpin for Step<O, I, V>

§

impl<O, I, V> UnwindSafe for Step<O, I, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.