Author willow-ahrens
4 Stars
Updated Last
1 Year Ago
Started In
January 2022


Build Status Coverage

RewriteTools.jl is a utility for term rewriting. RewriteTools.jl is a fork of SymbolicUtils.jl version 1.17, preserving and simplifying only the functionality related to term rewriting. The semantics of rewriter objects is different, and new ``expanders'' have been added which enable program enumeration. RewriteTools.jl is intended for use with custom ASTs that have syntax which implements SyntaxInterface.jl.


Functions are documented with docstrings; we give a few examples here.

julia> using RewriteTools

julia> r = @slots a b c @rule (a * b) + (a * c) => term(*, a, term(+, b, c))

julia> r(term(+, term(*, 1, 2), term(*, 1, 3)))
1 * (2 + 3)

Used By Packages