Package-level declarations

Types

Link copied to clipboard
data class CoordinationCost(val rounds: Int, val coupling: Int, val coordinatedVolume: Long) : Comparable<CoordinationCost>

The G4 coordination-cost score for a Draft pipeline.

Functions

Link copied to clipboard

Returns a Draft where independent DraftStage.Embroider nodes at the same dependency level are fused into a single DraftStage.BatchedEmbroider.

Link copied to clipboard

Scores this Draft by the CoordinationCost a monotonicity-aware executor would pay.

Link copied to clipboard

Returns a Draft where each DraftStage.Embroider node is positioned after all of its CoordinationKind.Free successor nodes.

Link copied to clipboard
suspend fun Draft<*>.executeCoordinated(propose: suspend (ByteArray) -> Unit): Int

Batched-execution path for Draft pipelines (G5).

Link copied to clipboard

Returns a Draft where adjacent same-kind CoordinationKind.Free nodes in a linear chain are collapsed into a single DraftStage.FusedMap or DraftStage.FusedFilter.

Link copied to clipboard
fun <T> Draft<T>.isEquivalentTo(other: Draft<T>): Boolean

Returns true when this Draft is structurally equivalent to other under the CALM commutativity theorem.

Link copied to clipboard
fun <T> Draft<T>.optimize(): Draft<T>

Applies all rewrite rules in sequence, then consolidates independent embroideries.

Link copied to clipboard
fun <T> Draft<T>.plan(stats: WarpStats): Draft<T>

Returns a Draft that minimises coordinationCost by applying the E-2 rewrite rules to a fixpoint and then consolidating independent embroideries.

Link copied to clipboard

Returns a Draft where all DraftStage.Filter (and DraftStage.FusedFilter) nodes in the Free section precede all DraftStage.Map (and DraftStage.FusedMap) nodes.