pub struct Runner<L: Language, N: Analysis<L> = (), IterData = (), CustomErrorT = String>where
IterData: IterationData<L, N>,
CustomErrorT: Clone,{
pub egraph: EGraph<L, N>,
pub iterations: Vec<Iteration<IterData>>,
pub roots: Vec<AppliedId>,
pub stop_reason: Option<StopReason<CustomErrorT>>,
pub limits: RunnerLimits,
pub hooks: Vec<Box<dyn FnMut(&mut Self) -> Result<(), CustomErrorT> + 'static>>,
}Fields§
§egraph: EGraph<L, N>The EGraph used.
iterations: Vec<Iteration<IterData>>Data accumulated over each Iteration.
roots: Vec<AppliedId>The roots of expressions added by the
with_expr method, in insertion order.
stop_reason: Option<StopReason<CustomErrorT>>Why the Runner stopped. This will be None if it hasn’t
stopped yet.
limits: RunnerLimits§hooks: Vec<Box<dyn FnMut(&mut Self) -> Result<(), CustomErrorT> + 'static>>hooks
Implementations§
Source§impl<L, N, IterData, CustomErrorT> Runner<L, N, IterData, CustomErrorT>
impl<L, N, IterData, CustomErrorT> Runner<L, N, IterData, CustomErrorT>
pub fn new(n: N) -> Self
pub fn with_expr(self, expr: &RecExpr<L>) -> Self
pub fn with_hook<F>(self, hook: F) -> Self
pub fn with_egraph(self, egraph: EGraph<L, N>) -> Self
pub fn with_node_limit(self, node_limit: usize) -> Self
pub fn with_iter_limit(self, iter_limit: usize) -> Self
pub fn with_time_limit(self, time_limit: Duration) -> Self
pub fn run(&mut self, rewrites: &[Rewrite<L, N>]) -> Report<CustomErrorT>
Trait Implementations§
Auto Trait Implementations§
impl<L, N = (), IterData = (), CustomErrorT = String> !Freeze for Runner<L, N, IterData, CustomErrorT>
impl<L, N = (), IterData = (), CustomErrorT = String> !RefUnwindSafe for Runner<L, N, IterData, CustomErrorT>
impl<L, N = (), IterData = (), CustomErrorT = String> !Send for Runner<L, N, IterData, CustomErrorT>
impl<L, N = (), IterData = (), CustomErrorT = String> !Sync for Runner<L, N, IterData, CustomErrorT>
impl<L, N, IterData, CustomErrorT> Unpin for Runner<L, N, IterData, CustomErrorT>
impl<L, N, IterData, CustomErrorT> UnsafeUnpin for Runner<L, N, IterData, CustomErrorT>where
N: UnsafeUnpin,
CustomErrorT: UnsafeUnpin,
impl<L, N = (), IterData = (), CustomErrorT = String> !UnwindSafe for Runner<L, N, IterData, CustomErrorT>
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
Mutably borrows from an owned value. Read more