Max Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt, Zachary Tatlock, Pavel Panchekha
key invariant to maintain: the equivalence relation is closed under congruence. (a = b implies f(a) = f(b))
find all patterns
initial term
e-graph
apply all matches
restore all invariants
optimized term
Overall, congruence is 88x faster, and equality saturation is 21x faster
By Xingyu Xie