egraphs-good / egglog

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

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

Open gussmith23 opened 1 month ago

gussmith23 commented 1 month 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 1 month 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 1 month ago

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

oflatt commented 2 weeks 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.