pub struct SemiLattice<T>(pub T);Expand description
The ‘lattice’ Resource Algebra.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T: SemiLattice> RA for SemiLattice<T>
impl<T: SemiLattice> RA for SemiLattice<T>
Source§fn op(self, other: Self) -> Option<Self>
fn op(self, other: Self) -> Option<Self>
logic(open, inline)
Some(Self(self.0.join(other.0)))Source§fn incl(self, other: Self) -> bool
fn incl(self, other: Self) -> bool
logic(open, inline)
self.0 <= other.0ensures
result == (exists<factor> self.op(factor) == Some(other))Source§fn commutative(a: Self, b: Self)
fn commutative(a: Self, b: Self)
logic(law) ⚠
ensures
a.op(b) == b.op(a)Source§fn associative(a: Self, b: Self, c: Self)
fn associative(a: Self, b: Self, c: Self)
logic ⚠
ensures
a.op(b).and_then_logic(|ab: Self| ab.op(c)) == b.op(c).and_then_logic(|bc| a.op(bc))
Source§fn core_idemp(self)
fn core_idemp(self)
logic ⚠
requires
self.core() != Noneensures
let c = self.core().unwrap_logic(); c.op(c) == Some(c)
ensures
self.core().unwrap_logic().op(self) == Some(self)Source§fn core_is_maximal_idemp(self, i: Self)
fn core_is_maximal_idemp(self, i: Self)
logic ⚠
requires
i.op(i) == Some(i)requires
i.op(self) == Some(self)ensures
match self.core() { Some(c) => i.incl(c), None => false, }
Source§fn eq(self, other: Self) -> bool
fn eq(self, other: Self) -> bool
logic(open, inline) Read more
Source§fn incl_eq(self, other: Self) -> bool
fn incl_eq(self, other: Self) -> bool
logic(open, sealed) Read more
Source§fn incl_eq_op(a: Self, b: Self, x: Self) -> bool
fn incl_eq_op(a: Self, b: Self, x: Self) -> bool
logic(open, sealed) Read more
Source§fn update_nondet(self, s: Set<Self>) -> bool
fn update_nondet(self, s: Set<Self>) -> bool
This is used in
Resource::update_nondet. Read moreSource§fn associative_none(a: Self, b: Self, c: Self, bc: Self)
fn associative_none(a: Self, b: Self, c: Self, bc: Self)
Source§fn associative_some(a: Self, b: Self, c: Self, ab: Self, bc: Self)
fn associative_some(a: Self, b: Self, c: Self, ab: Self, bc: Self)
Specialized version of
Self::associative, in the case where a.op(b) and b.op(c)
are both valid. Read moreSource§fn incl_transitive(a: Self, b: Self, c: Self)
fn incl_transitive(a: Self, b: Self, c: Self)
Source§fn cancelable(self) -> bool
fn cancelable(self) -> bool
Cancelation of resource algebra elements. Read more
Auto Trait Implementations§
impl<T> Freeze for SemiLattice<T>where
T: Freeze,
impl<T> Objective for SemiLattice<T>where
T: Objective,
impl<T> RefUnwindSafe for SemiLattice<T>where
T: RefUnwindSafe,
impl<T> Send for SemiLattice<T>where
T: Send,
impl<T> Sync for SemiLattice<T>where
T: Sync,
impl<T> Unpin for SemiLattice<T>where
T: Unpin,
impl<T> UnsafeUnpin for SemiLattice<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SemiLattice<T>where
T: 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