egraphs-good / extraction-gym

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

Simple Examples #6

Closed philzook58 closed 8 months ago

philzook58 commented 1 year ago

3 simple examples where you can eyeball the optimal dag cost and can be scaled arbitrarily large.

  1. AC to extract perfectly balanced trees
  2. A list of binary choices where one choice has more sharing
  3. A loop extraction example where you need a constraint to block extracting a loop instead of a term
mwillsey commented 11 months ago

This looks great @philzook58! What is up with the funky names and costs in the nodes json though? Is the "newer" exporting code in egglog doing this or could it perhaps generate better names?