egraphs-good / extraction-gym

benchmarking e-graph extraction
MIT License
31 stars 16 forks source link

Pipeline for getting an `egraph_serialized` from the `extraction-gym` #38

Open ninehusky opened 3 months ago

ninehusky commented 3 months ago

Once something's been extracted from the egraph, there's not an easy way to get the term back into something like an egg::RecExpr or an egglog::Term.

ninehusky commented 3 months ago

I'm thinking a first pass at a solution might be to loop through [result.choices](https://github.com/egraphs-good/extraction-gym/blob/main/src/main.rs#L150) to manually build up an AST. Happy to get feedback!