Skip to main content

Config

Struct Config 

Source
#[non_exhaustive]
pub struct Config { pub max_size: u8, pub max_terms: usize, pub samples: usize, pub conflicts: u64, pub propagations: u64, pub restarts: usize, pub max_vars: usize, pub comparisons: bool, pub selects: bool, }
Expand description

How far to search.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§max_size: u8

The largest candidate, in nodes (a tree: leaves and operators).

§max_terms: usize

The most distinct behaviors kept (memory: each costs a word per sample).

§samples: usize

Random sample points (besides boundary values).

§conflicts: u64

The SAT solver’s conflict budget for each proof; a candidate whose proof needs more is left unproved (Report::unproved).

§propagations: u64

The SAT solver’s propagation budget for each proof (u64::MAX, the default: no limit), likewise. A conflict costs more propagation on a larger circuit, so this bounds the time a proof takes more closely than conflicts does, and as deterministically.

§restarts: usize

How many counterexamples may restart the search.

§max_vars: usize

At most this many variables.

§comparisons: bool

Whether candidates may hold comparisons (== != <u <s, each the value 0 or 1 at the target’s width; a comparison counts one node, its extension none). On by default: (x | -x) >>u 63 is x != 0, and a sum with a correction where a value is zero has no smaller writing without one. The enumeration is about a third larger with them.

§selects: bool

Whether candidates may hold select(c, a, b), c a candidate that is 0 or 1 at every sample (a comparison, or what has a comparison’s values: 1 >>u x is x == 0), read as c != 0. On by default: the smaller of two values is select(x <u y, x, y).

Implementations§

Source§

impl Config

Source

pub fn with_max_size(self, value: u8) -> Self

Sets max_size.

Source

pub fn with_max_terms(self, value: usize) -> Self

Sets max_terms.

Source

pub fn with_samples(self, value: usize) -> Self

Sets samples.

Source

pub fn with_conflicts(self, value: u64) -> Self

Sets conflicts.

Source

pub fn with_propagations(self, value: u64) -> Self

Source

pub fn with_restarts(self, value: usize) -> Self

Sets restarts.

Source

pub fn with_max_vars(self, value: usize) -> Self

Sets max_vars.

Source

pub fn with_comparisons(self, value: bool) -> Self

Source

pub fn with_selects(self, value: bool) -> Self

Sets selects.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

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

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

impl Default for Config

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Forget for Config

§

impl Freeze for Config

§

impl Move for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnsafeUnpin for Config

§

impl UnwindSafe for Config

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.