Skip to content

Handle loop contracts on do/while loops #7196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
feliperodri opened this issue Oct 5, 2022 · 0 comments · Fixed by #7541
Closed

Handle loop contracts on do/while loops #7196

feliperodri opened this issue Oct 5, 2022 · 0 comments · Fixed by #7541
Assignees
Labels
aws Bugs or features of importance to AWS CBMC users bug Code Contracts Function and loop contracts

Comments

@feliperodri
Copy link
Collaborator

CBMC version: 5.67.0
Operating system: N/A

Currently do/while loops are not handled correctly in the contracts instrumentation pass.

The tricky bit here is the first unguarded iteration. It's syntactically "inside" the loop, but the "base case" assertion must be placed after it, which might be confusing to users.

@feliperodri feliperodri added bug aws Bugs or features of importance to AWS CBMC users Code Contracts Function and loop contracts labels Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Bugs or features of importance to AWS CBMC users bug Code Contracts Function and loop contracts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants