#[repr(u8)]pub enum ENodeKind {
Plain0 = 0,
Plain1 = 1,
Plain2 = 2,
Plain3 = 3,
PlainN = 4,
SPair = 5,
Seq = 6,
MSet = 7,
Set = 8,
Lit = 9,
}Expand description
The ten node kinds. Stored in a routing table indexed by ENodeId.
Variants§
Plain0 = 0
Nullary (constant, no children).
Plain1 = 1
Unary (1 inline child).
Plain2 = 2
Binary (2 inline children).
Plain3 = 3
Ternary (3 inline children).
PlainN = 4
N-ary ordered (N > 3, children in pool).
SPair = 5
Commutative sorted pair (2 inline children).
Seq = 6
Associative flattened list (variadic, pool).
MSet = 7
Associative-commutative sorted multiset (variadic, pool). Multiset child
representation (G, mult); the AC algebra in Kapur’s AC-CC terms. Stores plain AC
(Clamp::None) AND nilpotent (Clamp::Nilpotent) ops — nilpotent keeps true
multiplicities here for the build/recanonize mod-n reduction (a Set dedup would
destroy them). The op’s Clamp (on OpKind) says which.
Set = 8
Associative-commutative-idempotent sorted set (variadic, pool). Set child
representation (bare G, {0,1} counts). Idempotent ops only (Clamp::Idempotent):
dedup is the sound build/recanonize canonize rule for them. Nilpotent ops do NOT
live here (see MSet).
Lit = 9
Literal leaf (no children, has value).
Trait Implementations§
impl Copy for ENodeKind
impl Eq for ENodeKind
impl StructuralPartialEq for ENodeKind
Auto Trait Implementations§
impl Freeze for ENodeKind
impl RefUnwindSafe for ENodeKind
impl Send for ENodeKind
impl Sync for ENodeKind
impl Unpin for ENodeKind
impl UnsafeUnpin for ENodeKind
impl UnwindSafe for ENodeKind
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.