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 IrThe lowered specification.
ctx: CtxThe value semantics the startup values were built under.
action_composition: boolWhether 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: boolWhether 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.