Skip to main content

PipelineConfig

Struct PipelineConfig 

Source
pub struct PipelineConfig {
    pub enable_negation_opt: bool,
    pub enable_constant_folding: bool,
    pub enable_algebraic_simplification: bool,
    pub enable_strength_reduction: bool,
    pub enable_distributivity: bool,
    pub enable_quantifier_opt: bool,
    pub enable_dead_code_elimination: bool,
    pub max_iterations: usize,
    pub stop_on_fixed_point: bool,
}
Expand description

Configuration for the optimization pipeline.

Fields§

§enable_negation_opt: bool

Enable negation optimization pass

§enable_constant_folding: bool

Enable constant folding pass

§enable_algebraic_simplification: bool

Enable algebraic simplification pass

§enable_strength_reduction: bool

Enable strength reduction pass

§enable_distributivity: bool

Enable distributivity optimization pass

§enable_quantifier_opt: bool

Enable quantifier optimization pass

§enable_dead_code_elimination: bool

Enable dead code elimination pass

§max_iterations: usize

Maximum number of iterations before stopping

§stop_on_fixed_point: bool

Stop early if an iteration makes no changes

Implementations§

Source§

impl PipelineConfig

Source

pub fn all() -> Self

Create a configuration with all optimizations enabled.

Source

pub fn none() -> Self

Create a configuration with all optimizations disabled.

Source

pub fn constant_folding_only() -> Self

Create a configuration with only constant folding enabled.

Source

pub fn algebraic_only() -> Self

Create a configuration with only algebraic simplification enabled.

Source

pub fn aggressive() -> Self

Create a configuration for aggressive optimization (more iterations).

Source

pub fn with_negation_opt(self, enable: bool) -> Self

Builder method to enable/disable negation optimization.

Source

pub fn with_constant_folding(self, enable: bool) -> Self

Builder method to enable/disable constant folding.

Source

pub fn with_algebraic_simplification(self, enable: bool) -> Self

Builder method to enable/disable algebraic simplification.

Source

pub fn with_max_iterations(self, max: usize) -> Self

Builder method to set maximum iterations.

Source

pub fn with_stop_on_fixed_point(self, stop: bool) -> Self

Builder method to enable/disable fixed-point detection.

Source

pub fn with_strength_reduction(self, enable: bool) -> Self

Builder method to enable/disable strength reduction.

Source

pub fn with_distributivity(self, enable: bool) -> Self

Builder method to enable/disable distributivity optimization.

Source

pub fn with_quantifier_opt(self, enable: bool) -> Self

Builder method to enable/disable quantifier optimization.

Source

pub fn with_dead_code_elimination(self, enable: bool) -> Self

Builder method to enable/disable dead code elimination.

Trait Implementations§

Source§

impl Clone for PipelineConfig

Source§

fn clone(&self) -> PipelineConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PipelineConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PipelineConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.