Skip to main content

Crate refrain_egraph

Crate refrain_egraph 

Source
Expand description

refrain-egraph: equality-saturation normalization for Refrain ASTs.

Uses the egg crate to define a RefrainLang term sort, applies a small set of Refrain-specific rewrite rules, runs the e-graph to fixpoint (bounded by a node limit and iteration cap), and extracts the lowest-cost representative under the AstSize cost model.

Structs§

Egraph

Enums§

RefrainLang
Term sort for Refrain ASTs inside egg’s e-graph.

Functions§

empty_egraph
Build a raw EGraph (without rules) for advanced use; the standard pipeline goes through Egraph::normalize.