A prolog like syntax for egg

Overview

egglog

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

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

-[x] 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? -[x] Queries with variables -[x] Queries should be conjunctions -[X] 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? -[x] 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

You might also like...
Shellharden is a syntax highlighter and a tool to semi-automate the rewriting of scripts to ShellCheck conformance, mainly focused on quoting
Shellharden is a syntax highlighter and a tool to semi-automate the rewriting of scripts to ShellCheck conformance, mainly focused on quoting

Shellharden is a syntax highlighter and a tool to semi-automate the rewriting of scripts to ShellCheck conformance, mainly focused on quoting

Simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history
Simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history

eva simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history installation Homebrew $ brew install eva crates.io $ car

Fast, minimal, feature-rich, extended formatting syntax for Rust!

Formatting Tools Fast, minimal, feature-rich, extended formatting syntax for Rust! Features include: Arbitrary expressions inside the formatting brace

A standalone code editor with syntax highlighting and themes.
A standalone code editor with syntax highlighting and themes.

CodeEditor A standalone code (and text) editor for people like me who write their own user interfaces utilizing crates like pixels. CodeEditor renders

A superset of PHP with extended syntax and runtime capabilities.

PXP PXP is a superset of the PHP programming language that provides an extended set of syntax rules and language features to improve developer experie

🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.
🏭 Convert Markdown documents into themed HTML pages with support for code syntax highlighting, LaTeX and Mermaid diagrams.

Marky Markdown Magician πŸ§™ Features Hot reload previewing πŸ”₯ Conversion to HTML / PDF 🏭 Themes! ✨ Extensions - Math, diagrams, syntax-highlighting 🧩

Rust regex in ECMAScript regular expression syntax!

ecma_regex The goal of ecma_regex is to provide the same functionality as the regex crate in ECMAScript regular expression syntax. Reliable regex engi

*slaps roof of [programming language]* this bad boy can fit so much [syntax sugar] into it

An attempt to give myself a new Pareto-optimal choice for quick-and-dirty scripts, particularly when I'm not on a dev computer, and to practice writin

βš™οΈ Pre-commit hook for downgrading Python logger syntax

printf-log-formatter Automatically convert f-strings and str.format() syntax to printf-style strings. In other words, this syntax logger.error(f"{1}")

Releases(0.0.1)
Owner
Philip Zucker
A pretty cool dude who does physics and things.
Philip Zucker
Valq - macros for querying and extracting value from structured data by JavaScript-like syntax

valq   valq provides a macro for querying and extracting value from structured data in very concise manner, like the JavaScript syntax. Look & Feel: u

Takumi Fujiwara 24 Dec 21, 2022
A simple, C-like, ternary operator for cleaner syntax.

A simple ternary operator macro in rust. the iff! macro is the only item exported by this crate, it simply takes three expressions, seperated by ? and

KaitlynEthylia 42 May 23, 2023
Rust Server Components. JSX-like syntax and async out of the box.

RSCx - Rust Server Components RSCx is a server-side HTML rendering engine library with a neat developer experience and great performance. Features: al

Antonio Pitasi 21 Sep 19, 2023
A bit like tee, a bit like script, but all with a fake tty. Lets you remote control and watch a process

teetty teetty is a wrapper binary to execute a command in a pty while providing remote control facilities. This allows logging the stdout of a process

Armin Ronacher 259 Jan 3, 2023
A cat(1) clone with syntax highlighting and Git integration.

A cat(1) clone with syntax highlighting and Git integration. Key Features β€’ How To Use β€’ Installation β€’ Customization β€’ Project goals, alternatives [δΈ­

David Peter 38.9k Jan 8, 2023
Rust syntax in Turkish

pas pas (Turkish for Rust) allows to write Rust programs in Turkish, using Turkish keywords and function names, adapted from the original French imple

Barış Ekim 19 Dec 15, 2022
A syntax-highlighting pager for git, diff, and grep output

Get Started Install delta and add this to your ~/.gitconfig: [core] pager = delta [interactive] diffFilter = delta --color-only [delta]

Dan Davison 16k Dec 31, 2022
A syntax highlighter for Node powered by Tree Sitter. Written in Rust.

tree-sitter-highlight A syntax highlighter for Node.js powered by Tree Sitter. Written in Rust. Usage The following will output HTML: const treeSitter

Devon Govett 211 Dec 20, 2022
Notes on learning the Rust programming language syntax.

notes-on-rust Notes on learning the Rust programming language syntax. Resources https://www.rust-lang.org/learn/get-started https://doc.rust-lang.org/

Fred Snyder 1 Jan 2, 2022
🌴 Syntax highlighting in Rust.

?? HL (WIP) Syntax highlighting written in Rust. The project is designed to generate html syntax highlighting for the given file. This software is ins

ahmadrosid 8 Jun 28, 2022