Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hack in metadata for MT3 #242

Draft
wants to merge 3 commits into
base: ale/3.0
Choose a base branch
from
Draft

Conversation

jumerckx
Copy link

@jumerckx jumerckx commented Sep 6, 2024

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 :)

@0x0f0f0f
Copy link
Member

Can you please move MetadataAnalysis to src/?
Can you make the types stricter via a type parameter?

@jumerckx
Copy link
Author

Can you please move MetadataAnalysis to src/?
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.

@jumerckx
Copy link
Author

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?

@0x0f0f0f
Copy link
Member

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?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants