Simple maffs expression simplifier(simplificator?) using e-graphs.
In case you don't know what e-graphs are, checkout:
To use this puppy you need 2 things:
- file with rewrite rules(in a format
pattern => rewrite, for examplea + 0 => a), each rule has to be on a separate line. - you need only the file really.
Run go run ./cmd/main.go -rules ./your/path/to/rewrite.rules "the expression you want to simplify".
There's also a way to produce a resulting e-graph in SVG format, to do that,
pass -viz flag.
It's not quite correct. The nodes that have edges to other nodes in the same
cluster(grey box) actually point the the box itself, but graphviz doesn't allow
such edges.
So
is actually

