Despite updating loop variable and map in the same manner, Reach tells me that they could be different. #1476
Unanswered
rithik-raja
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I do not know why the theorem prover is failing, but your invariant is actually false. You are not guaranteeing (via a BTW, I recommend using the |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a
parallelReduce
that keeps track of 2 sums—a sum of even numbersevenSum
, and a sum of odd numbersoddSum
.At the end of the loop, I update the variables in a return statement by adding a fixed
increment
. Whenever eitherevenSum
oroddSum
is updated, an element of a corresponding Map, eitheraddressEvens
oraddressOdds
, is updated with the sameincrement
.Obviously,
evenSum
should be equal to the sum ofaddressEvens
andoddSum
the sum ofaddressOdds
, but Reach tells me this is not the case.The last 2 lines of the invariant always fail with values that make no sense to me. I have no problem with the other lines of the invariant. Here are some examples:
And
I could really use some help :'(
Beta Was this translation helpful? Give feedback.
All reactions