Expand description
This module makes it easier to use egglog from Rust.
It is intended to be imported fully.
use egglog::prelude::*;See also rule, rust_rule, query, BaseSort,
and ContainerSort.
Re-exports§
pub use egglog::ast::Action;pub use egglog::ast::Fact;pub use egglog::ast::Facts;pub use egglog::sort::BigIntSort;pub use egglog::sort::BigRatSort;pub use egglog::sort::BoolSort;pub use egglog::sort::F64Sort;pub use egglog::sort::I64Sort;pub use egglog::sort::StringSort;pub use egglog::sort::UnitSort;pub use egglog::EGraph;pub use egglog::sort;pub use egglog::sort;
Modules§
Macros§
Structs§
- Generic
Actions - Query
Result - The result of a query.
- Rust
Rule Context - A wrapper around an
ExecutionStatefor rules that are written in Rust. See therust_ruledocumentation for an example of how to use this. - Rust
Span
Enums§
Traits§
- Base
Sort - A “default” implementation of
Sortfor simple types which just want to put some data in the e-graph. If you implement this trait, do not implementSortorContainerSort. Useadd_base_sortto register base sorts with theEGraph. SeeSortfor documentation of the methods. Do not overrideto_arcsort`. - Container
Sort - A “default” implementation of
Sortfor types which just want to store a pure data structure in the e-graph. If you implement this trait, do not implementSortorBaseSort. Useadd_container_sortto register container sorts with theEGraph. SeeSortfor documentation of the methods. Do not overrideto_arcsort.
Functions§
- add_
base_ sort - Add a
BaseSortto the e-graph - add_
constructor - Declare a new constructor table.
- add_
container_ sort - add_
function - Declare a new function table.
- add_
relation - Declare a new relation table.
- add_
ruleset - Create a new ruleset.
- add_
sort - Declare a new sort.
- query
- Run a query over the database.
- rule
- Add a rule to the e-graph whose right-hand side is made up of actions.
- run_
ruleset - Run one iteration of a ruleset.
- rust_
rule - Add a rule to the e-graph whose right-hand side is a Rust callback.