Experimental Differential Dataflow port for MoonBit; upstream runtime compatibility is incomplete
moon add bobzhang/differential@0.1.0///|
test "reprice existing orders incrementally" {
let worker = @differential.Worker()
let (orders, order_stream) : (
@differential.InputSession[(Int32, String), Int64, Int64],
@differential.Collection[(Int32, String), Int64, Int64],
) = worker.input(0)
let (prices, price_stream) : (
@differential.InputSession[(Int32, Int64), Int64, Int64],
@differential.Collection[(Int32, Int64), Int64, Int64],
) = worker.input(0)
let changes = []
let probe = order_stream
.join_map(price_stream, fn(_, customer, price) { (customer, price) }, multiply=fn(
quantity,
present,
) {
quantity * present
})
.reduce(fn(_, values) {
let mut total = 0L
for (price, quantity) in values {
total += price * quantity
}
[(total, 1L)]
})
.inspect(fn(data, time, diff) { changes.push((data, time, diff)) })
orders.update((1, "Alice"), 3)
prices.insert((1, 7))
orders.advance_to(1)
prices.advance_to(1)
orders.flush()
prices.flush()
assert_true(worker.run() is Quiescent(_))
prices.remove((1, 7))
prices.insert((1, 9))
orders.close()
prices.close()
assert_true(worker.run() is Quiescent(_))
assert_true(probe.done())
assert_eq(changes, [
(("Alice", 21L), 0L, 1L),
(("Alice", 21L), 1L, -1L),
(("Alice", 27L), 1L, 1L),
])
worker.dispose()
}///|
test "fixed point updates after a root changes" {
let worker = @differential.Worker()
let scope = worker.scope(0L, @differential.SummaryDomain::int64())
let (input, roots) : (
@differential.InputSession[Int32, Int64, Int64],
@differential.Collection[Int32, Int64, Int64],
) = scope.input()
let reachable = scope.iterate(roots, fn(_, values) {
values
.concat(
values.flat_map(fn(node) { if node < 5 { [node + 1] } else { [] } }),
)
.distinct()
})
let counts : Map[Int32, Int64] = Map([])
let probe = reachable.inspect(fn(node, _, diff) {
counts[node] = counts.get(node).unwrap_or(0) + diff
})
input.insert(2)
input.advance_to(1)
input.flush()
assert_true(worker.run() is Quiescent(_))
assert_true(!probe.less_than(1))
assert_eq(counts.get(3), Some(1L))
input.remove(2)
input.insert(4)
input.close()
assert_true(worker.run() is Quiescent(_))
assert_true(probe.done())
assert_eq(counts.get(3), Some(0L))
assert_eq(counts.get(5), Some(1L))
worker.dispose()
}moon fmt --check
moon check --target all --warn-list +unnecessary_annotation --deny-warn
moon test --target all
# Restore pinned references using UPSTREAM.md first:
python3 validation/compare.py
python3 validation/cluster_compare.py
python3 validation/transport_failures.py
python3 validation/journal_check.py
# Optional Clang ASan/LSan validation:
python3 validation/sanitize_cluster.pypub(open) trait Lattice : Compare {
fn less_equal(Self, Self) -> Bool
fn join(Self, Self) -> Self
fn meet(Self, Self) -> Self
}pub(open) trait Semigroup {
fn plus(Self, Self) -> Self
fn is_zero(Self) -> Bool
}impl TotalOrder for Unitimpl TotalOrder for Byteimpl TotalOrder for Intimpl TotalOrder for Int16impl TotalOrder for Int64impl TotalOrder for UIntimpl TotalOrder for UInt16impl TotalOrder for UInt64pub struct Activator {
// private fields
}pub struct Antichain[T] {
// private fields
}pub struct Arranged[K, V, T, R] {
// private fields
}pub struct ArrangementView[K, V, T, R] {
// private fields
}fn[K, V, T, R] ArrangementView::as_collection(self : ArrangementView[K, V, T, R]) -> Collection[(K, V), T, R]fn[K, V, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] ArrangementView::enter(self : ArrangementView[K, V, A, R], nested : NestedScope[A, B, S, U]) -> ArrangementView[K, V, Product[A, B], R]fn[K, V, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] ArrangementView::enter_at(self : ArrangementView[K, V, A, R], nested : NestedScope[A, B, S, U], assign : ((K, V), A) -> B, prior : (Product[A, B]) -> A) -> ArrangementView[K, V, Product[A, B], R]fn[K, V, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] ArrangementView::enter_refined(self : ArrangementView[K, V, A, R], nested : RefinedScope[A, B, S, U]) -> ArrangementView[K, V, B, R]fn[K : Compare + Eq, V, W, T : Lattice + Compare + Eq] ArrangementView::join(self : ArrangementView[K, V, T, Int64], other : ArrangementView[K, W, T, Int64], fuel? : Int) -> Collection[(K, (V, W)), T, Int64]fn[K : Compare + Eq, V, W, D, T : Lattice + Compare + Eq, R, S, O] ArrangementView::join_map(self : ArrangementView[K, V, T, R], other : ArrangementView[K, W, T, S], logic : (K, V, W) -> D, multiply~ : (R, S) -> O, fuel? : Int) -> Collection[D, T, O]fn[K, V, T, R] ArrangementView::trace(self : ArrangementView[K, V, T, R]) -> TraceReader[(K, V), T, R]pub struct AsyncExchange {
// private fields
}fn AsyncExchange::AsyncExchange(start~ : (String) -> Unit raise, poll~ : () -> Array[String]? raise) -> AsyncExchangepub struct Batch[D, T, R] {
// private fields
}pub struct BatchBuilder[D, T, R] {
// private fields
}fn[D, T, R] BatchBuilder::done(self : BatchBuilder[D, T, R], description : Description[T]) -> Batch[D, T, R]fn[D : Compare + Eq, T : Compare + Eq, R : Semigroup] BatchBuilder::push(self : BatchBuilder[D, T, R], chunk : Array[(D, T, R)]) -> Unitpub struct BatchMerger[D, T, R] {
// private fields
}fn[D, T : Lattice + Compare + Eq, R] BatchMerger::BatchMerger(left : Batch[D, T, R], right : Batch[D, T, R], since : Antichain[T]) -> BatchMerger[D, T, R]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] BatchMerger::work(self : BatchMerger[D, T, R], fuel : Int) -> Intpub struct BatchView[D, T, R] {
// private fields
}fn[D, T, R] BatchView::BatchView(length : Int, description : Description[T], read~ : (Int) -> (D, T, R)) -> BatchView[D, T, R]pub struct Batcher[D, T, R] {
// private fields
}pub struct BytesSource {
// private fields
}pub struct BytesStore {
// private fields
}pub struct Capability[T, S] {
// private fields
}fn[T : Lattice + Compare + Eq, S] Capability::delayed(self : Capability[T, S], time : T) -> Capability[T, S]fn[T : Lattice + Compare + Eq, S] Capability::try_delayed(self : Capability[T, S], time : T) -> Capability[T, S]?fn[T : Lattice + Compare + Eq, S] Capability::try_downgrade(self : Capability[T, S], time : T) -> Boolfn[T, S] Capability::valid_for(self : Capability[T, S], tracker : ProgressTracker[T, S], port : Int) -> Boolpub struct CapabilitySet[T, S] {
// private fields
}fn[T : Lattice + Compare + Eq, S] CapabilitySet::CapabilitySet(capability : Capability[T, S]) -> CapabilitySet[T, S]fn[T : Lattice + Compare + Eq, S] CapabilitySet::insert(self : CapabilitySet[T, S], capability : Capability[T, S]) -> Unitfn[T : Lattice + Compare + Eq, S] CapabilitySet::try_delayed(self : CapabilitySet[T, S], time : T) -> Capability[T, S]?fn[T : Lattice + Compare + Eq, S] CapabilitySet::try_downgrade(self : CapabilitySet[T, S], times : Array[T]) -> Boolpub struct CaptureHandle {
// private fields
}fn[D, T : Lattice + Compare + Eq, R] CaptureMessage::codec(data : WireCodec[D], time : WireCodec[T], diff : WireCodec[R]) -> WireCodec[CaptureMessage[D, T, R]]pub struct CaptureProgress[T] {
// private fields
}fn[T : Lattice + Compare + Eq] CaptureProgress::CaptureProgress(lower : Antichain[T], upper : Antichain[T], counts : Array[(T, Int64)]) -> CaptureProgress[T]pub struct CaptureWriter[D, T, R] {
// private fields
}fn[D, T, R] CaptureWriter::CaptureWriter(poll~ : (CaptureMessage[D, T, R]) -> Duration?, done~ : () -> Bool) -> CaptureWriter[D, T, R]pub struct ChangeBatch[T] {
// private fields
}fn[T : Compare + Eq] ChangeBatch::update_all(self : ChangeBatch[T], changes : Array[(T, Int64)]) -> Unitpub struct ClusterWorker {
// private fields
}fn ClusterWorker::ClusterWorker(index : Int, peers : Int, exchange? : (String) -> Array[String] raise, async_exchange? : AsyncExchange) -> ClusterWorkerfn[T : Lattice + Compare + Eq, S : Compare + Eq] ClusterWorker::scope(self : ClusterWorker, minimum : T, domain : SummaryDomain[T, S], time_codec~ : WireCodec[T], summary_codec~ : WireCodec[S]) -> DistributedScope[T, S]pub struct Collection[D, T, R] {
// private fields
}fn[K : Compare + Hash + Eq, V : Compare + Eq, T : Lattice + Compare + Eq] Collection::antijoin(self : Collection[(K, V), T, Int64], keys : Collection[K, T, Int64]) -> Collection[(K, V), T, Int64]fn[K : Compare + Eq, V : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] Collection::arrange_by_key(self : Collection[(K, V), T, R], fueled? : Bool, columnar? : Bool, spill? : SpillPolicy[(K, V), T, R]) -> Arranged[K, V, T, R]fn[K : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] Collection::arrange_by_self(self : Collection[K, T, R], fueled? : Bool, columnar? : Bool, spill? : SpillPolicy[(K, Unit), T, R]) -> Arranged[K, Unit, T, R]fn[K : Compare + Hash + Eq, V : Compare + Eq, T : TotalOrder + Lattice + Compare + Eq] Collection::arrange_from_upsert(self : Collection[(K, V?), T, Present]) -> Arranged[K, V, T, Int64]fn[K : Compare + Eq, V : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] Collection::arrange_with(self : Collection[(K, V), T, R], factory : (Antichain[T]) -> TraceBackend[(K, V), T, R]) -> ArrangementView[K, V, T, R]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] Collection::assert_empty(self : Collection[D, T, R]) -> Probe[T]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Abelian + Monoid + Semigroup] Collection::assert_eq(self : Collection[D, T, R], other : Collection[D, T, R]) -> Probe[T]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] Collection::capture(self : Collection[D, T, R], emit : (CaptureMessage[D, T, R]) -> Unit) -> Probe[T]fn[D, T : Lattice + Compare + Eq, R] Collection::concat(self : Collection[D, T, R], other : Collection[D, T, R]) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R] Collection::concatenate(self : Collection[D, T, R], sources : Array[Collection[D, T, R]]) -> Collection[D, T, R]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] Collection::consolidate(self : Collection[D, T, R]) -> Collection[D, T, R]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] Collection::consolidate_stream(self : Collection[D, T, R]) -> Collection[D, T, R]fn[D : Compare + Hash + Eq, T : Lattice + Compare + Eq, R : Semigroup + Compare + Eq] Collection::count(self : Collection[D, T, R]) -> Collection[(D, R), T, Int64]fn[D, T : Lattice + Compare + Eq, R] Collection::delay(self : Collection[D, T, R], advance : (T) -> T) -> Collection[D, T, R]fn[D : Compare + Hash + Eq, T : Lattice + Compare + Eq, R : Semigroup] Collection::distinct(self : Collection[D, T, R]) -> Collection[D, T, Int64]fn[D, A, B, R] Collection::enter_dynamic(self : Collection[D, Product[A, PointStamp[B]], R], level : Int) -> Collection[D, Product[A, PointStamp[B]], R]fn[D, E, T : Lattice + Compare + Eq, R, S] Collection::explode(self : Collection[D, T, R], logic : (D) -> Array[(E, (R) -> S)]) -> Collection[E, T, S]fn[D, T : Lattice + Compare + Eq, R] Collection::filter(self : Collection[D, T, R], predicate : (D) -> Bool) -> Collection[D, T, R]fn[D, E, T : Lattice + Compare + Eq, R] Collection::flat_map(self : Collection[D, T, R], logic : (D) -> Array[E]) -> Collection[E, T, R]fn[D, T : Lattice + Compare + Eq, R] Collection::inspect(self : Collection[D, T, R], logic : (D, T, R) -> Unit) -> Probe[T]fn[D, T : Lattice + Compare + Eq, R] Collection::inspect_batch(self : Collection[D, T, R], logic : (T, Array[(D, T, R)]) -> Unit) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R] Collection::inspect_container(self : Collection[D, T, R], logic : (CollectionEvent[D, T, R]) -> Unit) -> Collection[D, T, R]fn[K : Compare + Hash + Eq, V : Compare + Eq, W : Compare + Eq, T : Lattice + Compare + Eq] Collection::join(self : Collection[(K, V), T, Int64], other : Collection[(K, W), T, Int64]) -> Collection[(K, (V, W)), T, Int64]fn[D, E, T : Lattice + Compare + Eq, R, S, O] Collection::join_function(self : Collection[D, T, R], logic : (D) -> Array[(E, T, S)], multiply~ : (S, R) -> O) -> Collection[E, T, O]fn[K : Compare + Hash + Eq, V : Compare + Eq, W : Compare + Eq, D, T : Lattice + Compare + Eq, R : Semigroup, S : Semigroup, O] Collection::join_map(self : Collection[(K, V), T, R], other : Collection[(K, W), T, S], logic : (K, V, W) -> D, multiply~ : (R, S) -> O) -> Collection[D, T, O]fn[D, E, T : Lattice + Compare + Eq, R] Collection::map(self : Collection[D, T, R], logic : (D) -> E) -> Collection[E, T, R]fn[D, T : Lattice + Compare + Eq, R] Collection::map_in_place(self : Collection[D, T, R], logic : (Ref[D]) -> Unit) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R : Abelian + Monoid + Semigroup] Collection::negate(self : Collection[D, T, R]) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R] Collection::probe_with(self : Collection[D, T, R], probe : Probe[T]) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R, S] Collection::results_in(self : Collection[D, T, R], step : S, domain : SummaryDomain[T, S]) -> Collection[D, T, R]fn[K : Compare + Hash + Eq, V : Compare + Eq, T : Lattice + Compare + Eq] Collection::semijoin(self : Collection[(K, V), T, Int64], keys : Collection[K, T, Int64]) -> Collection[(K, V), T, Int64]fn[D : Compare + Hash + Eq, T : Lattice + Compare + Eq, R : Semigroup, S : Abelian + Monoid + Semigroup] Collection::threshold(self : Collection[D, T, R], logic : (D, R) -> S) -> Collection[D, T, S]pub struct ColumnCodec[A] {
// private fields
}fn[A] ColumnCodec::ColumnCodec(slices~ : Int, encode~ : (Array[A]) -> Array[Bytes], decode~ : (Array[BytesView], Int) -> Array[A]?) -> ColumnCodec[A]fn[A, B] ColumnCodec::map(self : ColumnCodec[A], encode : (B) -> A, decode : (A) -> B?) -> ColumnCodec[B]fn[A, B] ColumnCodec::product(outer : ColumnCodec[A], inner : ColumnCodec[B]) -> ColumnCodec[Product[A, B]]pub struct ColumnLists[A] {
// private fields
}fn[A] ColumnLists::retain_items(self : ColumnLists[A], keep : Array[Bool]) -> (ColumnLists[A], Array[Bool])pub struct ColumnarBatch[K, V, T, R] {
// private fields
}fn[K : Eq, V : Eq, T, R] ColumnarBatch::batch(self : ColumnarBatch[K, V, T, R]) -> Batch[(K, V), T, R]pub struct ColumnarCodec[K, V, T, R] {
// private fields
}fn[K, V, T, R] ColumnarCodec::ColumnarCodec(key : ColumnCodec[K], val : ColumnCodec[V], time : ColumnCodec[T], diff : ColumnCodec[R]) -> ColumnarCodec[K, V, T, R]fn[K, V, T, R] ColumnarCodec::decode(self : ColumnarCodec[K, V, T, R], bytes : BytesView, max_values? : Int) -> UpdatesTyped[K, V, T, R]?fn[K, V, T, R] ColumnarCodec::encode(self : ColumnarCodec[K, V, T, R], updates : UpdatesTyped[K, V, T, R]) -> Bytesfn[K : Compare + Eq, V : Compare + Eq, T : Compare + Eq, R : Semigroup] ColumnarCodec::spill_policy(self : ColumnarCodec[K, V, T, R], budget_records : Int64, store~ : BytesStore, chunk_size? : Int) -> SpillPolicy[(K, V), T, R]pub struct Cursor[K, V, T, R] {
// private fields
}pub struct Description[T] {
// private fields
}fn[T : Lattice + Compare + Eq] Description::Description(lower : Antichain[T], upper : Antichain[T], since : Antichain[T]) -> Description[T]pub(all) enum DifferentialEvent {
BatchCreated(BatchEvent)
MergeProgress(MergeEvent)
BatchDropped(DropEvent)
MergeShortfall(MergeShortfall)
TraceShare(TraceShare)
BatcherSize(BatcherEvent)
} derive(Eq, Debug)pub struct DistributedNestedScope[A, B, S, U] {
// private fields
}fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] DistributedNestedScope::enter(self : DistributedNestedScope[A, B, S, U], source : Collection[D, A, R]) -> Collection[D, Product[A, B], R]fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] DistributedNestedScope::leave(self : DistributedNestedScope[A, B, S, U], source : Collection[D, Product[A, B], R]) -> Collection[D, A, R]fn[A, B, S, U] DistributedNestedScope::scope(self : DistributedNestedScope[A, B, S, U]) -> DistributedScope[Product[A, B], Product[S, U]]pub struct DistributedScope[T, S] {
// private fields
}fn[D, T : Lattice + Compare + Eq, R, S] DistributedScope::exchange(self : DistributedScope[T, S], source : Collection[D, T, R], hash : (D) -> UInt64, data_codec~ : WireCodec[D], time_codec~ : WireCodec[T], diff_codec~ : WireCodec[R]) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R, S] DistributedScope::input(self : DistributedScope[T, S]) -> (InputSession[D, T, R], Collection[D, T, R])fn[D, T : Lattice + Compare + Eq, R : Abelian + Monoid + Semigroup, S : Compare + Eq] DistributedScope::iterate(self : DistributedScope[T, S], source : Collection[D, T, R], logic : (DistributedScope[Product[T, Int64], Product[S, Int64]], Collection[D, Product[T, Int64], R]) -> Collection[D, Product[T, Int64], R]) -> Collection[D, T, R]fn[A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, S : Compare + Eq, U : Compare + Eq] DistributedScope::nested(self : DistributedScope[A, S], minimum : B, domain : SummaryDomain[B, U], time_codec~ : WireCodec[B], summary_codec~ : WireCodec[U]) -> DistributedNestedScope[A, B, S, U]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Compare + Eq, S] DistributedScope::replay_from(self : DistributedScope[T, S], build_source : (Activator) -> (() -> CaptureMessage[D, T, R]?), codec~ : WireCodec[CaptureMessage[D, T, R]], hash~ : (D) -> UInt64, time_hash? : (T) -> UInt64, messages_per_turn? : Int) -> (CaptureHandle, Collection[D, T, R])impl TotalOrder for Durationpub struct Feedback[D, T, R, S] {
// private fields
}pub struct FnvHasher {
// private fields
}pub struct InputCapability[T, S] {
// private fields
}fn[D, T : Lattice + Compare + Eq, R, S] InputCapability::delayed(self : InputCapability[T, S], output : Output[D, T, R, S], time : T) -> Capability[T, S]fn[D, T : Lattice + Compare + Eq, R, S] InputCapability::try_delayed(self : InputCapability[T, S], output : Output[D, T, R, S], time : T) -> Capability[T, S]?pub struct InputSession[D, T, R] {
// private fields
}fn[D, T : Lattice + Compare + Eq, R] InputSession::InputSession(initial : T, deliver~ : (Array[(D, T, R)], Antichain[T]) -> Unit, buffer_limit? : Int) -> InputSession[D, T, R]fn[D, T : Lattice + Compare + Eq, R] InputSession::advance_to(self : InputSession[D, T, R], time : T) -> Unitfn[D, T : Lattice + Compare + Eq, R] InputSession::frontier(self : InputSession[D, T, R]) -> Antichain[T]fn[D, T : Lattice + Compare + Eq] InputSession::insert(self : InputSession[D, T, Int64], data : D) -> Unitfn[D, T : Lattice + Compare + Eq] InputSession::remove(self : InputSession[D, T, Int64], data : D) -> Unitfn[D, T : Lattice + Compare + Eq, R] InputSession::update(self : InputSession[D, T, R], data : D, diff : R) -> Unitfn[D, T : Lattice + Compare + Eq, R] InputSession::update_at(self : InputSession[D, T, R], data : D, time : T, diff : R) -> Unitimpl TotalOrder for Int128impl TotalOrder for Int8pub struct LogRegistry[E] {
// private fields
}pub struct Logger[E] {
// private fields
}pub struct MutableAntichain[T] {
// private fields
}fn[T : Lattice + Compare + Eq] MutableAntichain::count_for(self : MutableAntichain[T], time : T) -> Int64fn[T : Lattice + Compare + Eq] MutableAntichain::frontier(self : MutableAntichain[T]) -> Antichain[T]fn[T : Lattice + Compare + Eq] MutableAntichain::update_all(self : MutableAntichain[T], changes : Array[(T, Int64)]) -> Array[(T, Int64)]fn[T : Lattice + Compare + Eq] MutableAntichain::updates(self : MutableAntichain[T]) -> Array[(T, Int64)]pub struct NestedScope[A, B, S, U] {
// private fields
}fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] NestedScope::enter(self : NestedScope[A, B, S, U], source : Collection[D, A, R]) -> Collection[D, Product[A, B], R]fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] NestedScope::enter_at(self : NestedScope[A, B, S, U], source : Collection[D, A, R], assign : (D, A) -> B) -> Collection[D, Product[A, B], R]fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] NestedScope::leave(self : NestedScope[A, B, S, U], source : Collection[D, Product[A, B], R]) -> Collection[D, A, R]fn[A, B, S, U] NestedScope::scope(self : NestedScope[A, B, S, U]) -> Scope[Product[A, B], Product[S, U]]pub struct NestedScopeGroup[A, B, S, U] {
// private fields
}fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] NestedScopeGroup::enter(self : NestedScopeGroup[A, B, S, U], sources : Array[Collection[D, A, R]]) -> Array[Collection[D, Product[A, B], R]]fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] NestedScopeGroup::leave(self : NestedScopeGroup[A, B, S, U], sources : Array[Collection[D, Product[A, B], R]]) -> Array[Collection[D, A, R]]fn[A, B, S, U] NestedScopeGroup::scope(self : NestedScopeGroup[A, B, S, U]) -> ScopeGroup[Product[A, B], Product[S, U]]pub struct Notificator[T, S] {
// private fields
}fn[T : Lattice + Compare + Eq, S] Notificator::drain_ready(self : Notificator[T, S], frontiers : Array[Antichain[T]]) -> Array[(Capability[T, S], Int64)]fn[T : Lattice + Compare + Eq, S] Notificator::request(self : Notificator[T, S], capability : Capability[T, S]) -> Unitpub struct OperatorBuilder[T, S] {
// private fields
}fn[T : Compare + Eq, S] OperatorBuilder::build(self : OperatorBuilder[T, S], construct : (Array[Capability[T, S]]) -> (() -> Unit), on_shutdown? : () -> Unit) -> Unitfn[T : Compare + Eq, S] OperatorBuilder::build_reschedule(self : OperatorBuilder[T, S], construct : (Array[Capability[T, S]]) -> (() -> Bool), on_shutdown? : () -> Unit) -> Unitfn[D, T : Lattice + Compare + Eq, R, S] OperatorBuilder::new_input(self : OperatorBuilder[T, S], source : Collection[D, T, R]) -> OperatorInput[D, T, R, S]fn[D, T : Lattice + Compare + Eq, R, S] OperatorBuilder::new_output(self : OperatorBuilder[T, S]) -> (Output[D, T, R, S], Collection[D, T, R])fn[D, E, T, R, U, S] OperatorBuilder::set_connection(self : OperatorBuilder[T, S], input : OperatorInput[D, T, R, S], output : Output[E, T, U, S], summaries : Array[S]) -> Unitpub(all) enum OperatorEvent[D, T, R, S] {
Data(Capability[T, S], Array[(D, R)])
Progress(Antichain[T])
}pub struct OperatorInput[D, T, R, S] {
// private fields
}fn[D, T : Lattice + Compare + Eq, R, S] OperatorInput::for_each(self : OperatorInput[D, T, R, S], consume : (InputCapability[T, S], Array[(D, R)]) -> Unit) -> Unitfn[D, T : Lattice + Compare + Eq, R, S] OperatorInput::for_each_batch(self : OperatorInput[D, T, R, S], consume : (InputCapability[T, S], Array[(D, T, R)]) -> Unit) -> Unitfn[D, T : Lattice + Compare + Eq, R, S] OperatorInput::frontier(self : OperatorInput[D, T, R, S]) -> Antichain[T]pub struct Output[D, T, R, S] {
// private fields
}impl Lattice for PointStamp[T]fn[T : Timestamp + Lattice + Compare + Eq] join(self : PointStamp[T], other : PointStamp[T]) -> PointStamp[T]fn[T : Timestamp + Lattice + Compare + Eq] less_equal(self : PointStamp[T], other : PointStamp[T]) -> Boolfn[T : Timestamp + Lattice + Compare + Eq] meet(self : PointStamp[T], other : PointStamp[T]) -> PointStamp[T]impl Timestamp for PointStamp[T]impl Compare for PointStamp[T]fn[T : Timestamp + Lattice + Compare + Eq] PointStamp::PointStamp(vector : Array[T]) -> PointStamp[T]fn[T : Timestamp + Lattice + Compare + Eq] PointStamp::join(self : PointStamp[T], other : PointStamp[T]) -> PointStamp[T]fn[T : Timestamp + Lattice + Compare + Eq] PointStamp::less_equal(self : PointStamp[T], other : PointStamp[T]) -> Boolfn[T : Timestamp + Lattice + Compare + Eq] PointStamp::meet(self : PointStamp[T], other : PointStamp[T]) -> PointStamp[T]impl Compare for PointStampSummary[S]fn[S] PointStampSummary::PointStampSummary(actions : Array[S], retain? : Int) -> PointStampSummary[S]fn[S : Compare + Eq] PointStampSummary::compare(self : PointStampSummary[S], other : PointStampSummary[S]) -> Intfn[S : Compare + Eq] PointStampSummary::op_ge(x : PointStampSummary[S], y : PointStampSummary[S]) -> Boolfn[S : Compare + Eq] PointStampSummary::op_gt(x : PointStampSummary[S], y : PointStampSummary[S]) -> Boolfn[S : Compare + Eq] PointStampSummary::op_le(x : PointStampSummary[S], y : PointStampSummary[S]) -> Boolfn[S : Compare + Eq] PointStampSummary::op_lt(x : PointStampSummary[S], y : PointStampSummary[S]) -> Boolpub struct Probe[T] {
// private fields
}pub struct ProgressGraph[T, S] {
// private fields
}fn[T, S : Compare + Eq] ProgressGraph::compile(self : ProgressGraph[T, S], max_steps? : Int) -> Reachability[T, S]?fn[T, S] ProgressGraph::connect(self : ProgressGraph[T, S], source : Int, target : Int, summary : S) -> Unitpub struct ProgressTracker[T, S] {
// private fields
}fn[T : Lattice + Compare + Eq, S] ProgressTracker::ProgressTracker(reachability : Reachability[T, S]) -> ProgressTracker[T, S]fn[T : Lattice + Compare + Eq, S] ProgressTracker::capability(self : ProgressTracker[T, S], port : Int, time : T) -> Capability[T, S]fn[T : Lattice + Compare + Eq, S] ProgressTracker::frontier(self : ProgressTracker[T, S], port : Int) -> Antichain[T]fn[T : Lattice + Compare + Eq, S] ProgressTracker::propagate(self : ProgressTracker[T, S]) -> Array[(Int, T, Int64)]fn[T : Lattice + Compare + Eq, S] ProgressTracker::update(self : ProgressTracker[T, S], port : Int, time : T, delta : Int64) -> Unitpub struct Reachability[T, S] {
// private fields
}pub struct RefinedScope[A, B, S, U] {
// private fields
}fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] RefinedScope::enter(self : RefinedScope[A, B, S, U], source : Collection[D, A, R]) -> Collection[D, B, R]fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] RefinedScope::enter_at(self : RefinedScope[A, B, S, U], source : Collection[D, A, R], assign : (D, A) -> B) -> Collection[D, B, R]fn[D, A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, R, S, U] RefinedScope::leave(self : RefinedScope[A, B, S, U], source : Collection[D, B, R]) -> Collection[D, A, R]pub struct Refinement[A, B, S, U] {
// private fields
}fn[A, B, S, U] Refinement::Refinement(lift~ : (A) -> B, project~ : (B) -> A, summarize~ : (U) -> S) -> Refinement[A, B, S, U]pub struct ReplayInput[D, T, R] {
// private fields
}fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Compare + Eq] ReplayInput::push(self : ReplayInput[D, T, R], message : CaptureMessage[D, T, R]) -> Unitpub struct Replayer[D, T, R] {
// private fields
}pub struct Scope[T, S] {
// private fields
}fn[N : Compare + Hash + Eq, T : Lattice + Compare + Eq, S : Compare + Eq] Scope::bfs(self : Scope[T, S], edges : Collection[(N, N), T, Int64], roots : Collection[N, T, Int64]) -> Collection[(N, UInt), T, Int64]fn[N : Compare + Hash + Eq, T : Lattice + Compare + Eq, S : Compare + Eq] Scope::bfs_arranged(self : Scope[T, S], edges : ArrangementView[N, N, T, Int64], roots : Collection[N, T, Int64]) -> Collection[(N, UInt), T, Int64]fn[N : Compare + Hash + Eq, T : Lattice + Compare + Eq, S : Compare + Eq] Scope::bidijkstra(self : Scope[T, S], graph : Collection[(N, N), T, Int64], goals : Collection[(N, N), T, Int64]) -> Collection[((N, N), UInt), T, Int64]fn[N : Compare + Hash + Eq, T : Lattice + Compare + Eq, S : Compare + Eq] Scope::bidijkstra_arranged(self : Scope[T, S], forward : ArrangementView[N, N, T, Int64], reverse : ArrangementView[N, N, T, Int64], goals : Collection[(N, N), T, Int64]) -> Collection[((N, N), UInt), T, Int64]fn[K : Compare + Hash + Eq, D : Compare + Hash + Eq, T : Lattice + Compare + Eq, S : Compare + Eq] Scope::broadcast_prefix(self : Scope[T, S], ranges : Collection[((UInt64, Int, K), D), T, Int64], queries : Collection[(UInt64, K), T, Int64], zero : D, combine : (K, D, D) -> D) -> Collection[((UInt64, K), D), T, Int64]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup, S] Scope::capture_to(self : Scope[T, S], source : Collection[D, T, R], writer : CaptureWriter[D, T, R]) -> CaptureHandlefn[D, T : Lattice + Compare + Eq, R, S] Scope::concatenate(self : Scope[T, S], sources : Array[Collection[D, T, R]]) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R, S] Scope::input(self : Scope[T, S]) -> (InputSession[D, T, R], Collection[D, T, R])fn[D, T : Lattice + Compare + Eq, R : Abelian + Monoid + Semigroup, S : Compare + Eq] Scope::iterate(self : Scope[T, S], source : Collection[D, T, R], logic : (Scope[Product[T, Int64], Product[S, Int64]], Collection[D, Product[T, Int64], R]) -> Collection[D, Product[T, Int64], R]) -> Collection[D, T, R]fn[D, A : Lattice + Compare + Eq, B : Timestamp + Lattice + Compare + Eq, R, S, U] Scope::leave_dynamic(self : Scope[Product[A, PointStamp[B]], Product[S, PointStampSummary[U]]], source : Collection[D, Product[A, PointStamp[B]], R], level : Int) -> Collection[D, Product[A, PointStamp[B]], R]fn[K : Compare + Hash + Eq, D : Compare + Hash + Eq, T : Lattice + Compare + Eq, S : Compare + Eq] Scope::prefix_sum_at(self : Scope[T, S], source : Collection[((UInt64, K), D), T, Int64], locations : Collection[(UInt64, K), T, Int64], zero : D, combine : (K, D, D) -> D) -> Collection[((UInt64, K), D), T, Int64]fn[A, B : Lattice + Compare + Eq, S, U : Compare + Eq] Scope::refine(self : Scope[A, S], domain : SummaryDomain[B, U], refinement : Refinement[A, B, S, U]) -> RefinedScope[A, B, S, U]fn[D, T : Lattice + Compare + Eq, R, S] Scope::replay(self : Scope[T, S]) -> (ReplayInput[D, T, R], Collection[D, T, R])fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Compare + Eq, S] Scope::replay_from(self : Scope[T, S], build_source : (Activator) -> (() -> CaptureMessage[D, T, R]?), messages_per_turn? : Int) -> (CaptureHandle, Collection[D, T, R])fn[D, T : Lattice + Compare + Eq, R, S] Scope::source(self : Scope[T, S]) -> (Output[D, T, R, S], Capability[T, S], Collection[D, T, R])fn[D, E, T : Lattice + Compare + Eq, R, U, S] Scope::unary(self : Scope[T, S], source : Collection[D, T, R], build : (Output[E, T, U, S], Capability[T, S]) -> ((OperatorEvent[D, T, R, S]) -> Unit)) -> Collection[E, T, U]pub struct ScopeGroup[T, S] {
// private fields
}fn[D, T : Lattice + Compare + Eq, R, S] ScopeGroup::exchange(self : ScopeGroup[T, S], inputs : Array[Collection[D, T, R]], hash : (D) -> UInt64) -> Array[Collection[D, T, R]]fn[D, T : Lattice + Compare + Eq, R, S] ScopeGroup::input(self : ScopeGroup[T, S]) -> Array[(InputSession[D, T, R], Collection[D, T, R])]fn[D, T : Lattice + Compare + Eq, R : Abelian + Monoid + Semigroup, S : Compare + Eq] ScopeGroup::iterate(self : ScopeGroup[T, S], sources : Array[Collection[D, T, R]], logic : (ScopeGroup[Product[T, Int64], Product[S, Int64]], Array[Collection[D, Product[T, Int64], R]]) -> Array[Collection[D, Product[T, Int64], R]]) -> Array[Collection[D, T, R]]fn[A : Lattice + Compare + Eq, B : Lattice + Compare + Eq, S : Compare + Eq, U : Compare + Eq] ScopeGroup::nested(self : ScopeGroup[A, S], minimum : B, domain : SummaryDomain[B, U]) -> NestedScopeGroup[A, B, S, U]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Compare + Eq, S] ScopeGroup::replay_from(self : ScopeGroup[T, S], build_source : (Int, Activator) -> (() -> CaptureMessage[D, T, R]?), hash~ : (D) -> UInt64, time_hash? : (T) -> UInt64, messages_per_turn? : Int) -> Array[(CaptureHandle, Collection[D, T, R])]impl Abelian for SingletonDiff[R]impl Monoid for SingletonDiff[R]impl Semigroup for SingletonDiff[R]fn[R : Abelian + Monoid + Semigroup] SingletonDiff::negate(self : SingletonDiff[R]) -> SingletonDiff[R]fn[R : Semigroup] SingletonDiff::plus(self : SingletonDiff[R], other : SingletonDiff[R]) -> SingletonDiff[R]fn[R, S, O] SingletonDiff::scale(self : SingletonDiff[R], scalar : S, multiply : (R, S) -> O) -> SingletonDiff[O]pub struct SpillPolicy[D, T, R] {
// private fields
}fn[D, T, R] SpillPolicy::SpillPolicy(budget_records : Int64, store~ : BytesStore, codec~ : WireCodec[Array[(D, T, R)]], chunk_size? : Int) -> SpillPolicy[D, T, R]fn[D, T, R] SpillPolicy::binary(budget_records : Int64, store~ : BytesStore, encode~ : (Array[(D, T, R)]) -> Bytes, decode~ : (BytesView) -> Array[(D, T, R)]?, chunk_size? : Int) -> SpillPolicy[D, T, R]pub struct Spine[D, T, R] {
// private fields
}pub struct SummaryDomain[T, S] {
// private fields
}fn[T, S] SummaryDomain::SummaryDomain(identity : S, apply~ : (S, T) -> T?, compose~ : (S, S) -> S?, less_equal~ : (S, S) -> Bool) -> SummaryDomain[T, S]fn[T, S] SummaryDomain::feedback_summary(self : SummaryDomain[T, S], level : Int, action : S) -> PointStampSummary[S]fn[T : Timestamp + Lattice + Compare + Eq, S] SummaryDomain::pointstamp(inner : SummaryDomain[T, S]) -> SummaryDomain[PointStamp[T], PointStampSummary[S]]fn[A, B, S, U] SummaryDomain::product(outer : SummaryDomain[A, S], inner : SummaryDomain[B, U]) -> SummaryDomain[Product[A, B], Product[S, U]]pub struct Trace[D, T, R] {
// private fields
}pub struct TraceAgent[D, T, R] {
// private fields
}fn[D, T : Lattice + Compare + Eq, R] TraceAgent::advance_upper(self : TraceAgent[D, T, R], upper : Antichain[T]) -> Antichain[T]fn[D, T : Lattice + Compare + Eq, R] TraceAgent::batches_through(self : TraceAgent[D, T, R], upper : Antichain[T]) -> Array[Batch[D, T, R]]?fn[D, T : Lattice + Compare + Eq, R] TraceAgent::clone(self : TraceAgent[D, T, R]) -> TraceAgent[D, T, R]fn[K : Compare + Eq, V : Compare + Eq, T : Lattice + Compare + Eq, R] TraceAgent::cursor(self : TraceAgent[(K, V), T, R]) -> Cursor[K, V, T, R]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceAgent::exert(self : TraceAgent[D, T, R]) -> Unitfn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup, S] TraceAgent::import_into(self : TraceAgent[D, T, R], scope : Scope[T, S]) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R] TraceAgent::logical_compaction(self : TraceAgent[D, T, R]) -> Antichain[T]fn[K : Compare + Eq, V : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup, Q, O] TraceAgent::lookup(self : TraceAgent[(K, V), T, R], queries : Collection[(K, T), T, Q], multiply~ : (R, Q) -> O) -> Collection[(K, V), T, O]fn[D, T, R] TraceAgent::map_batches(self : TraceAgent[D, T, R], visit : (Batch[D, T, R]) -> Unit) -> Unitfn[D, T : Lattice + Compare + Eq, R] TraceAgent::physical_compaction(self : TraceAgent[D, T, R]) -> Antichain[T]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceAgent::reader(self : TraceAgent[D, T, R]) -> TraceReader[D, T, R]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceAgent::release(self : TraceAgent[D, T, R]) -> Unitfn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceAgent::set_logical_compaction(self : TraceAgent[D, T, R], frontier : Antichain[T]) -> Unitfn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceAgent::set_physical_compaction(self : TraceAgent[D, T, R], frontier : Antichain[T]) -> Unitfn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceAgent::snapshot(self : TraceAgent[D, T, R], time : T) -> Array[(D, R)]pub struct TraceBackend[D, T, R] {
// private fields
}fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceBackend::TraceBackend(reader : TraceReader[D, T, R], insert~ : (BatchView[D, T, R]) -> Unit, close~ : () -> Unit, build? : (Array[(D, T, R)], Description[T]) -> BatchView[D, T, R]) -> TraceBackend[D, T, R]pub struct TraceLogger {
// private fields
}pub struct TraceReader[D, T, R] {
// private fields
}fn[D, T, R] TraceReader::TraceReader(clone_reader~ : () -> TraceReader[D, T, R], release_reader~ : () -> Unit, upper~ : () -> Antichain[T], logical_compaction~ : () -> Antichain[T], physical_compaction~ : () -> Antichain[T], set_logical_compaction~ : (Antichain[T]) -> Unit, set_physical_compaction~ : (Antichain[T]) -> Unit, batches_through~ : (Antichain[T]) -> Array[BatchView[D, T, R]]?, subscribe~ : ((BatchView[D, T, R]) -> Unit) -> (() -> Unit)) -> TraceReader[D, T, R]fn[D, T : Lattice + Compare + Eq, R] TraceReader::advance_upper(self : TraceReader[D, T, R], upper : Antichain[T]) -> Antichain[T]fn[D, T, R] TraceReader::batches_through(self : TraceReader[D, T, R], upper : Antichain[T]) -> Array[BatchView[D, T, R]]?fn[K : Compare + Eq, V : Compare + Eq, T : Lattice + Compare + Eq, R] TraceReader::cursor(self : TraceReader[(K, V), T, R]) -> Cursor[K, V, T, R]fn[K : Compare + Eq, V : Compare + Eq, T, R] TraceReader::cursor_through(self : TraceReader[(K, V), T, R], upper : Antichain[T]) -> Cursor[K, V, T, R]?fn[D, T : Lattice + Compare + Eq, U : Lattice + Compare + Eq, R] TraceReader::enter(self : TraceReader[D, T, R], minimum : U) -> TraceReader[D, Product[T, U], R]fn[D, T : Lattice + Compare + Eq, R] TraceReader::frontier(self : TraceReader[D, T, R], since : Antichain[T], until : Antichain[T]) -> TraceReader[D, T, R]fn[K : Compare + Eq, V : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup, S] TraceReader::import_arranged(self : TraceReader[(K, V), T, R], scope : Scope[T, S]) -> ArrangementView[K, V, T, R]fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup, S] TraceReader::import_into(self : TraceReader[D, T, R], scope : Scope[T, S]) -> Collection[D, T, R]fn[D, T : Lattice + Compare + Eq, R] TraceReader::map_batches(self : TraceReader[D, T, R], visit : (BatchView[D, T, R]) -> Unit) -> Unitfn[D, T : Lattice + Compare + Eq, U : Lattice + Compare + Eq, R] TraceReader::refine(self : TraceReader[D, T, R], lift~ : (T) -> U, project~ : (U) -> T) -> TraceReader[D, U, R]fn[D, T : Lattice + Compare + Eq, U : Lattice + Compare + Eq, R] TraceReader::refine_at(self : TraceReader[D, T, R], lift~ : (T) -> U, project~ : (U) -> T, assign~ : (D, T) -> U, prior~ : (U) -> T) -> TraceReader[D, U, R]fn[D, T, R] TraceReader::set_logical_compaction(self : TraceReader[D, T, R], frontier : Antichain[T]) -> Unitfn[D, T, R] TraceReader::set_physical_compaction(self : TraceReader[D, T, R], frontier : Antichain[T]) -> Unitfn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceReader::snapshot(self : TraceReader[D, T, R], time : T) -> Array[(D, R)]fn[D, T, R] TraceReader::subscribe(self : TraceReader[D, T, R], notify : (BatchView[D, T, R]) -> Unit) -> (() -> Unit)pub struct TraceWriter[D, T, R] {
// private fields
}fn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceWriter::close(self : TraceWriter[D, T, R]) -> Unitfn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceWriter::exert(self : TraceWriter[D, T, R]) -> Unitfn[D : Compare + Eq, T : Lattice + Compare + Eq, R : Semigroup] TraceWriter::insert(self : TraceWriter[D, T, R], batch : Batch[D, T, R]) -> Unitfn[D, T, R] TraceWriter::set_exert_logic(self : TraceWriter[D, T, R], logic : (Array[(Int, Int, Int)]) -> Int?) -> Unitfn[D, T : Lattice + Compare + Eq, R] TraceWriter::upper(self : TraceWriter[D, T, R]) -> Antichain[T]impl TotalOrder for UInt128pub struct UpdatesBuilder[K, V, T, R] {
// private fields
}fn[K : Compare + Eq, V : Compare + Eq, T : Compare + Eq, R : Semigroup] UpdatesBuilder::meld(self : UpdatesBuilder[K, V, T, R], chunk : UpdatesTyped[K, V, T, R]) -> Unitfn[K : Compare + Eq, V : Compare + Eq, T : Compare + Eq, R : Semigroup] UpdatesBuilder::push(self : UpdatesBuilder[K, V, T, R], row : (K, V, T, R)) -> Unitpub struct UpdatesTyped[K, V, T, R] {
// private fields
}fn[K : Eq, V : Eq, T : Lattice + Compare + Eq, R] UpdatesTyped::batch(self : UpdatesTyped[K, V, T, R], description : Description[T]) -> Batch[(K, V), T, R]fn[K, V, T, R] UpdatesTyped::columns(self : UpdatesTyped[K, V, T, R]) -> (ColumnLists[K], ColumnLists[V], ColumnLists[T], ColumnLists[R])fn[K : Compare + Eq, V : Compare + Eq, T : Compare + Eq, R : Semigroup] UpdatesTyped::consolidate(self : UpdatesTyped[K, V, T, R]) -> UpdatesTyped[K, V, T, R]fn[K, V, T : Lattice + Compare + Eq, R] UpdatesTyped::extract(self : UpdatesTyped[K, V, T, R], upper : Antichain[T]) -> (UpdatesTyped[K, V, T, R], UpdatesTyped[K, V, T, R], Antichain[T])fn[K, V, T, R] UpdatesTyped::filter_zero(self : UpdatesTyped[K, V, T, R]) -> UpdatesTyped[K, V, T, R]fn[K : Compare + Eq, V : Compare + Eq, T : Compare + Eq, R : Semigroup] UpdatesTyped::form(rows : Iter[(K, V, T, R)]) -> UpdatesTyped[K, V, T, R]fn[K : Compare + Eq, V : Compare + Eq, T : Compare + Eq, R : Semigroup] UpdatesTyped::form_unsorted(rows : Iter[(K, V, T, R)]) -> UpdatesTyped[K, V, T, R]fn[K, V, T, R] UpdatesTyped::from_columns(keys : ColumnLists[K], vals : ColumnLists[V], times : ColumnLists[T], diffs : ColumnLists[R]) -> UpdatesTyped[K, V, T, R]fn[K : Compare + Eq, V : Compare + Eq, T : Compare + Eq, R : Semigroup] UpdatesTyped::merge_pair(self : UpdatesTyped[K, V, T, R], other : UpdatesTyped[K, V, T, R]) -> (UpdatesTyped[K, V, T, R], UpdatesTyped[K, V, T, R]?, UpdatesTyped[K, V, T, R]?)fn[K, V, T, R] UpdatesTyped::split_at(self : UpdatesTyped[K, V, T, R], count : Int) -> (UpdatesTyped[K, V, T, R], UpdatesTyped[K, V, T, R])fn[K, V, T, R] UpdatesTyped::suffix_chunk(self : UpdatesTyped[K, V, T, R], cursor : (Int, Int, Int)) -> UpdatesTyped[K, V, T, R]fn[K, V, T, R] UpdatesTyped::times_bounds(self : UpdatesTyped[K, V, T, R], lower : Int, upper : Int) -> (Int, Int)fn[K, V, T, R] UpdatesTyped::vals_bounds(self : UpdatesTyped[K, V, T, R], lower : Int, upper : Int) -> (Int, Int)pub struct Variable[D, T, R, S] {
// private fields
}impl Abelian for VectorDiff[R]impl Monoid for VectorDiff[R]impl Semigroup for VectorDiff[R]fn[R, S, T] VectorDiff::scale(self : VectorDiff[R], scalar : S, multiply : (R, S) -> T) -> VectorDiff[T]pub struct WireCodec[T] {
// private fields
}pub struct Worker {
// private fields
}fn[D, T : Lattice + Compare + Eq, R] Worker::input(self : Worker, initial : T) -> (InputSession[D, T, R], Collection[D, T, R])pub struct WorkerGroup {
// private fields
}fn[T : Lattice + Compare + Eq, S : Compare + Eq] WorkerGroup::scopes(self : WorkerGroup, minimum : T, domain : SummaryDomain[T, S]) -> ScopeGroup[T, S]fn[K, V, T : Lattice + Compare + Eq, R] extract_update_chunks(chunks : Iter[UpdatesTyped[K, V, T, R]], upper : Antichain[T], frontier : Antichain[T], ship~ : (UpdatesTyped[K, V, T, R]) -> Unit, kept~ : (UpdatesTyped[K, V, T, R]) -> Unit) -> Unitfn[A, B, S, X, Y] scale_pair(values : (A, B), scalar : S, first~ : (A, S) -> X, second~ : (B, S) -> Y) -> (X, Y)fn[A, B, C, D, S, X, Y, Z, W] scale_quad(values : (A, B, C, D), scalar : S, first~ : (A, S) -> X, second~ : (B, S) -> Y, third~ : (C, S) -> Z, fourth~ : (D, S) -> W) -> (X, Y, Z, W)fn[A, B, C, S, X, Y, Z] scale_triple(values : (A, B, C), scalar : S, first~ : (A, S) -> X, second~ : (B, S) -> Y, third~ : (C, S) -> Z) -> (X, Y, Z)fn[D, T : Lattice + Compare + Eq, R] shared_spine(minimum : T, logger? : TraceLogger) -> (TraceWriter[D, T, R], TraceAgent[D, T, R])fn[D, T : Lattice + Compare + Eq, R] shared_trace(minimum : T, logger? : TraceLogger) -> (TraceWriter[D, T, R], TraceAgent[D, T, R])Install
Download zipExperimental Differential Dataflow port for MoonBit; upstream runtime compatibility is incomplete