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

Make the EGraph pattern matcher instantiate to ENodes instead of actual expressions with eclasses as children. #83

Closed
0x0f0f0f opened this issue Oct 26, 2021 · 1 comment

Comments

@0x0f0f0f
Copy link
Member

This issue gets in the way for #82 .
See

# FIXME instantiate function object as operation instead of symbol if present!!
function instantiate(g::EGraph, pat::PatTerm, sub::Sub, rule::AbstractRule)
eh = exprhead(pat)
op = operation(pat)
ar = arity(pat)
T = gettermtype(g, op, ar)
println(T)
children = map(x -> instantiate(g, x, sub, rule), arguments(pat))
similarterm(T, op, children; exprhead=eh)
end

@0x0f0f0f
Copy link
Member Author

0x0f0f0f commented Mar 7, 2023

Done in 2.0

@0x0f0f0f 0x0f0f0f closed this as completed Mar 7, 2023
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