slotted_egraphs/
lib.rs

1#![allow(unused_imports)]
2
3/*!
4Slotted e-graphs are a datastructure for representing congruence relations over terms with variables and binders.
5
6For a higher level introduction to slotted e-graphs, consider
7* the [talk](https://www.youtube.com/watch?v=4Cg365LVbYg)
8* the [pre-print](https://michel.steuwer.info/files/publications/2024/EGRAPHS-2024.pdf)
9
10For an example implementation of a Language with binders in slotted e-graphs,
11consider the RISE implementation in [here](https://github.com/memoryleak47/slotted-egraphs/tree/main/tests/rise/mod.rs).
12*/
13
14use std::error::Error;
15use std::fmt::Debug;
16use std::hash::Hash;
17use std::ops::Deref;
18use std::sync::Arc;
19
20#[doc(hidden)]
21pub type HashMap<K, V> = rustc_hash::FxHashMap<K, V>;
22#[doc(hidden)]
23pub type HashSet<T> = rustc_hash::FxHashSet<T>;
24
25pub type SmallHashSet<T> = vec_collections::VecSet<[T; 8]>;
26pub type SmallHashMap<T, U> = vec_collections::VecMap<[(T, U); 8]>;
27pub use vec_collections::AbstractVecMap;
28pub use vec_collections::AbstractVecSet;
29
30pub use symbol_table::GlobalSymbol as Symbol;
31
32// Whether to enable invariant-checks.
33#[cfg(feature = "checks")]
34const CHECKS: bool = true;
35#[cfg(not(feature = "checks"))]
36const CHECKS: bool = false;
37
38pub use slotted_egraphs_derive::define_language;
39
40mod slot;
41pub use slot::*;
42
43mod types;
44pub use types::*;
45
46mod parse;
47pub(crate) use parse::*;
48
49mod lang;
50pub use lang::*;
51
52mod slotmap;
53pub use slotmap::*;
54
55mod explain;
56pub use explain::*;
57
58mod debug;
59
60mod egraph;
61pub use egraph::*;
62
63mod extract;
64pub use extract::*;
65
66mod rewrite;
67pub use rewrite::*;
68
69mod group;
70use group::*;
71
72mod run;
73pub use run::*;