adobe-research/mesh — pull request #85 by bhosmer (2013-06-17 18:56:16+00:00)
Title: awaits/watches

1. reverted to the model where awaits may be called multiple times per commit
if multiple member boxes are updated during the transaction. True atomicity
would require bringing all member boxes into the transaction, which is a non-
goal. The right abstraction for awaits() is disjunction: the predicate should
be a strict or over one subtest per member value. The only sense in which awaits()
draws the boxes together is that a change to any box will wake up the thread and
run the test. TODO: once we have type transformer Pred(T) => Fun(T, Bool), awaits
should be modified to have the following param signature:

awaits(boxes : Tup(Ts | Box), preds : Tup(Ts | Pred)) -> ...

This will clarify and enforce the disjointness of the subpredicate.

2. Per the above, watches is gone, since given the lack of atomicity guarantee
over the whole incoming tuple, a call to watches() could always be replaced by
calls to watch() over the member boxes.