egraphs-good / eggcc

MIT License
42 stars 8 forks source link

Remove list of helpers from extraction #521

Closed oflatt closed 4 months ago

oflatt commented 4 months ago

If we change the schema, it'll be fine because we'll get an error that something wasn't extractable. I also optimized the extraction algorithm to not consider parents that have infinite cost

yihozhang commented 4 months ago

This feels like the same logic as the very first version (namely non-existence means 0/infinity). If the user adds a new operator (say fma) without an explicit cost, it's still possible to extract an alternative program that doesn't use fma and fail silently.

oflatt commented 4 months ago

I've strengthened our tests to catch this case. When someone adds a new operator (and a test for that operator), we'll fail to extract it because the program will have infinite cost.