In the Python bindings we currently make a lot of top level let calls to try to add large expressions to the e-graph efficiently, as DAGs instead of trees. It might be nice to have an "official" way to do this for other end users. Some disadvantages of the current approach are that the let bindings show up in the extraction/visualization and also its slower than adding them in a rule since it rebuilds after each other.
If we changed expressions in Egglog AST to be DAGs (like termdags) then we could more efficiently do this directly, instead of making let bindings.
In the Python bindings we currently make a lot of top level let calls to try to add large expressions to the e-graph efficiently, as DAGs instead of trees. It might be nice to have an "official" way to do this for other end users. Some disadvantages of the current approach are that the let bindings show up in the extraction/visualization and also its slower than adding them in a rule since it rebuilds after each other.
If we changed expressions in Egglog AST to be DAGs (like termdags) then we could more efficiently do this directly, instead of making let bindings.