Hello,
Is it possible to make a rewrite rule that uses metadata?
For example, when I interface the struct
struct ExprWithContext
head::Any
args::Vector{Any}
context::Int
end
with MT, can I somehow make a rewrite rule that for example does id(x) --> <context value> with as starting term for example ExprWithContext(:id, [:x], 5). I does not need to be this syntax or this example, but a way to use metadata in rewrite rules would be amazing.
Somewhat related, I also saw in the ale/3.0 lambda_theory.jl tutorial on line 177 that you can make rewrite rules that utilize EGraph Analysis information. I was wondering how exactly this works. Specifically, I was wondering where the _egraph variable comes from.
Hello,
Is it possible to make a rewrite rule that uses metadata?
For example, when I interface the struct
with MT, can I somehow make a rewrite rule that for example does
id(x) --> <context value>with as starting term for example ExprWithContext(:id, [:x], 5). I does not need to be this syntax or this example, but a way to use metadata in rewrite rules would be amazing.Somewhat related, I also saw in the ale/3.0 lambda_theory.jl tutorial on line 177 that you can make rewrite rules that utilize EGraph Analysis information. I was wondering how exactly this works. Specifically, I was wondering where the _egraph variable comes from.