pub struct StoreCommitter<T, C: Container<Value = FMap<Timestamp, (T, SyncView)>>>(/* private fields */);Expand description
Wrapper around a single atomic operation, where multiple ghost steps can be performed.
Implementations§
Source§impl<T, C: Container<Value = FMap<Timestamp, (T, SyncView)>> + HasTimestamp> StoreCommitter<T, C>
impl<T, C: Container<Value = FMap<Timestamp, (T, SyncView)>> + HasTimestamp> StoreCommitter<T, C>
Sourcepub fn ward(self) -> C
pub fn ward(self) -> C
Identity of the committer
This is used so that we can only use the committer with the right [AtomicOwn].
logic(opaque) ⚠
Sourcepub fn shoot(&mut self, own: &mut Perm<C>, view: &mut SyncView) -> Timestamp
pub fn shoot(&mut self, own: &mut Perm<C>, view: &mut SyncView) -> Timestamp
‘Shoot’ the committer
This does the write on the atomic in ghost code, and can only be called once.
requires
!(*self).shot()requires
self.ward() == *(*own).ward()ensures
(^self).shot()ensures
(*self).ward() == (^self).ward() && (*self).val() == (^self).val()ensures
(*own).ward() == (^own).ward()ensures
(*view).le_log(^view)ensures
(*self).ward().get_timestamp(*view) < resultensures
result <= (*self).ward().get_timestamp(^view)ensures
(*own).val().get(result) == Noneensures
*(^own).val() == (*own).val().insert(result, ((*self).val(), (*view)))terminates
ghost
Auto Trait Implementations§
impl<T, C> Freeze for StoreCommitter<T, C>
impl<T, C> Objective for StoreCommitter<T, C>
impl<T, C> RefUnwindSafe for StoreCommitter<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for StoreCommitter<T, C>
impl<T, C> Sync for StoreCommitter<T, C>
impl<T, C> Unpin for StoreCommitter<T, C>
impl<T, C> UnsafeUnpin for StoreCommitter<T, C>
impl<T, C> UnwindSafe for StoreCommitter<T, C>where
T: UnwindSafe,
C: UnwindSafe,
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