Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ default = ["bin"]
bin = ["egglog/bin"]

[dependencies]
egglog = { git = "https://github.com/egraphs-good/egglog.git", rev = "a2da717fd2f5eb8e8cd7c68163e5a160da05e637", default-features = false }
egglog-ast = { git = "https://github.com/egraphs-good/egglog.git", rev = "a2da717fd2f5eb8e8cd7c68163e5a160da05e637", default-features = false }
egglog-reports = { git = "https://github.com/egraphs-good/egglog.git", rev = "a2da717fd2f5eb8e8cd7c68163e5a160da05e637", default-features = false }
egglog = { git = "https://github.com/egraphs-good/egglog.git", rev = "5294cdc66a7b90a9a1480cb2d930f2ee5785c8dd", default-features = false }
egglog-ast = { git = "https://github.com/egraphs-good/egglog.git", rev = "5294cdc66a7b90a9a1480cb2d930f2ee5785c8dd", default-features = false }
egglog-reports = { git = "https://github.com/egraphs-good/egglog.git", rev = "5294cdc66a7b90a9a1480cb2d930f2ee5785c8dd", default-features = false }

num = "0.4.3"
lazy_static = "1.4"
Expand Down
13 changes: 13 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
//! - [`(get-size!)` primitive](https://github.com/egraphs-good/egglog-experimental/blob/main/tests/web-demo/node-limit.egg)
//! for inspecting total tuple counts or counts for specific tables
//! - [Multi-extraction](https://github.com/egraphs-good/egglog-experimental/blob/main/tests/web-demo/multi-extract.egg)
//! - Body-defined primitives with `(primitive name (InputSort*) OutputSort body)`.
//! Body variables are positional (`_0`, `_1`, ...), and a partial primitive
//! body result propagates as primitive failure. The registered primitive uses
//! the minimum capability needed by its body (`pure`, `read`, `write`, or
//! `full`). Bodies may call built-in or previously registered primitives,
//! table-backed functions, and globals; applying those primitives is allowed
//! only in a compatible runtime context. A global reference makes the defined
//! primitive read-capable because globals lower to zero-argument function
//! lookups.
//!
//! Each bullet links to a runnable demo so you can explore the feature quickly.
//! The rest of this crate exposes the Rust APIs and helpers that back these extensions.
Expand All @@ -40,6 +49,7 @@ mod multi_extract;
pub use multi_extract::*;
mod size;
pub use size::*;
mod primitive;
mod table_stats;
pub use table_stats::*;

Expand Down Expand Up @@ -92,6 +102,9 @@ pub fn new_experimental_egraph() -> EGraph {
.add_command("print-table-stats".into(), Arc::new(PrintTableStatsCommand))
.unwrap();
egraph
.add_command("primitive".into(), Arc::new(primitive::RegisterPrimitive))
.unwrap();
egraph
}

// Create a parser with experimental macros
Expand Down
Loading
Loading