solidity/test/libsolidity/smtCheckerTests/natspec/abstract_function_nondet_1.sol

18 lines
440 B
Solidity
Raw Normal View History

2021-05-03 10:21:18 +00:00
contract C {
/// @custom:smtchecker abstract-function-nondet
function f(uint x) internal pure returns (uint) {
return x;
}
function g(uint y) public pure {
uint z = f(y);
// Generally holds, but here it doesn't because function
// `f` has been abstracted by nondeterministic values.
assert(z == y);
}
}
// ====
// SMTEngine: chc
// SMTIgnoreCex: yes
// ----
// Warning 6328: (297-311): CHC: Assertion violation happens here.