pub struct Sequential {
pub steps: usize,
pub value_domain_size: u64,
pub pc: usize,
pub value: u64,
pub active: bool,
pub history: Vec<u64>,
}Expand description
Totally ordered execution owner.
Fields§
§steps: usizeTotal number of steps.
value_domain_size: u64Exclusive upper bound of carried values.
pc: usizeProgram counter identifying the next step.
value: u64Current carried value.
active: boolWhether the current step is active.
history: Vec<u64>Values committed by completed steps.
Implementations§
Source§impl Sequential
impl Sequential
Sourcepub fn new(
steps: usize,
value_domain_size: u64,
initial_value: u64,
) -> Sequential
pub fn new( steps: usize, value_domain_size: u64, initial_value: u64, ) -> Sequential
Construct an inactive execution at the first step.
Sourcepub fn begin_step(&mut self) -> bool
pub fn begin_step(&mut self) -> bool
BeginStep, with disabled calls exposed as a stuttering rejection.
Sourcepub fn complete_step(&mut self, next_value: u64) -> bool
pub fn complete_step(&mut self, next_value: u64) -> bool
CompleteStep, including its nondeterministic ValueDomain choice as an
explicit caller value. An out-of-domain choice is not an enabled TLA+
action and therefore stutters with false.
Sourcepub fn done_stuttering(&mut self) -> bool
pub fn done_stuttering(&mut self) -> bool
DoneStuttering: enabled exactly at the terminal inactive state and
never changes carrier state.
Auto Trait Implementations§
impl Freeze for Sequential
impl RefUnwindSafe for Sequential
impl Send for Sequential
impl Sync for Sequential
impl Unpin for Sequential
impl UnsafeUnpin for Sequential
impl UnwindSafe for Sequential
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more