10 releases (4 breaking)

✓ Uses Rust 2018 edition

new 0.4.1 May 26, 2020
0.4.0 May 21, 2020
0.3.0 Feb 27, 2020
0.2.0 Feb 20, 2020
0.0.2 May 21, 2019

#141 in Data structures

Download history 1/week @ 2020-01-25 50/week @ 2020-02-08 39/week @ 2020-02-15 41/week @ 2020-02-22 20/week @ 2020-02-29 25/week @ 2020-03-07 19/week @ 2020-03-14 28/week @ 2020-03-21 29/week @ 2020-03-28 10/week @ 2020-04-04 57/week @ 2020-04-11 8/week @ 2020-04-18 2/week @ 2020-04-25 5/week @ 2020-05-02 5/week @ 2020-05-09

91 downloads per month

MIT license

150KB
3K SLoC

egg logo egg: egraphs good

Build Status Crates.io Docs.rs

Check out the web demo for some quick egraph action.

Using egg

Add egg to your Cargo.toml like this:

[dependencies]
egg = "0.4.1"

Developing

It's written in Rust. Typically, you install Rust using rustup.

Run cargo doc --open to build and open the documentation in a browser.

Before committing/pushing, make sure to run make, which runs all the tests and lints that CI will.

Tests

You will need graphviz to run the tests. Running cargo test will run the tests.

There are a couple interesting tests in the tests directory:

  • prop.rs implements propositional logic and proves some simple theorems.
  • math.rs implements real arithmetic, with a little bit of symbolic differentiation.
  • lambda.rs implements a small lambda calculus, using egg as a partial evaluator.

Dependencies

~0.3–0.9MB
~19K SLoC