Text this: Alternating states for dual nondeterminism in imperative programming