Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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/saulshanabrook/egg-smol.git", branch = "codex/split-scheduler-can-stop-report", default-features = false }
egglog-ast = { git = "https://github.com/saulshanabrook/egg-smol.git", branch = "codex/split-scheduler-can-stop-report", default-features = false }
egglog-reports = { git = "https://github.com/saulshanabrook/egg-smol.git", branch = "codex/split-scheduler-can-stop-report", default-features = false }
egglog = { git = "https://github.com/saulshanabrook/egg-smol.git", branch = "codex/split-primitive-body-runtime-apis", default-features = false }
egglog-ast = { git = "https://github.com/saulshanabrook/egg-smol.git", branch = "codex/split-primitive-body-runtime-apis", default-features = false }
egglog-reports = { git = "https://github.com/saulshanabrook/egg-smol.git", branch = "codex/split-primitive-body-runtime-apis", default-features = false }
Comment thread
saulshanabrook marked this conversation as resolved.
Outdated

num = "0.4.3"
lazy_static = "1.4"
Expand Down
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
//! - [`(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, but
//! they may not call or capture table-backed functions, nor accept or return
//! function-container sorts, because those reads are hidden from seminaive
//! rule dependency analysis.
Comment thread
saulshanabrook marked this conversation as resolved.
Outdated
//!
//! 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 @@ -37,6 +45,7 @@ mod multi_extract;
pub use multi_extract::*;
mod size;
pub use size::*;
mod primitive;

// Sugar modules using parse-time macros
mod sugar;
Expand Down Expand Up @@ -72,6 +81,9 @@ pub fn new_experimental_egraph() -> EGraph {
)
.unwrap();
egraph
.add_command("primitive".into(), Arc::new(primitive::RegisterPrimitive))
.unwrap();
egraph
}

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