Skip to main content

Handoff

Struct Handoff 

Source
pub struct Handoff<'a> {
Show 21 fields pub ir: &'a Ir, pub ctx: Ctx, pub action_composition: bool, pub constants: Vec<Option<ConstBinding>>, pub redirects: HashMap<DefId, DefId>, pub std_redirects: HashMap<StdOp, DefId>, pub precomputed: HashMap<DefId, Value>, pub overrides: HashSet<DefId>, pub deferred: BTreeSet<DefId>, pub startup_evaluator: Option<Arc<dyn StartupEvaluator>>, pub assumptions: Vec<DefId>, pub init: Vec<Role>, pub next: Vec<Role>, pub invariants: Vec<Role>, pub constraints: Vec<Role>, pub action_constraints: Vec<Role>, pub implied_inits: Vec<Role>, pub implied_actions: Vec<Role>, pub check_deadlock: bool, pub symmetry: Vec<Vec<(String, String)>>, pub view: Option<Role>,
}
Expand description

What dive-model’s binder hands to the core.

Fields§

§ir: &'a Ir

The lowered specification.

§ctx: Ctx

The value semantics the startup values were built under.

§action_composition: bool

Whether the existing TLA+ action-composition mode is enabled.

§constants: Vec<Option<ConstBinding>>

Constants, by ConstId.

§redirects: HashMap<DefId, DefId>

Op <- D redirects, resolved to their final target.

§std_redirects: HashMap<StdOp, DefId>

Redirects of Java-overridden operators (Nat <- NatOverride).

§precomputed: HashMap<DefId, Value>

Startup values of constant definitions.

§overrides: HashSet<DefId>

The definitions among precomputed whose value is a configuration override (Op <- value): their body is not their value.

§deferred: BTreeSet<DefId>

Pure constant-level definitions the binder did not evaluate at startup (dive_model::bind_deferring_constants): the compiler evaluates each once, before the roles, and uses its value as a startup value. One the core cannot evaluate within its startup bounds goes to Self::startup_evaluator, the binder’s evaluation; one that fails there too keeps its body, which is then evaluated where it is used, as TLC does after a failed startup evaluation.

§startup_evaluator: Option<Arc<dyn StartupEvaluator>>

The binder’s evaluation of a deferred definition, for the ones the core does not evaluate itself. Without one, such a definition keeps its body.

§assumptions: Vec<DefId>

Pure ASSUMEs of the root module (dive_model::Model::deferred_assumptions): the compiler evaluates them in order, after the deferred definitions, as it evaluates those, stopping at the first that is not TRUE, and lists the ones it finds TRUE in Plan::startup_assumptions. The caller checks the others with the dive-eval evaluator, which reports a false or failing one as TLC does.

§init: Vec<Role>

Initial predicates.

§next: Vec<Role>

Next-state actions, split, in TLC’s order.

§invariants: Vec<Role>

INVARIANTs.

§constraints: Vec<Role>

CONSTRAINTs.

§action_constraints: Vec<Role>

ACTION_CONSTRAINTs, evaluated on a step: unprimed variables read the parent, primed ones the successor.

§implied_inits: Vec<Role>

Implied initial predicates: the state-level parts of PROPERTYs, checked on the initial states.

§implied_actions: Vec<Role>

Implied actions: the [A]_v of [][A]_v in PROPERTYs, evaluated on every step as ACTION_CONSTRAINTs are.

§check_deadlock: bool

Whether deadlock is checked.

§symmetry: Vec<Vec<(String, String)>>

SYMMETRY: the closure’s nonidentity maps, each as its moved model values (from, to) by name; empty without one.

§view: Option<Role>

VIEW: states are keyed by its value.

Trait Implementations§

Source§

impl<'a> Clone for Handoff<'a>

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<'a> Debug for Handoff<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Handoff<'a>

§

impl<'a> !Send for Handoff<'a>

§

impl<'a> !Sync for Handoff<'a>

§

impl<'a> !UnwindSafe for Handoff<'a>

§

impl<'a> Forget for Handoff<'a>

§

impl<'a> Freeze for Handoff<'a>

§

impl<'a> Move for Handoff<'a>

§

impl<'a> Unpin for Handoff<'a>

§

impl<'a> UnsafeUnpin for Handoff<'a>

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.