pub struct EgraphConfig {
pub shrink_iters: usize,
pub explore_iters: usize,
pub const_fold_iters: usize,
pub node_limit: Option<usize>,
pub iter_limit: Option<usize>,
pub include_trig_rules: bool,
pub include_log_exp_rules: bool,
}Expand description
Configuration for the e-graph schedule and extraction strategy.
Pass to simplify_egraph_with to customise iteration counts and
resource limits.
§Rule flags
By default both include_trig_rules and include_log_exp_rules are true,
so simplify_egraph reduces sin²(x)+cos²(x)→1 and exp(log(x))→x
without any extra configuration. Set either flag to false to suppress
the corresponding rule set (useful when you need to benchmark rule impact or
avoid domain-sensitive rewrites).
Fields§
§shrink_iters: usizeSaturation iterations in the shrinking phase. Default 5.
explore_iters: usizeSaturation iterations in the exploring phase. Default 3.
const_fold_iters: usizeConstant-folding iterations appended after each phase. Default 3.
node_limit: Option<usize>Abort if the e-graph exceeds this many nodes. None = unlimited.
iter_limit: Option<usize>Per-ruleset iteration cap passed to egglog’s scheduler. None = unlimited.
include_trig_rules: boolInclude the Pythagorean trig identity (sin²+cos²→1) in the explore phase.
Default true.
include_log_exp_rules: boolInclude exp/log cancellation (exp(log(x))→x, log(exp(x))→x) in the
explore phase. Default true.
Trait Implementations§
Source§impl Clone for EgraphConfig
impl Clone for EgraphConfig
Source§fn clone(&self) -> EgraphConfig
fn clone(&self) -> EgraphConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EgraphConfig
impl Debug for EgraphConfig
Auto Trait Implementations§
impl Freeze for EgraphConfig
impl RefUnwindSafe for EgraphConfig
impl Send for EgraphConfig
impl Sync for EgraphConfig
impl Unpin for EgraphConfig
impl UnsafeUnpin for EgraphConfig
impl UnwindSafe for EgraphConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more