egraphs-good / egglog

egraphs + datalog!
https://egraphs-good.github.io/egglog/
MIT License
459 stars 54 forks source link

Fix `extract_variants` by comparing against leader `Value` #391

Open gussmith23 opened 4 months ago

gussmith23 commented 4 months ago

The missing call to find meant that this code wasn't always figuring out when two Values were in the same eclass.

gussmith23 commented 4 months ago

@oflatt thinks this may not be needed; he thinks that perhaps I'm doing something that's causing the egraph to not be rebuilt, which is causing this issue.

gussmith23 commented 4 months ago

Note that doing a manual rebuild before calling extract_variants without this PR doesn't work in my case.

oflatt commented 3 months ago

@gussmith23 Do you have a branch where we can reproduce this issue? It seems like a rebuilding bug we'd like to look into.