Metatheory.jl: Fast and Elegant Algebraic Computation in Julia with Extensible Equality Saturation

Alessandro Cheli
2/15/2021
13 citations
cs.PLcs.SC

Official code: JuliaSymbolics/Metatheory.jl (409 stars, Julia, MIT, last commit 2026-03-09).

Abstract

We introduce Metatheory.jl: a lightweight and performant general purpose symbolics and metaprogramming framework meant to simplify the act of writing complex Julia metaprograms and to significantly enhance Julia with a native term rewriting system, based on state-of-the-art equality saturation techniques, and a dynamic first class Abstract Syntax Tree (AST) pattern matching system that is dynamically composable in an algebraic fashion, taking full advantage of the language's powerful reflection capabilities. Our contribution allows to perform general purpose symbolic mathematics, manipulation, optimization, synthesis or analysis of syntactically valid Julia expressions with a clean and concise programming interface, both during compilation or execution of programs.

View on arXivView PDF

Code Implementations(1)

MIT

Makes Julia reason with equations. General purpose metaprogramming, symbolic computation and algebraic equational reasoning library for the Julia programming language: E-Graphs & equality saturation, term rewriting and more.

40952Julia, TeXJan 12, 20218 months agoMIT
compiler-constructioncompiler-optimizationegraphsequality-saturationjulia+6 more

Similar Papers

Cite this paper

@article{cheli2021metatheoryjl,
  title  = {Metatheory.jl: Fast and Elegant Algebraic Computation in Julia with Extensible Equality Saturation},
  author = {Alessandro Cheli},
  year   = {2021},
  eprint = {2102.07888},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.07888}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.07888.svg)](https://codeofpaper.com/paper/2102.07888)

Discussion