> I would expect that the presence of labels would not affect liveness properties. Am I missing something, or is this a bug?
The placement of labels very much affects liveness properties. In
PlusCal, every basic block is assumed to run atomically -- no
preemption is possible at positions that don't have a label. You can
think of labels as points where a lock is released-acquire on the pc
(program counter).
So in PlusCal preemption is much more coarse-grained than in x86
assembly. You have to go as granular as possible to get closer to what
a CPU does: able to preempt after any instruction, but if you go too
granular the state space explodes combinatorially. So placing the
labels is a very important aspect of using PlusCal.
And even though structured programming (avoiding gotos) simplifies
proof of sequential programs, it can make the proof of concurrent
programs harder because it obscures the mutations to the pc done by
your program and the CPU scheduling system (when it decides to put a
thread to sleep and resume execution of another).
--
Felipe