Metatheory.jl icon indicating copy to clipboard operation
Metatheory.jl copied to clipboard

Hack in metadata for MT3

Open jumerckx opened this issue 5 months ago • 4 comments

Hello! I needed metadata and didn't want to be stuck with MT2 so I tried adding metadata support in MT3.

I changed EGraphs.make to optionally take an expression's metadata as extra information. When extracting, the metadata is extracted from the analysisdata using TermInterface.metadata(::Analysis). (see the customtypes.jl tutorial.)

These changes are minimal and were made without much regard for performance so I'm assuming the final implementation will be different. Still I hope this can serve as a base, or at least provide some inspiration :)

jumerckx avatar Sep 06 '24 14:09 jumerckx