Metatheory.jl
Metatheory.jl copied to clipboard
Hack in metadata for MT3
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 :)
Can you please move MetadataAnalysis to src/?
Can you make the types stricter via a type parameter?
Can you please move
MetadataAnalysistosrc/? Can you make the types stricter via a type parameter?
I will once I get back from holidays next Tuesday! I'll also check what's going on with the failing tests then.
Can you please move MetadataAnalysis to src/?
IIUC, this would force users to commit type piracy by defining their custom EGraphs.join on arguments of type Metatheory.MetadataAnalysis?
Can you please move MetadataAnalysis to src/?
IIUC, this would force users to commit type piracy by defining their custom
EGraphs.joinon arguments of typeMetatheory.MetadataAnalysis?
I think MetadataAnalysis should have a type parameter T. Not sure if it can be considered type piracy. I'll have to think about this