-
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: Switch to exclusive coefficient upper bounds
Previously, the coefficient bounds in `array_bound(...)` and `array_abs_bound(...)` were inclusive. This was somewhat inconvenient since (a) it required a lot of `-1` in places where the exclusive upper bound was more natural to work woth, and (b) it was a deviation from the runtime debug assertions `POLY_BOUND` which would use exclusive bounds. This commit switches `array_bound` to use an exclusive upper bound. The lower bound remains inclusive. For `array_abs_bound`, we switch to an exclusive absolute bound. The macro `UINT12_MAX` (mapping to 4095) is replaced by UINT12_LIMIT, mapping to 4096. Uses of `array_abs_bound(..., UINT12_MAX) are replaced by `array_bound(..., 0, UINT12_LIMIT)`, since we never deal with negative numbers bound by UINT12_LIMIT. Signed-off-by: Hanno Becker <[email protected]>
- Loading branch information
1 parent
20e5b15
commit 8f80920
Showing
14 changed files
with
105 additions
and
102 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
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.