Remove nondeterminism in a spec