Package-level declarations

Types

Link copied to clipboard
class CodecReport(val seeds: Int, val states: Long, val distinctStates: Long, val distinctEncodings: Long, val joinPairs: Long, val absorbingJoinPairs: Long)

What one binding's codec pass actually put through the wire, measured by LatticeLawHarness.runCodecLaws.

Link copied to clipboard
class LatticeLawHarness<S : Quilted<S>>(val initial: S, val alphabet: List<LatticeOp<S>>, val serializer: KSerializer<S>, val criticalShapes: List<List<String>> = defaultCriticalShapes(alphabet), val floors: VacuityFloors = VacuityFloors.DEFAULT, val replicaCount: Int = 3, val opsPerReplica: Int = 8)

Drives replicaCount replicas (default 3) through opsPerReplica random operations distributed across them, then merges in every possible pairwise order and asserts all replicas converge to the same value.

Link copied to clipboard
abstract class LatticeLawSuite<S : Quilted<S>>

Sibling to us.tractat.kuilt.conformance.QuiltedConformanceSuite. Subclass and implement newHarness to bind a CRDT type.

Link copied to clipboard
class LatticeOp<S>(val name: String, val kind: OpKind, val apply: (state: S, replicaIndex: Int, random: Random) -> S)

One named operation a binding can perform against its state.

Link copied to clipboard
fun interface OperationGenerator<S>

Strategy for generating an operation against a model state, producing the next state.

Link copied to clipboard
enum OpKind : Enum<OpKind>

Whether an op asserts something new or retires something an earlier op asserted.

Link copied to clipboard
class VacuityFloors(val strictAncestorPairs: Double = 0.15, val concurrentPairs: Double = 0.15, val effectiveRetireSteps: Double = 0.1, val maxNoOpSteps: Double = 0.25, val totalOrder: Boolean = false)

How much searching a binding's generator has to do before its green counts for anything.

Link copied to clipboard
class VacuityReport(val pairs: Long, val strictAncestorPairs: Long, val concurrentPairs: Long, val steps: Int, val effectiveRetireSteps: Int, val noOpSteps: Int, val floors: VacuityFloors)

What one binding's generator actually searched, measured by LatticeLawHarness.measureVacuity and checked against VacuityFloors.

Functions

Link copied to clipboard

The shape every retiring type must reach: assert, retire, re-assert.