Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egraphs-good/egglog
egraphs + datalog!
https://github.com/egraphs-good/egglog
Last synced: about 1 month ago
JSON representation
egraphs + datalog!
- Host: GitHub
- URL: https://github.com/egraphs-good/egglog
- Owner: egraphs-good
- License: mit
- Created: 2022-02-07T21:19:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-17T20:21:14.000Z (about 1 month ago)
- Last Synced: 2024-05-18T20:42:40.885Z (about 1 month ago)
- Language: Rust
- Homepage: https://egraphs-good.github.io/egglog/
- Size: 4.01 MB
- Stars: 355
- Watchers: 11
- Forks: 41
- Open Issues: 67
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Citation: CITATION.bib
- Codeowners: .github/CODEOWNERS
Lists
- awesome-rust-formalized-reasoning - egglog - language that combines the benefits of equality saturation and datalog. (Programming Language / Libraries)
- my-awesome-stars - egraphs-good/egglog - egraphs + datalog! (Rust)
- awesome-stars - egraphs-good/egglog - egraphs + datalog! (Rust)
README
# egglog
This is the repo for the `egglog` tool accompanying the paper
"Better Together: Unifying Datalog and Equality Saturation"
([ACM DL](https://dl.acm.org/doi/10.1145/3591239), [arXiv](https://arxiv.org/abs/2304.04332)).If you use this work, please use [this citation](./CITATION.bib).
See also the Python binding, which provides a bit more documentation:
https://egglog-python.readthedocs.io/## Chat
There is a Zulip chat about egglog here:
https://egraphs.zulipchat.com/#narrow/stream/375765-egglog## Prerequisites & compilation
```
apt-get install make cargo
cargo install cargo-nextest
make all
```## Usage
```
cargo run [-f fact-path] [-naive] [--to-json] [--to-dot] [--to-svg]
```or just
```
cargo run
```for the REPL.
* The `--to-dot` command will save a graphviz dot file at the end of the program, replacing the `.egg` extension with `.dot`.
* The `--to-svg`, which requires [Graphviz to be installed](https://graphviz.org/download/), will save a graphviz svg file at the end of the program, replacing the `.egg` extension with `.svg`.## Community extensions
* [@hatoo](https://github.com/hatoo) maintains an [egglog-language extension](https://marketplace.visualstudio.com/items?itemName=hatookov.egglog-language) in VS Code (just search for "egglog" in VS Code).
* [@segeljakt](https://github.com/segeljakt) maintains a [Neovim plugin](https://github.com/segeljakt/tree-sitter-egg) for egglog using tree-sitter.## Development
To run the tests use `make test`.
# Documentation
To view documentation, run `cargo doc --open`.
TODO migrate the following documentation to cargo doc:
### Sort: i64Signed 64-bit integers supporting these primitives:
```
+ - * / % ; arithmetic
& | ^ << >> not-i64 ; bit-wise operations
< > <= >= ; comparisons
min max log2
to-f64
to-string
```### Sort: f64
64-bit floating point numbers supporting these primitives:
```
+ - * / % ; arithmetic
< > <= >= ; comparisons
min max neg
to-i64
to-string
```### Sort: map
A map from a key type to a value type supporting these primitives:
```
empty
insert
get
not-contains
contains
set-union
set-diff
set-intersect
map-remove
```### Sort: rational
Rational numbers (fractions) with 64-bit precision for numerator and denominator with these primitives:
```
+ - * / ; arithmetic
min max neg abs floor ceil round
rational ; construct from a numerator and denominator
numer denom ; get numerator and denominator
pow log sqrt
< > <= >= ; comparisons
```These primitives are only defined when the result itself is a pure rational.
### Sort: string
Use double quotes to get a quote: `"Foo "" Bar"` is `Foo " Bar`.
No primitives defined.