diff --git a/src/DafnyVMCTrait.dfy b/src/DafnyVMCTrait.dfy index cf60dfd0..ab198d06 100644 --- a/src/DafnyVMCTrait.dfy +++ b/src/DafnyVMCTrait.dfy @@ -83,8 +83,12 @@ module DafnyVMCTrait { o := true; } else { var B := BernoulliExpNegSampleUnit(1, 1); - var R := BernoulliExpNegSampleGenLoop(iter - 1); - o := B == true && R == true; + if ! (B == true) { + o := B; + } else { + var R := BernoulliExpNegSampleGenLoop(iter - 1); + o := R; + } } }