Skip to main content
. Author manuscript; available in PMC: 2019 Oct 23.
Published in final edited form as: Proc ACM SIGPLAN Conf Program Lang Des Implement. 2019 Jun;2019:670–685. doi: 10.1145/3314221.3314580

Table 1.

Operator templates for data-trace transductions.

U(K, V): unordered key-value pairs between markers
O(K, V): for every key, ordered values between markers
Type parameters: K, V, L, W
OpStateless: transduction U(K, V) → U(L, W)
Ut onItem(K key, V value) { }
Ut onMarker(Marker m) { }
Type parameters: K, V, W, S
OpKeyedOrdered: transduction O(K, V ) → O(K, W)
S initialState() { }
S onItem(S state, K key, V value) { }
S onMarker(S state, K key, Marker m) { }
// Restriction: Output items preserve the input key.
Type parameters: K, V, L, W, S, A
OpKeyedUnordered: transduction U(K, V) → U(L, W)
A in(K key, V value) { }
A id() { } // identity for combine
A combine(A ×, A y) { } // associative, commutative
S initialState() { }
S updateState(S oldState, A agg) { }
Ut onItem(S lastState, K key, V value) { }
Ut onMarker(S newState, K key, Marker m) { }
// Restriction: in, id, combine, initialState, and
// updateState are all pure functions.