Code Monkey home page Code Monkey logo

egglog's Introduction

egglog

Web Demo Main Branch Documentation

This is repo for the egglog tool accompanying the paper "Better Together: Unifying Datalog and Equality Saturation" (ACM DL, arXiv).

If you use this work, please use this citation.

See also the Python binding, which provides a bit more documentation: https://egg-smol-python.readthedocs.io/en/latest/

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] <files.egg>

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, will save a graphviz svg file at the end of the program, replacing the .egg extension with .svg.

VS Code plugin

There is a VS Code extension in the vscode folder. Install using 'Install from VSIX...' in the three-dot menu of the extensions tab and pick vscode/eggsmol-1.0.0/eggsmol-1.0.0.vsix.

Enhancing the VS code extension

If you want to hack on the VS Code extension, install nodejs, and make your changes in the files in the vscode/eggsmol-1.0.0 folder.

Then run

code vscode/eggsmol-1.0.0

and use F5 to run the extension in a new window. When satisfied, then install VSCE if you do not already have it:

npm install -g @vscode/vsce

Run vsce package in the vscode/eggsmol-1.0.0 folder to reconstruct the .vsix file and install it manually.

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: i64

Signed 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.

egglog's People

Contributors

mwillsey avatar oflatt avatar yihozhang avatar saulshanabrook avatar philzook58 avatar alex-fischman avatar hatoo avatar ezrosent avatar gussmith23 avatar alstrup avatar wilcoxjay avatar clyben avatar rtjoa avatar trevorhansen avatar mgree avatar bskinn avatar kirstenmg avatar ryan-berger avatar wbthomason avatar remysucre avatar bvanjoi avatar dcao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.