Skip to main content

Module node_types

Module node_types 

Source
Expand description

Generic node types for the e-graph node stores.

Three structs cover all ten node kinds:

  • FixedArityNode<G, O, K> — Plain0/1/2/3 and Commutative
  • VariableArityNode<G, O> — PlainN, A, AC, ACI
  • LitNode<G, O, V> — literal leaves

global_id and op are stored as Repr types so the tag bits can be manipulated directly via Tagged without unsafe casts. global_id MSB = VecI capture tag, op MSB = has_history flag. flags is a per-node u8 bitfield for control bits (subsumption, etc).

Structs§

FixedArityNode
LitNode
VariableArityNode
A node whose children live in a shared side pool, addressed by a [start, end) span.

Constants§

FLAG_AC_COLLAPSED
FLAG_CONSTRUCTOR
FLAG_SUBSUMED
Per-node control flags stored in the flags field.