Skip to main content

Recipe

Struct Recipe 

Source
pub struct Recipe { /* private fields */ }
Expand description

Immutable inputs for reconstructing a model’s startup runtime.

Rebinding creates a fresh interner, evaluator Core, registers and caches; no values or scopes from an already bound model are retained.

Implementations§

Source§

impl Recipe

Source

pub fn new( ir: Arc<Ir>, config: ModelConfig, options: Options, no_deadlock: bool, ) -> Self

Retains the original lowered source, configuration and value semantics.

Source

pub fn has_randomness(&self) -> bool

Whether the source/config inventory may invoke a native random operator. This conservative query evaluates nothing and grants no runtime or proof authority. Fresh finite replay uses it to preserve actual source-bound action captures without constructing actions for ordinary pure words.

let _may_draw = recipe.has_randomness();
Source

pub fn with_symmetry_liveness(self, policy: SymmetryLiveness) -> Self

Retains an explicit independent binding policy for temporal symmetry. The plain constructor refuses periodic symmetry unless this is selected.

let recipe = recipe.with_symmetry_liveness(dive_model::SymmetryLiveness::Unreduced);
Source

pub fn bind(&self, host: Arc<dyn Host>) -> Result<Model, Box<Failure>>

Repeats the real binder’s complete startup operation with a new runtime. The host is installed before any constant definition is evaluated. Checker action construction is omitted; the result carries source predicates only.

§Errors

The ordinary binding errors. Randomness combined with VIEW or SYMMETRY refuses after structural checks and before any startup evaluation, using the shared transformed_randomness policy.

Source

pub fn bind_controlled( &self, host: Arc<dyn Host>, control: Arc<dyn HostControl>, ) -> Result<Model, ControlledBindError>

Repeats startup with a separate typed evaluator control capability.

Structural preprocessing and evaluator construction remain uninterruptible. The capability covers evaluator loop checkpoints during constant evaluation and role binding; it is removed before the fresh model is returned.

§Errors

Ordinary binding failures, typed interruption, or control registration failure.

Source

pub fn model_values(&self) -> &[String]

Configuration model values, as text rather than interner atoms.

Source

pub fn bind_fallible( &self, host: Arc<dyn Host>, control: Option<Arc<dyn HostControl>>, ) -> Result<Model, ControlledBindError>

Reconstructs a fresh predicate-only model with fallible error transport. Intrinsic evaluator resource/internal errors retain their original type and startup output. No synthetic control or resource policy is installed when control is absent; the plain binding methods remain unchanged.

§Errors

Ordinary binding failures, original evaluator failures/interruption, or conflicting control ownership. No model exists on failure.

Source

pub fn bind_next_fallible( &self, host: Arc<dyn Host>, control: Option<Arc<dyn HostControl>>, ) -> Result<Model, ControlledBindError>

Reconstructs a fresh runtime including the real ordered Next actions. This carries no checker state, counters, store or execution evidence.

let fresh = recipe.bind_next_fallible(host, None);
§Errors

As Self::bind_fallible, including action construction failures and the same pre-startup refusal of randomness under VIEW or SYMMETRY.

Trait Implementations§

Source§

impl Clone for Recipe

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 Recipe

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for Recipe

§

impl Freeze for Recipe

§

impl Move for Recipe

§

impl RefUnwindSafe for Recipe

§

impl Send for Recipe

§

impl Sync for Recipe

§

impl Unpin for Recipe

§

impl UnsafeUnpin for Recipe

§

impl UnwindSafe for Recipe

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> Same for T

Source§

type Output = T

Should always be Self
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.