-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CBMC: Remove index variable from ARRAY_IN_BOUNDS
The helper macro ARRAY_IN_BOUNDS unfolds to a CBMC annotation asserting that the coefficients of an array are within specified bounds. Previously, this macro would require the caller to explicitly state the type and name of the index variable, even though this would not actually feature anywhere else in the macro. The original reason for this was that CBMC does not like the same variable name be used twice in block of annotations (precondition, postcondition, loop invariants). This commit simplifies ARRAY_IN_BOUNDS by always picking `int` as the index type, and auto-generating the variable name. Name clashes are avoided by internally appending the line number to the index variable. Signed-off-by: Hanno Becker <[email protected]>
- Loading branch information
1 parent
326d0b2
commit 6925a9d
Showing
12 changed files
with
97 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.