Skip to content

document the CLI flag assume_no_casting_overflow#459

Merged
yoav-rodeh merged 2 commits intorelease/version_8.8.0from
yoav/assume-no-casting-overflow
Feb 9, 2026
Merged

document the CLI flag assume_no_casting_overflow#459
yoav-rodeh merged 2 commits intorelease/version_8.8.0from
yoav/assume-no-casting-overflow

Conversation

@yoav-rodeh
Copy link
Copy Markdown
Contributor

@yoav-rodeh yoav-rodeh commented Feb 6, 2026

@yoav-rodeh yoav-rodeh requested a review from jar-ben February 6, 2026 13:37
@srunquist-certora srunquist-certora changed the base branch from master to release/version_8.8.0 February 8, 2026 17:21
@srunquist-certora srunquist-certora added the release documentation for an upcoming release label Feb 8, 2026
(--assume_no_casting_overflow)=
## `assume_no_casting_overflow`

This option adds an implicit assumption to all solidity casting operation. For example, if `int16(x)` appears in the solidity code, then it is assumed that `x` is indeed a valid `int16` at this point in the program. That is, `x` is in `[0, 2^15-1]` or in `[2^256 - 2^15, 2^256 - 1]` (this domain results from the EVM using 2s complement representation in 256 bits).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This option adds an implicit assumption to all solidity casting operation. For example, if `int16(x)` appears in the solidity code, then it is assumed that `x` is indeed a valid `int16` at this point in the program. That is, `x` is in `[0, 2^15-1]` or in `[2^256 - 2^15, 2^256 - 1]` (this domain results from the EVM using 2s complement representation in 256 bits).
This option adds an implicit assumption to all Solidity casting operation. For example, if `int16(x)` appears in the Solidity code, then it is assumed that `x` is indeed a valid `int16` at this point in the program. That is, `x` is in `[0, 2^15-1]` or in `[2^256 - 2^15, 2^256 - 1]` (this domain results from the EVM using 2s complement representation in 256 bits).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalizaion fixed, and also the technical part dropped, as suggested by @jar-ben .


This option adds an implicit assumption to all solidity casting operation. For example, if `int16(x)` appears in the solidity code, then it is assumed that `x` is indeed a valid `int16` at this point in the program. That is, `x` is in `[0, 2^15-1]` or in `[2^256 - 2^15, 2^256 - 1]` (this domain results from the EVM using 2s complement representation in 256 bits).

Note that this flag may result in an underapproximation, i.e., it may result in the tool not checking some valid runs. That is because solidity does not revert on out of bounds casting operations. Therefore, it is important to use this option with caution.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note that this flag may result in an underapproximation, i.e., it may result in the tool not checking some valid runs. That is because solidity does not revert on out of bounds casting operations. Therefore, it is important to use this option with caution.
Note that this flag may result in an underapproximation, i.e., it may result in the tool not checking some valid runs. That is because solidity does not revert on out-of-bounds casting operations. Therefore, it is important to use this option with caution.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


Note that this flag may result in an underapproximation, i.e., it may result in the tool not checking some valid runs. That is because solidity does not revert on out of bounds casting operations. Therefore, it is important to use this option with caution.


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Example**
To assume Solidity casts do not overflow / underflow:
_Command line_
```sh
certoraRun proj.conf --assume_no_casting_overflow
```
_Configuration file_
```json
"assume_no_casting_overflow": true
```

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, except I believe it needs a true on the command line as well. So added that.

Copy link
Copy Markdown
Contributor

@jar-ben jar-ben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok, thank you for the changes

@yoav-rodeh yoav-rodeh merged commit 3aa445a into release/version_8.8.0 Feb 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release documentation for an upcoming release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants