egraphs-good / egglog

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

Serialized Class ID <-> Value #396

Closed saulshanabrook closed 3 months ago

saulshanabrook commented 4 months ago

This PR fixes #392 to add a public API for going from serialized Class IDs to Values.

It does this by changing the serialized class IDs to be more uniform. It should preserve all behavior.

cc @gussmith23

gussmith23 commented 4 months ago

You're a lifesaver!!

Just to be clear: there's a lot of things I have to do over a serialized egraph, because I can't inspect the egglog::EGraph enough to do what I need. I realize that egglog is different from egg, and that this is one of the results. I'm just trying to say that my use of the serialized egraph is mostly just a hack around the core problem of not being able to inspect the egglog::EGraph. Either way, Saul's PR helps my hack be less hacky :)

saulshanabrook commented 4 months ago

I think having the serialized e-graph as a public API maybe isn't the worst, it at least makes it easy to change the internals of egglog without disrupting the API at all.