hydroflow icon indicating copy to clipboard operation
hydroflow copied to clipboard

Add arbitrary function support for partitioning in datalog

Open davidchuyaya opened this issue 2 years ago • 1 comments

My partitioning transformation introduces the distribution function slotPartition below.

p2a(i, no, slot, i, num, p, t') :- FilledHoles(no, slot, l, t), id(i), ballot(num, l, t), acceptors(a), slotPartition(a, slot, p), choose(_, t')

Generically, it can take any set of variables in the original output fact i, no, slot, i, num, a, t' and determine a new destination p. In Paxos, since we partition on slot, it only needs the slot number slot and acceptor a.

The function itself will be a mapping from each location a to its set of partitions p, using slot mod n to find the right partition, where n is the number of partitions.

davidchuyaya avatar Nov 24 '22 18:11 davidchuyaya

Example pulled from here, more available in the same file.

davidchuyaya avatar Nov 24 '22 18:11 davidchuyaya