Skip to content

Rewrite loops with multiple back edges to having a single back edge only - #900

Closed
tautschnig wants to merge 10000 commits into
model-checking:mainfrom
tautschnig:loop-fix
Closed

tautschnig wants to merge 10000 commits into
model-checking:mainfrom
tautschnig:loop-fix

Conversation

@tautschnig

Copy link
Copy Markdown
Member

Description of changes:

rustc reasonably translates if statements at end of a loop body to
backwards jumps to the loop head. This, however, causes CBMC's symbolic
execution to spuriously treat these as nested loops. This commit now
enables a rewrite step that had previously been built for exactly such
cases.

Testing:

  • How is this change tested? Not yet - @adpaco-aws has an example that exercises this.

  • Is this a refactor change? No.

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.