Package-level declarations

Types

Link copied to clipboard
interface Aggregate<ID : Any>

Models the minimal set of aggregate operations. Holds the localId of the device executing the aggregate program.

Link copied to clipboard
sealed interface DataSharingMethod<in DataType>

A method to share data between nodes in a network.

Link copied to clipboard

Represents methods intended to be used internally only. The usage of these methods is discouraged and should be avoided.

Link copied to clipboard

In-memory share. No serialization. Working only across multiple nodes hosted on the same operating system (for instance, in simulation).

Link copied to clipboard
value class Serialize<DataType>(val serializer: KSerializer<DataType>) : DataSharingMethod<DataType>

Serialization-based share using kotlinx.serialization. The data is serialized and deserialized using the provided serializer.

Link copied to clipboard

Context for yielding operations (exchanging, sharing). Yielding operations operate on a Shared value (usually exchanged with neighbors), but return a differently typed value Returned to the caller.

Link copied to clipboard
data class YieldingResult<Shared, Return>(val toSend: Shared, val toReturn: Return)

Specifies the value toSend and the value toReturn of a yielding operator.

Functions

Link copied to clipboard
inline fun <ID : Any, Shared> Aggregate<ID>.exchange(initial: Shared, noinline body: (Field<ID, Shared>) -> Field<ID, Shared>): Field<ID, Shared>

exchange implements anisotropic data sharing (namely, the field information looks different depending on the direction from which you are observing it).

Link copied to clipboard
inline fun <ID : Any, Shared, Returned> Aggregate<ID>.exchanging(initial: Shared, noinline body: YieldingScope<Field<ID, Shared>, Returned>): Returned

exchange implements anisotropic data sharing (the field information looks different depending on the direction from which you are observing it).

Link copied to clipboard
inline fun <ID : Any, T> Aggregate<ID>.mapNeighborhood(crossinline local: (ID) -> T): Field<ID, T>

Observes the value of an expression local across neighbors. Builds a Field with minimal communication, using only the minimal machinery required to verify the alignment state. This function is recommended over

Link copied to clipboard

builds a Field of aligned IDs with minimal communication.

Link copied to clipboard
inline fun <ID : Any, Shared> Aggregate<ID>.neighboring(local: Shared): Field<ID, Shared>

Observes the value of an expression local across neighbors.

Link copied to clipboard
inline fun <ID : Any, Shared> Aggregate<ID>.share(initial: Shared, noinline body: (Field<ID, Shared>) -> Shared): Shared

share implements efficient stateful data sharing.

Link copied to clipboard

sharing implements efficient stateful data sharing.