solidity/test/libsolidity/smtCheckerTests/invariants/loop_basic.sol
2020-12-30 12:14:30 +01:00

15 lines
194 B
Solidity

pragma experimental SMTChecker;
contract Simple {
function f(uint x) public pure {
uint y;
require(x > 0);
while (y < x)
++y;
assert(y == x);
}
}
// ====
// SMTSolvers: z3
// ----