-
Notifications
You must be signed in to change notification settings - Fork 169
Corrected verdict of hard.c (from PR #808) and added its correct version #920
Conversation
…obtained using a bounded model checker and manually verified. Hence this pull request changes the verdict of this program. Also, corrected program version hard2.c with verifiable assertion is added.
Assertion within the second loop in the program hard.c is violable as depicted by the following counter-example: INITIALIZATION Before the 0th iteration of first loop Before the 1th iteration of first loop Before the 2th iteration of first loop Before the 3th iteration of first loop Before the 4th iteration of first loop Before the 5th iteration of first loop Before the 6th iteration of first loop Before the 7th iteration of first loop Before the 8th iteration of first loop Before the 9th iteration of first loop Before the 10th iteration of first loop Before the 11th iteration of first loop Before the 12th iteration of first loop Before the 13th iteration of first loop Before the 14th iteration of first loop Before the 15th iteration of first loop Before the 16th iteration of first loop Before the 17th iteration of first loop Before the 0th iteration of second loop Before the 1th iteration of second loop Before the 2th iteration of second loop VERIFICATION FAILED for the assertion A = q*B + r Corrected program sets the value of 'B' to 1 in the beginning which ensures that the value of the variable 'd' is always an even number and a multiple of 2, avoiding any round off errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESBMC, CBMC, and CPA find property violations in the benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the correction.
... and also thanks for adding the corrected version of the program! |
I see some problems with this PR:
|
@MartinSpiessl Thank you for the mentioned points. While the corrected version of the program (hard2.c - that sets the divisor to 1 instead of a previous non-deterministic value) does not preserve the complexity of the original program, several tools are unable to very it! Since it can distinguish between tools, I think we can retain the program (hard2.c), even if it is of lower complexity. I believe that I had tried to add guards before I submitted #920 but couldn't manage to get an appropriate correct version of the program before the competition deadline, hence this route. I would also like to vote for keeping the original program (hard.c) with a reachability verdict set to false as well (apart from setting overflow verdict to true as requested), again since it helps distinguish tools. In a separate pull request we can : |
The assertion in the hard.c program is violable. Counter example was obtained using a bounded model checker and manually verified. Hence this pull request changes the verdict of this program. Also, corrected program version hard2.c with verifiable assertion is added.
Benchmarks from PR #808
Similar issues discussed in PR #813
Partial corrections issued in PR #837
programs added to new and appropriately named directory
license present and acceptable (either in separate file or as comment at beginning of program)
contributed-by present (either in README file or as comment at beginning of program)
programs added to a
.set
file of an existing category, or new sub-category established (if justified)intended property matches the corresponding
.prp
fileprograms and expected answer added to a
.yml
file according to task definitions.cfg
file