6 releases

✓ Uses Rust 2018 edition

new 0.1.2 Feb 14, 2020
0.1.1 Feb 13, 2020
0.0.3 Aug 23, 2019
0.0.2 May 21, 2019

#223 in Data structures

32 downloads per month

MIT license

125KB
2K SLoC

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.1.2"

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

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.5–1MB
~23K SLoC