All Projects → JuliaSymbolics → Metatheory.jl

JuliaSymbolics / Metatheory.jl

Licence: MIT license
General purpose algebraic metaprogramming and symbolic computation library for the Julia programming language: E-Graphs & equality saturation, term rewriting and more.

Programming Languages

julia
2034 projects
TeX
3793 projects
rust
11053 projects

Projects that are alternatives of or similar to Metatheory.jl

HashedExpression
Type-safe modelling DSL, symbolic transformation, and code generation for solving optimization problems.
Stars: ✭ 40 (-84.96%)
Mutual labels:  symbolic, symbolic-computation
awesome-internals
A curated list of awesome resources and learning materials in the field of X internals
Stars: ✭ 78 (-70.68%)
Mutual labels:  compiler-optimization, compiler-construction
ego
EGraphs in OCaml
Stars: ✭ 45 (-83.08%)
Mutual labels:  equality-saturation, egraphs
SymbolicTensors.jl
Manipulate tensors symbolically in Julia! Currently needs a SymPy dependency, but work is ongoing to change the backend to SymbolicUtils.jl
Stars: ✭ 26 (-90.23%)
Mutual labels:  symbolic-manipulation, symbolic-computation
Symbolic-computation-Python
Symbolic computation using SymPy and various applications
Stars: ✭ 18 (-93.23%)
Mutual labels:  symbolic, symbolic-computation
CaptCC
A tiny C compiler written purely in JavaScript.
Stars: ✭ 175 (-34.21%)
Mutual labels:  compiler-optimization, compiler-construction
2p-kt
A Kotlin Multi-Platform ecosystem for symbolic AI
Stars: ✭ 52 (-80.45%)
Mutual labels:  symbolic
pyodesys
∫ Straightforward numerical integration of systems of ordinary differential equations
Stars: ✭ 85 (-68.05%)
Mutual labels:  symbolic-manipulation
Abacus
Advanced Combinatorics and Algebraic Number Theory Symbolic Computation library for JavaScript, Python
Stars: ✭ 16 (-93.98%)
Mutual labels:  symbolic-computation
SMCDEL
A symbolic model checker for Dynamic Epistemic Logic.
Stars: ✭ 31 (-88.35%)
Mutual labels:  symbolic
aeppl
Tools for an Aesara-based PPL.
Stars: ✭ 46 (-82.71%)
Mutual labels:  symbolic-computation
kanren
An extensible, lightweight relational/logic programming DSL written in pure Python
Stars: ✭ 111 (-58.27%)
Mutual labels:  symbolic-computation
Decaf-Compiler
Compiler for Decaf Programming Language
Stars: ✭ 36 (-86.47%)
Mutual labels:  compiler-construction
crusher
No description or website provided.
Stars: ✭ 21 (-92.11%)
Mutual labels:  symbolic
CSCD70
CSCD70 Compiler Optimization
Stars: ✭ 147 (-44.74%)
Mutual labels:  compiler-optimization
omega
Specify and synthesize systems using symbolic algorithms
Stars: ✭ 36 (-86.47%)
Mutual labels:  symbolic
QuantumLattices.jl
Julia package for the construction of quantum lattice systems.
Stars: ✭ 79 (-70.3%)
Mutual labels:  symbolic-computation
Kelvin
A powerful language for symbolic computation written in Swift.
Stars: ✭ 23 (-91.35%)
Mutual labels:  symbolic-computation
jet
A Fast C and Python like Programming Language that puts the Developer first. WIP
Stars: ✭ 41 (-84.59%)
Mutual labels:  compiler-optimization
safe-control-gym
PyBullet CartPole and Quadrotor environments—with CasADi symbolic a priori dynamics—for learning-based control and RL
Stars: ✭ 272 (+2.26%)
Mutual labels:  symbolic

Metatheory.jl

Docs Docs CI codecov arXiv status Zulip

Metatheory.jl is a general purpose term rewriting, metaprogramming and algebraic computation library for the Julia programming language, designed to take advantage of the powerful reflection capabilities to bridge the gap between symbolic mathematics, abstract interpretation, equational reasoning, optimization, composable compiler transforms, and advanced homoiconic pattern matching features. The core features of Metatheory.jl are a powerful rewrite rule definition language, a vast library of functional combinators for classical term rewriting and an e-graph rewriting, a fresh approach to term rewriting achieved through an equality saturation algorithm. Metatheory.jl can manipulate any kind of Julia symbolic expression type, as long as it satisfies the TermInterface.jl.

Metatheory.jl provides:

  • An eDSL (domain specific language) to define different kinds of symbolic rewrite rules.
  • A classical rewriting backend, derived from the SymbolicUtils.jl pattern matcher, supporting associative-commutative rules. It is based on the pattern matcher in the SICM book.
  • A flexible library of rewriter combinators.
  • An e-graph rewriting (equality saturation) backend and pattern matcher, based on the egg library, supporting backtracking and non-deterministic term rewriting by using a data structure called e-graph, efficiently incorporating the notion of equivalence in order to reduce the amount of user effort required to achieve optimization tasks and equational reasoning.
  • @capture macro for flexible metaprogramming.

Intuitively, Metatheory.jl transforms Julia expressions in other Julia expressions and can achieve such at both compile and run time. This allows Metatheory.jl users to perform customized and composable compiler optimizations specifically tailored to single, arbitrary Julia packages. Our library provides a simple, algebraically composable interface to help scientists in implementing and reasoning about semantics and all kinds of formal systems, by defining concise rewriting rules in pure, syntactically valid Julia on a high level of abstraction. Our implementation of equality saturation on e-graphs is based on the excellent, state-of-the-art technique implemented in the egg library, reimplemented in pure Julia.

1.0 is out!

The first stable version of Metatheory.jl is out! The goal of this release is to unify the symbolic manipulation ecosystem of Julia packages. Many features have been ported from SymbolicUtils.jl. Now, Metatheory.jl can be used in place of SymbolicUtils.jl when you have no need of manipulating mathematical expressions. SymbolicUtils.jl can now completely leverage on the generic stack of rewriting features provided by Metatheory.jl, highly decoupled from the symbolic term representation thanks to TermInterface.jl. Read more in NEWS.md.

The introduction of TermInterface.jl has allowed for large potential in generalization of term rewriting and symbolic analysis and manipulation features. It’s been a few months we’ve been talking about the integration between Metatheory.jl with Symbolics.jl, as it has been shown in the "High-performance symbolic-numerics via multiple dispatch" paper.

Recommended Readings - Selected Publications

Contributing

If you'd like to give us a hand and contribute to this repository you can:

Installation

You can install the stable version:

julia> using Pkg; Pkg.add("Metatheory")

Or you can install the developer version (recommended by now for latest bugfixes)

julia> using Pkg; Pkg.add(url="https://github.com/JuliaSymbolics/Metatheory.jl")

Documentation

Extensive Metatheory.jl is available here

Citing

If you use Metatheory.jl in your research, please cite our works.


Sponsors

If you enjoyed Metatheory.jl and would like to help, you can donate a coffee or choose place your logo and name in this page. See 0x0f0f0f's Github Sponsors page!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].