pub struct Semilattice {
pub idempotent: bool,
pub commutative: bool,
pub associative: bool,
pub monotone_join: bool,
pub has_top: bool,
}Expand description
Lattice properties of an aggregate.
Used by the Locy fixpoint engine to verify monotonicity and prove
termination. The flags are not independent: monotone_join typically
implies commutative and associative.
Fields§
§idempotent: boolf(x, x) == x. Idempotent aggregates can deduplicate inputs.
commutative: boolf(x, y) == f(y, x). Commutative aggregates are order-independent.
associative: boolf(f(x, y), z) == f(x, f(y, z)). Associative aggregates can be
partial-aggregated.
monotone_join: boolf preserves or raises the partial order. Monotone aggregates
produce sound fixpoints; non-monotone ones cannot be used inside
recursive Locy clauses.
has_top: boolBounded domain — is_at_top() may return true. Enables fixpoint
shortcuts (no further ingest can change the state).
Implementations§
Source§impl Semilattice
impl Semilattice
Sourcepub const NON_MONOTONE: Self
pub const NON_MONOTONE: Self
Properties of a non-monotone aggregate (SUM, AVG).
Such aggregates may not appear inside recursive Locy clauses.
Sourcepub const BOUNDED_MIN_MAX: Self
pub const BOUNDED_MIN_MAX: Self
Properties of MIN / MAX over a bounded domain — fully monotone.
Trait Implementations§
Source§impl Clone for Semilattice
impl Clone for Semilattice
Source§fn clone(&self) -> Semilattice
fn clone(&self) -> Semilattice
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Semilattice
Source§impl Debug for Semilattice
impl Debug for Semilattice
impl Eq for Semilattice
Source§impl PartialEq for Semilattice
impl PartialEq for Semilattice
Source§fn eq(&self, other: &Semilattice) -> bool
fn eq(&self, other: &Semilattice) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Semilattice
Auto Trait Implementations§
impl Freeze for Semilattice
impl RefUnwindSafe for Semilattice
impl Send for Semilattice
impl Sync for Semilattice
impl Unpin for Semilattice
impl UnsafeUnpin for Semilattice
impl UnwindSafe for Semilattice
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more