Skip to main content

Opts

Struct Opts 

Source
pub struct Opts {
Show 13 fields pub delta_hash: bool, pub early_probe: bool, pub hashcons: bool, pub symbolic_member: bool, pub member_index: bool, pub memo: bool, pub step_memo: bool, pub primed_memo: bool, pub parent_skip: bool, pub arena: bool, pub eager: bool, pub fold: bool, pub memo_cap: usize,
}
Expand description

Which strategies are on. The default has all of them on.

Fields§

§delta_hash: bool

Incremental state and EXCEPT hashes from cached node hashes. Off (-delta-hash): every successor’s key is recomputed from the leaves of every variable, and EXCEPT re-sums every entry.

§early_probe: bool

Probe the seen set before materializing. Off (-early-probe): every successor is interned first.

§hashcons: bool

Hash-consing and equality by handle. Off (-hashcons).

§symbolic_member: bool

Symbolic membership in a..b, [D -> R], SUBSET S, record sets and Seq(S). Off (-symbolic-member): the set is materialized (up to 2^24 elements; beyond that the run is refused).

§member_index: bool

Bounded hash indexes for repeated default normalized membership. Off (-member-index); TLC comparisons always use the original search.

§memo: bool

Keyed result caches. Off (-memo).

§step_memo: bool

Keyed result caches for the cached bodies of step predicates (implied actions, action constraints), keyed on the primed and unprimed variables they read. Off (-step-memo).

§primed_memo: bool

Keyed result caches for zero-arity definitions that a next-state action reads primed, keyed on the primed and unprimed variables they read, used only once those primed variables are assigned. Off (-primed-memo).

§parent_skip: bool

Parent-delta skip of invariant and constraint conjuncts. Off (-parent-skip).

§arena: bool

The pooled arena. Off (-arena): one heap allocation per transient value.

§eager: bool

Arguments substituted or evaluated eagerly where the demand-order rule allows. Off (-eager): every argument is a thunk.

§fold: bool

Constant folding of closed constant-level subexpressions. Off (-fold).

§memo_cap: usize

The byte cap of each worker’s memo tables (not a switch; the engine derives it from the run’s memory budget).

Implementations§

Source§

impl Opts

Source

pub fn parse(text: &str) -> Result<Self, String>

Parses a comma-separated list of -name (off) and +name (on).

let o = dive_core::Opts::parse("-memo,+delta-hash").unwrap();
assert!(!o.memo && o.delta_hash && o.arena);
assert!(dive_core::Opts::default().memo);
assert!(dive_core::Opts::parse("-inline-subst").is_err());
§Errors

An unknown switch. -inline-subst is reported as not applicable: the core binds substitutions dynamically, never by inlining.

Source

pub fn describe(&self) -> String

The switches that differ from the default, as -name (off) and +name (on) items, or default.

Trait Implementations§

Source§

impl Clone for Opts

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 Copy for Opts

Source§

impl Debug for Opts

Source§

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

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

impl Default for Opts

Source§

fn default() -> Self

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

impl Eq for Opts

Source§

impl PartialEq for Opts

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Opts

Auto Trait Implementations§

§

impl Forget for Opts

§

impl Freeze for Opts

§

impl Move for Opts

§

impl RefUnwindSafe for Opts

§

impl Send for Opts

§

impl Sync for Opts

§

impl Unpin for Opts

§

impl UnsafeUnpin for Opts

§

impl UnwindSafe for Opts

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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.