GithubHelp home page GithubHelp logo

philzook58 / egglog0 Goto Github PK

View Code? Open in Web Editor NEW
65.0 5.0 3.0 493 KB

Datalog + Egg = Good

Home Page: http://www.philipzucker.com/egglog0/

Prolog 8.74% Rust 75.19% JavaScript 13.43% Ruby 0.26% Raku 0.84% Perl 1.40% Shell 0.14%
rust prolog theorem-prover

egglog0's Introduction

Defunct repo: Please see https://github.com/egraphs-good/egglog

egglog0

Using the egg library with a file format and semantics similar to datalog.

Short talk proposal paper for EGRAPHS 2022 https://github.com/philzook58/egglog0-talk/blob/main/out.pdf

Explanatory blog posts:

Try It Online!!!

http://www.philipzucker.com/egglog/

Building

To run on a file locally: cargo run --release tests/examples.pl

To build the wasm library: wasm-pack build --target web

Note: I started modifying egg a bit. I exposed the Subst datatypes field.

Ideas

  • MultiApplier could be useful / efficient
  • Using Conditional Equals could be useful if all variables known
  • But really getting patterns to compile with substituion pieces considered known subsumes this optimization I think in modern egg with yihong's optimization.
  • Sanity checks that needed variables exist would be good. when it does crash it names rules, so that's something.
  • May want to run Runner multiple times since it may not get restarted. Currently I have that vec![0] hack
  • _ for dummy variables
  • The ability to check to see if something is in the egraph.
  • graphviz dumping the egraph. graphviz wasm?
  • harrop formula
  • merge_subst that doesn't copy?
  • Give rules names. Keep a hash table of them?
  • Queries with variables
  • Queries should be conjunctions
  • a REPL would be sweet. especially if we have higher order rules, we could watch the database, add queries
  • termination based on the query condition
  • side effectful searchers and appliers (printing mostly), functions.
  • Astsize with weighting? Does that get me anywhere?
  • infix operators
  • better printers
  • rewrite/proof files that allow intermediate queriess. set of support?
  • cli
  • smtlib subset (forall (a b ) (= (f a) (g c)) ) ! :pattern) or horn cluase style.
  • vaguely ML/coq style synax
  • tptp syntax?
  • push pop directives instead of clear.
  • only allow stuff that compresses the egraph? Appliers that do not add terms to the egraph or only add a couple? Or keeps counts.
  • directives to changes egraph params. or flags?
  • Macros/simplification stage?
  • typed symbollang - would this even be an optimization?
  • defunctionalization of lambdas. lambda-egglog
  • backchain until stumped? depth limitted backchain?
  • hashlog - experiment with same thing but on hashcons instead of egraph. Easier to understand semi naive?
  • epeg extraction
  • faster multipattern via compilation
  • integerate analysis?
  • gensym
  • serialize the egraph
  • negation checks. nonlogical
  • cli options to the runner

Tests

cram tests/cram/*.t -i

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.