solidity/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_4.sol

23 lines
1.0 KiB
Solidity
Raw Normal View History

2021-08-20 16:47:38 +00:00
contract C {
uint c;
function f() public payable {
require(msg.value > 10);
++c;
}
function inv() public view {
2021-08-23 09:30:12 +00:00
assert(address(this).balance >= c * 11); // should hold
2021-08-20 16:47:38 +00:00
assert(address(this).balance >= c * 12); // should fail
}
}
// ====
// SMTEngine: all
// ----
// Warning 4984: (82-85): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
// Warning 4984: (154-160): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
// Warning 4984: (212-218): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
2021-10-06 09:53:03 +00:00
// Warning 6328: (180-219): CHC: Assertion violation happens here.
// Info 1180: Contract invariant(s) for :C:\n(((11 * c) + ((- 1) * (:var 1).balances[address(this)])) <= 0)\n
2021-08-20 16:47:38 +00:00
// Warning 2661: (82-85): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
// Warning 2661: (154-160): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
// Warning 2661: (212-218): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.