Venturecxx icon indicating copy to clipboard operation
Venturecxx copied to clipboard

Puma and Lite CRP handle old table indexes inconsistently

Open axch opened this issue 9 years ago • 2 comments

Consider a CRP whose current set of assignments is 1, 1, 3 (to wit, 2 had been assigned before, but was moved by inference). If the CRP is to emit a new table assignment, it could reasonably produce 2 or 4. Is one or the other definitely right? In any case, Puma and Lite disagree on this point (enumerate method consistency is #356).

axch avatar Jan 27 '16 13:01 axch

Lite tries to reuse old indices, presumably so that unapply/reapply will give the same one, but even Lite's implementation has some unspecified behavior; it stores empty indices in a Python set, so the next index you pop from the set might be nondeterministic. I've thought before that maybe it should be a stack instead so that you get them back in exactly the reverse of the order that they were unassigned.

lenaqr avatar Jan 27 '16 22:01 lenaqr

This impinges on #470.

axch avatar May 12 '16 02:05 axch