Metatheory.jl
Metatheory.jl copied to clipboard
Support splatting `...` in egraphs pattern matching
Support splatting in left and right hand of rules in the e-graph e-matcher. Example:
t = @theory begin
f(args...) => foo(args[1:2]...) + bar(args[2:end]...)
end
This is already supported by the MatchCore backend.
Splatting in left hand of rules requires modifying the pattern matcher. Splatting in right hand of rules does in fact require supporting dynamic rewrites.