egraphs-good / egglog

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

Desugaring global variables #331

Closed oflatt closed 8 months ago

oflatt commented 10 months ago

In the past, we desugared global variables to instead use zero-argument functions as an encoding trick. However, it was ad-hoc and introduced shadowing between local variables and global functions. After getting rid of this, we changed the back-end to support global variables directly, but this was also messy.

Yihong and I propose a new pass that takes care of this problem my doing the old encoding trick in a more principled way.

Don't forget to omit these encoded functions from visualizations and extraction!

oflatt commented 8 months ago

fixed by #338