Collektive is a Kotlin multiplatform implementation of Aggregate Programming, built from the experience gained with Protelis and Scala Fields (Scafi)
Documentation for Collektive is (will) be available at https://collektive.github.io/
Collektive builds on the idea of implementing the core mechanisms of the field calculus, including exchange, directly into the Kotlin compiler, so that aggregate programs can get written in plain Kotlin.
To do so, we use a compiler plugin that changes the behavior of the Kotlin compiler, annotating the points in code where a program may need to "align", and "projecting" fields when branching (or boolean short-circuiting operations) are detected.
First of all, add the following plugin to your build.gradle.kts
file:
plugins {
id("it.unibo.collektive.collektive-plugin") version "<latest version>"
}
Then import the domain-specific language and the standard library.
JVM:
dependencies {
implementation("it.unibo.collektive:collektive-dsl:<latest version>")
impl
7C1F
ementation("it.unibo.collektive:collektive-stdlib:<latest version>")
}
Multiplatform:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("it.unibo.collektive:collektive-dsl:<latest version>")
implementation("it.unibo.collektive:collektive-stdlib:<latest version>")
}
}
}
}