egraphs-good / egraph-serialize

egraph <-> json
MIT License
8 stars 3 forks source link

Add sorts/types/names to classes #1

Closed saulshanabrook closed 11 months ago

saulshanabrook commented 11 months ago

This adds a mapping of e-class id to class type to the format.

One use case for this was in the visualizer in egglog (https://github.com/egraphs-good/egglog/pull/147) to display the sort on each e-class.

Zulip link for conversation discussing this with @mwillsey

mwillsey commented 11 months ago

I pushed some changes, making class_data a map from classes to objects... thoughts?

saulshanabrook commented 11 months ago

@mwillsey That looks good to me, more extensible if we want to add more data later on. Thx!