Cost accounting suffers yet another non determinism problem. Now it is about the storage cost.
...
Michael Stay (Unlicensed)'s comment:
There are three costs that I see. One is the cost of reading the initial program. One is the cost of computation, e.g. comm events, matching, and expression reduction. The last is the cost of storage. The cost of storage should be proportional to the change in the size of the tuplespace (or zero if we're not refunding anything).
...
Comments welcome and neededAnother solution is to return also a persistent
flag together with the matching data/continuation. This is enough to decide whether we should refund for clearing the tuplespace. It is also faster than checking the size of the hot store.