diff --git a/Changelog.md b/Changelog.md index d6bb765c5..916dbfde5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,6 +11,7 @@ Compiler Features: * Commandline Interface: option ``--pretty-json`` works also with ``--standard--json``. * SMTChecker: Unproved targets are hidden by default, and the SMTChecker only states how many unproved targets there are. They can be listed using the command line option ``--model-checker-show-unproved`` or the JSON option ``settings.modelChecker.showUnproved``. * SMTChecker: new setting to enable/disable encoding of division and modulo with slack variables. The command line option is ``--model-checker-div-mod-slacks`` and the JSON option is ``settings.modelChecker.divModWithSlacks``. + * SMTChecker: Do not check underflow and overflow by default. Bugfixes: diff --git a/docs/smtchecker.rst b/docs/smtchecker.rst index 5c42fb415..65b21a10e 100644 --- a/docs/smtchecker.rst +++ b/docs/smtchecker.rst @@ -34,6 +34,9 @@ The other verification targets that the SMTChecker checks at compile time are: - Out of bounds index access. - Insufficient funds for a transfer. +All the targets above are automatically checked by default if all engines are +enabled, except underflow and overflow for Solidity >=0.8.7. + The potential warnings that the SMTChecker reports are: - `` happens here.``. This means that the SMTChecker proved that a certain property fails. A counterexample may be given, however in complex situations it may also not show a counterexample. This result may also be a false positive in certain cases, when the SMT encoding adds abstractions for Solidity code that is either hard or impossible to express. @@ -93,8 +96,10 @@ Overflow } The contract above shows an overflow check example. -The SMTChecker will, by default, check every reachable arithmetic operation -in the contract for potential underflow and overflow. +The SMTChecker does not check underflow and overflow by default for Solidity >=0.8.7, +so we need to use the command line option ``--model-checker-targets "underflow,overflow"`` +or the JSON option ``settings.modelChecker.targets = ["underflow", "overflow"]``. +See :ref:`this section for targets configuration`. Here, it reports the following: .. code-block:: text @@ -447,6 +452,8 @@ If the SMTChecker does not manage to solve the contract properties with the defa a timeout can be given in milliseconds via the CLI option ``--model-checker-timeout