Expand description
Slotted e-graphs are a datastructure for representing congruence relations over terms with variables and binders.
For a higher level introduction to slotted e-graphs, consider
For an example implementation of a Language with binders in slotted e-graphs, consider the RISE implementation in here.
Macros§
- bare_
language_ child - Implements LanguageChildren for payload types that are independent of Slots. For example u32, String etc.
- define_
language - rw
Structs§
- Applied
Id - AppliedIds are invocations of e-classes.
- AstSize
- The ‘default’ CostFunction. It measures the size of the abstract syntax tree of the corresponding term.
- Bind
- Congruence
Proof - EGraph
- A datastructure to efficiently represent congruence relations on terms with binders.
- Equation
- Explicit
Proof - Extraction
Subst - A SubstMethod that extracts the smallest term (measured by AstSize) of an e-class to do substitution on it.
- Extractor
- An object used for quickly extracting terms (i.e. RecExprs) using a given CostFunction.
- Id
- Ids identify e-classes.
- Iteration
- Progress
Measure - A Progress Measure to check saturation of an e-graph with.
- Proven
EqRaw - RecExpr
- A “term” or “expression” from some given Language L.
- Reflexivity
Proof - Report
- Rewrite
- An equational rewrite rule.
- RewriteT
- Use this type when you want to build your own Rewrite.
- Runner
- Runner
Limits - Slot
- Slots represent Variable names.
- SlotMap
- A mapping between the parameter-slots of an e-class, and some “invocation” slots that you want to put into them.
- Symbol
- A interned string in the global symbol table.
- Symmetry
Proof - SynExpr
Subst - A SubstMethod that uses the EGraph::get_syn_expr of an e-class to do substitution on it.
- Transitivity
Proof
Enums§
- Pattern
- A Pattern to match against, or as the rhs of a rewrite rule.
- Proof
- Stop
Reason - Syntax
Elem
Traits§
- Abstract
VecMap - An abstract vec map
- Abstract
VecSet - An abstract vec set
- Analysis
- E-Graph Analysis allows you to propagate information upwards through the E-Graph.
- Cond
- Cost
Function - A cost function to guide extraction.
- Iteration
Data - Language
- A trait to define your Language (i.e. your E-Node type).
- Language
Children - Subst
Method - Specifies a certain implementation of how substitution
b[x := t]is implemented internally.
Functions§
- and
- any_
to_ t - apply_
rewrites - Applies each given rewrite rule to the E-Graph once. Returns an indicator for whether the e-graph changed as a result.
- ast_
size_ extract - ematch_
all - extract
- lookup_
rec_ expr - not
- or
- pattern_
subst - pattern_
to_ re - re_
to_ pattern - run_
eqsat - slot_
free_ in
Type Aliases§
- Proven
Eq - Runner
Result - Type alias for the result of a
Runner. - Small
Hash Map - Small
Hash Set - Subst