Expand description
Helper test utils to test lattice implementation correctness.
Functions§
- cartesian_
power - Returns an iterator of
N
-length arrays containing all permutations ofitems
(with replacement). - check_
all - Helper which calls many other
check_*
functions in this module. See source code for which functions are called. - check_
atomize_ each - Check that the atomized lattice points re-merge to form the same original lattice point, for each item in
items
. - check_
lattice_ bimorphism - Checks that the
LatticeBimorphism
is valid, i.e. that merge distributes over both arguments of it. - check_
lattice_ default_ is_ bot - Asserts that
IsBot
is true forDefault::default()
. - check_
lattice_ is_ bot - Checks that the item which is bot is less than (or equal to) all other items.
- check_
lattice_ is_ top - Checks that the item which is top is greater than (or equal to) all other items.
- check_
lattice_ morphism - Checks that the
LatticeMorphism
is valid, i.e. that merge distributes over it. - check_
lattice_ ord - Check that the lattice’s
PartialOrd
implementation agrees with theNaiveLatticeOrd
partial order derived fromMerge
. - check_
lattice_ properties - Check lattice associativity, commutativity, and idempotence.
- check_
partial_ ord_ properties - Checks
PartialOrd
andPartialEq
’s reflexivity, symmetry, transitivity, and duality.