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

EGraph pattern matcher when instantiating substitutions only instantiates symbols as term operations #82

Closed
0x0f0f0f opened this issue Oct 26, 2021 · 0 comments

Comments

@0x0f0f0f
Copy link
Member

EGraph pattern matcher when instantiating substitutions only instantiates symbols as term operations even if the original e-node that is being rewritten has a function object as its operation. This problem gets in the way for the SymbolicUtils.jl integration.
Here's an example (just figurative. not working, needs some expression preprocessing tweaks)

using SymbolicUtils
using Metatheory

@syms a b 
ex = a + b
t = [@rule x y x + y => x * y]
g = EGraph(ex)
saturate!(g, t) # FAILS because it's creating Term{...}(:*, eclass_of_x, eclass_of_y) instead of using the actual (*) function object
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

No branches or pull requests

1 participant