Metatheory.jl icon indicating copy to clipboard operation
Metatheory.jl copied to clipboard

Support splatting `...` in egraphs pattern matching

Open 0x0f0f0f opened this issue 3 years ago • 0 comments

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.

0x0f0f0f avatar Jan 29 '21 14:01 0x0f0f0f