diff --git a/.circleci/config.yml b/.circleci/config.yml index 4bf85f60c..bf047b5a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -121,18 +121,7 @@ defaults: no_output_timeout: 30m command: ./.circleci/soltest_all.sh - - run_cmdline_tests: &run_cmdline_tests - name: command line tests - no_output_timeout: 30m - command: ./test/cmdlineTests.sh - - - run_docs_pragma_min_version: &run_docs_pragma_min_version - name: docs pragma version check - command: ./scripts/docs_version_pragma_check.sh - - - test_ubuntu1604_clang: &test_ubuntu1604_clang - docker: - - image: << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >> + - run_soltest_steps: &run_soltest_steps steps: - checkout - attach_workspace: @@ -141,21 +130,7 @@ defaults: - store_test_results: *store_test_results - store_artifacts: *artifacts_test_results - - test_ubuntu2004_clang: &test_ubuntu2004_clang - docker: - - image: << pipeline.parameters.ubuntu-2004-clang-docker-image >> - steps: - - checkout - - attach_workspace: - at: build - - run: *run_soltest - - store_test_results: *store_test_results - - store_artifacts: *artifacts_test_results - - - test_ubuntu2004: &test_ubuntu2004 - docker: - - image: << pipeline.parameters.ubuntu-2004-docker-image >> - parallelism: 6 + - run_soltest_all_steps: &run_soltest_all_steps steps: - checkout - attach_workspace: @@ -164,27 +139,48 @@ defaults: - store_test_results: *store_test_results - store_artifacts: *artifacts_test_results + - run_cmdline_tests: &run_cmdline_tests + name: command line tests + no_output_timeout: 30m + command: ./test/cmdlineTests.sh + + - run_cmdline_tests_steps: &run_cmdline_tests_steps + steps: + - checkout + - attach_workspace: + at: build + - run: *run_cmdline_tests + - store_test_results: *store_test_results + - store_artifacts: *artifacts_test_results + + - run_docs_pragma_min_version: &run_docs_pragma_min_version + name: docs pragma version check + command: ./scripts/docs_version_pragma_check.sh + + - test_ubuntu1604_clang: &test_ubuntu1604_clang + docker: + - image: << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >> + <<: *run_soltest_steps + + - test_ubuntu2004_clang: &test_ubuntu2004_clang + docker: + - image: << pipeline.parameters.ubuntu-2004-clang-docker-image >> + <<: *run_soltest_steps + + - test_ubuntu2004: &test_ubuntu2004 + docker: + - image: << pipeline.parameters.ubuntu-2004-docker-image >> + parallelism: 6 + <<: *run_soltest_all_steps + - test_asan: &test_asan <<: *test_ubuntu2004 - steps: - - checkout - - attach_workspace: - at: build - - run: - <<: *run_soltest - - store_test_results: *store_test_results - - store_artifacts: *artifacts_test_results + <<: *run_soltest_steps - - test_asan_clang: &test_asan_clang - <<: *test_ubuntu2004_clang - steps: - - checkout - - attach_workspace: - at: build - - run: - <<: *run_soltest - - store_test_results: *store_test_results - - store_artifacts: *artifacts_test_results + - test_ubuntu2004_clang_cli: &test_ubuntu2004_clang_cli + docker: + - image: << pipeline.parameters.ubuntu-2004-clang-docker-image >> + <<: *run_cmdline_tests_steps # -------------------------------------------------------------------------- # Workflow Templates @@ -239,6 +235,11 @@ defaults: requires: - b_ubu_asan_clang + - workflow_ubuntu2004_ubsan_clang: &workflow_ubuntu2004_ubsan_clang + <<: *workflow_trigger_on_tags + requires: + - b_ubu_ubsan_clang + - workflow_emscripten: &workflow_emscripten <<: *workflow_trigger_on_tags requires: @@ -367,7 +368,7 @@ jobs: - checkout - run: name: Install Java - command: apt -q update && apt install -y openjdk-14-jdk + command: apt -q update && apt install -y openjdk-16-jdk - run: name: Run tests command: ./scripts/test_antlr_grammar.sh @@ -433,7 +434,7 @@ jobs: name: Python unit tests command: python.exe test/pyscriptTests.py - b_ubu_clang: &build_ubuntu2004_clang + b_ubu_clang: &b_ubu_clang resource_class: xlarge docker: - image: << pipeline.parameters.ubuntu-2004-clang-docker-image >> @@ -447,8 +448,7 @@ jobs: - store_artifacts: *artifacts_solc - persist_to_workspace: *artifacts_executables - - b_ubu_asan_clang: &build_ubuntu2004_clang + b_ubu_asan_clang: &b_ubu_asan_clang docker: - image: << pipeline.parameters.ubuntu-2004-clang-docker-image >> environment: @@ -462,7 +462,22 @@ jobs: - store_artifacts: *artifacts_solc - persist_to_workspace: *artifacts_executables - b_ubu: &build_ubuntu2004 + b_ubu_ubsan_clang: &b_ubu_ubsan_clang + docker: + - image: << pipeline.parameters.ubuntu-2004-clang-docker-image >> + environment: + CC: clang + CXX: clang++ + CMAKE_OPTIONS: -DSANITIZE=undefined + MAKEFLAGS: -j 3 + steps: + - checkout + - run: *run_build + - run: *gitter_notify_failure + - store_artifacts: *artifacts_solc + - persist_to_workspace: *artifacts_executables + + b_ubu: &b_ubu resource_class: xlarge docker: - image: << pipeline.parameters.ubuntu-2004-docker-image >> @@ -475,14 +490,14 @@ jobs: - store_artifacts: *artifacts_tools - persist_to_workspace: *artifacts_executables - b_ubu_release: &build_ubuntu2004_release - <<: *build_ubuntu2004 + b_ubu_release: &b_ubu_release + <<: *b_ubu environment: FORCE_RELEASE: ON MAKEFLAGS: -j 10 b_ubu_static: - <<: *build_ubuntu2004 + <<: *b_ubu environment: MAKEFLAGS: -j 10 CMAKE_OPTIONS: -DCMAKE_BUILD_TYPE=Release -DUSE_Z3_DLOPEN=ON -DUSE_CVC4=OFF -DSOLC_STATIC_STDLIBS=ON @@ -495,7 +510,7 @@ jobs: - store_artifacts: *artifacts_solc b_ubu_codecov: - <<: *build_ubuntu2004 + <<: *b_ubu environment: COVERAGE: ON CMAKE_BUILD_TYPE: Debug @@ -529,7 +544,7 @@ jobs: # Builds in C++20 mode and uses debug build in order to speed up. # Do *NOT* store any artifacts or workspace as we don't run tests on this build. b_ubu_cxx20: - <<: *build_ubuntu2004 + <<: *b_ubu environment: CMAKE_BUILD_TYPE: Debug CMAKE_OPTIONS: -DCMAKE_CXX_STANDARD=20 -DUSE_CVC4=OFF @@ -538,7 +553,7 @@ jobs: - checkout - run: *run_build - b_ubu_ossfuzz: &build_ubuntu1604_clang + b_ubu_ossfuzz: &b_ubu_ossfuzz docker: - image: << pipeline.parameters.ubuntu-1604-clang-ossfuzz-docker-image >> environment: @@ -683,7 +698,7 @@ jobs: # x64 ASAN build, for testing for memory related bugs b_ubu_asan: &b_ubu_asan - <<: *build_ubuntu2004 + <<: *b_ubu environment: CMAKE_OPTIONS: -DSANITIZE=address MAKEFLAGS: -j 10 @@ -768,13 +783,7 @@ jobs: - image: << pipeline.parameters.ubuntu-2004-docker-image >> environment: TERM: xterm - steps: - - checkout - - attach_workspace: - at: build - - run: *run_cmdline_tests - - store_test_results: *store_test_results - - store_artifacts: *artifacts_test_results + <<: *run_cmdline_tests_steps t_ubu_release_cli: &t_ubu_release_cli <<: *t_ubu_cli @@ -784,14 +793,7 @@ jobs: environment: TERM: xterm ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2 - steps: - - checkout - - attach_workspace: - at: build - - run: - <<: *run_cmdline_tests - - store_test_results: *store_test_results - - store_artifacts: *artifacts_test_results + <<: *run_cmdline_tests_steps t_ubu_asan_constantinople: <<: *test_asan @@ -802,13 +804,37 @@ jobs: ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2 t_ubu_asan_constantinople_clang: - <<: *test_asan_clang + <<: *test_ubuntu2004_clang environment: EVM: constantinople OPTIMIZE: 0 SOLTEST_FLAGS: --no-smt ASAN_OPTIONS: check_initialization_order=true:detect_stack_use_after_return=true:strict_init_order=true:strict_string_checks=true:detect_invalid_pointer_pairs=2 + t_ubu_ubsan_clang: + docker: + - image: << pipeline.parameters.ubuntu-2004-clang-docker-image >> + steps: + - checkout + - attach_workspace: + at: build + - run: *run_soltest + - run: *gitter_notify_failure + - store_test_results: *store_test_results + - store_artifacts: *artifacts_test_results + + t_ubu_ubsan_clang_cli: + docker: + - image: << pipeline.parameters.ubuntu-2004-clang-docker-image >> + steps: + - checkout + - attach_workspace: + at: build + - run: *run_cmdline_tests + - run: *gitter_notify_failure + - store_test_results: *store_test_results + - store_artifacts: *artifacts_test_results + t_ems_solcjs: docker: - image: << pipeline.parameters.ubuntu-2004-docker-image >> @@ -1208,6 +1234,11 @@ workflows: - t_ubu_asan_constantinople_clang: *workflow_ubuntu2004_asan_clang - t_ubu_asan_cli: *workflow_ubuntu2004_asan + # UBSan build and tests + - b_ubu_ubsan_clang: *workflow_trigger_on_tags + - t_ubu_ubsan_clang: *workflow_ubuntu2004_ubsan_clang + - t_ubu_ubsan_clang_cli: *workflow_ubuntu2004_ubsan_clang + # Emscripten build and tests that take more than 15 minutes to execute - b_ems: *workflow_trigger_on_tags - t_ems_ext: diff --git a/Changelog.md b/Changelog.md index 012a8dc57..608e668e1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,12 +11,17 @@ Language Features: Compiler Features: + * Commandline Interface: Normalize paths specified on the command line and make them relative for files located inside base path. * Immutable variables can be read at construction time once they are initialized. * SMTChecker: Support low level ``call`` as external calls to unknown code. + * SMTChecker: Add constraints to better correlate ``address(this).balance`` and ``msg.value``. + * Commandline Interface: Disallowed the ``--experimental-via-ir`` option to be used with Standard Json, Assembler and Linker modes. Bugfixes: * SMTChecker: Fix false positive in external calls from constructors. + * SMTChecker: Fix internal error on some multi-source uses of ``abi.*``, cryptographic functions and constants. + * SMTChecker: Fix false negative caused by ``push`` on storage array references returned by internal functions. diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake index 04c2a154f..d26060383 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -192,11 +192,43 @@ endif () if (SANITIZE) # Perform case-insensitive string compare - string(TOLOWER "${SANITIZE}" san) + string(TOLOWER "${SANITIZE}" sanitizer) # -fno-omit-frame-pointer gives more informative stack trace in case of an error # -fsanitize-address-use-after-scope throws an error when a variable is used beyond its scope - if (san STREQUAL "address") + if (sanitizer STREQUAL "address") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-address-use-after-scope") + elseif (sanitizer STREQUAL "undefined") + # The following flags not used by fuzzer but used by us may create problems, so consider + # disabling them: alignment, pointer-overflow. + # Flags are alphabetically sorted and are for clang v10.0 + list(APPEND undefinedSanitizerChecks + alignment + array-bounds + bool + builtin + enum + float-divide-by-zero + function + integer-divide-by-zero + null + object-size + pointer-overflow + return + returns-nonnull-attribute + shift + signed-integer-overflow + unsigned-integer-overflow + unreachable + vla-bound + vptr + ) + list(JOIN undefinedSanitizerChecks "," sanitizerChecks) + list(REMOVE_ITEM undefinedSanitizerChecks unsigned-integer-overflow) + # The fuzzer excludes reports of unsigned-integer-overflow. Hence, we remove it + # from the -fno-sanitize-recover checks. Consider reducing this list if we do not + # want to be notified about other failed checks. + list(JOIN undefinedSanitizerChecks "," dontRecoverFromChecks) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${sanitizerChecks} -fno-sanitize-recover=${dontRecoverFromChecks}") endif() endif() diff --git a/docs/examples/blind-auction.rst b/docs/examples/blind-auction.rst index d3857844a..ad898a9b1 100644 --- a/docs/examples/blind-auction.rst +++ b/docs/examples/blind-auction.rst @@ -64,15 +64,15 @@ to receive their money - contracts cannot activate themselves. /// The function auctionEnd has already been called. error AuctionEndAlreadyCalled(); - /// Create a simple auction with `_biddingTime` + /// Create a simple auction with `biddingTime` /// seconds bidding time on behalf of the - /// beneficiary address `_beneficiary`. + /// beneficiary address `beneficiaryAddress`. constructor( - uint _biddingTime, - address payable _beneficiary + uint biddingTime, + address payable beneficiaryAddress ) { - beneficiary = _beneficiary; - auctionEndTime = block.timestamp + _biddingTime; + beneficiary = beneficiaryAddress; + auctionEndTime = block.timestamp + biddingTime; } /// Bid on the auction with the value sent @@ -232,26 +232,26 @@ invalid bids. // functions. `onlyBefore` is applied to `bid` below: // The new function body is the modifier's body where // `_` is replaced by the old function body. - modifier onlyBefore(uint _time) { - if (block.timestamp >= _time) revert TooLate(_time); + modifier onlyBefore(uint time) { + if (block.timestamp >= time) revert TooLate(time); _; } - modifier onlyAfter(uint _time) { - if (block.timestamp <= _time) revert TooEarly(_time); + modifier onlyAfter(uint time) { + if (block.timestamp <= time) revert TooEarly(time); _; } constructor( - uint _biddingTime, - uint _revealTime, - address payable _beneficiary + uint biddingTime, + uint revealTime, + address payable beneficiaryAddress ) { - beneficiary = _beneficiary; - biddingEnd = block.timestamp + _biddingTime; - revealEnd = biddingEnd + _revealTime; + beneficiary = beneficiaryAddress; + biddingEnd = block.timestamp + biddingTime; + revealEnd = biddingEnd + revealTime; } - /// Place a blinded bid with `_blindedBid` = + /// Place a blinded bid with `blindedBid` = /// keccak256(abi.encodePacked(value, fake, secret)). /// The sent ether is only refunded if the bid is correctly /// revealed in the revealing phase. The bid is valid if the @@ -260,13 +260,13 @@ invalid bids. /// not the exact amount are ways to hide the real bid but /// still make the required deposit. The same address can /// place multiple bids. - function bid(bytes32 _blindedBid) + function bid(bytes32 blindedBid) external payable onlyBefore(biddingEnd) { bids[msg.sender].push(Bid({ - blindedBid: _blindedBid, + blindedBid: blindedBid, deposit: msg.value })); } @@ -275,24 +275,24 @@ invalid bids. /// correctly blinded invalid bids and for all bids except for /// the totally highest. function reveal( - uint[] calldata _values, - bool[] calldata _fake, - bytes32[] calldata _secret + uint[] calldata values, + bool[] calldata fakes, + bytes32[] calldata secrets ) external onlyAfter(biddingEnd) onlyBefore(revealEnd) { uint length = bids[msg.sender].length; - require(_values.length == length); - require(_fake.length == length); - require(_secret.length == length); + require(values.length == length); + require(fakes.length == length); + require(secrets.length == length); uint refund; for (uint i = 0; i < length; i++) { Bid storage bidToCheck = bids[msg.sender][i]; (uint value, bool fake, bytes32 secret) = - (_values[i], _fake[i], _secret[i]); + (values[i], fakes[i], secrets[i]); if (bidToCheck.blindedBid != keccak256(abi.encodePacked(value, fake, secret))) { // Bid was not actually revealed. // Do not refund deposit. diff --git a/docs/examples/micropayment.rst b/docs/examples/micropayment.rst index 7e94c95aa..b1d963ee5 100644 --- a/docs/examples/micropayment.rst +++ b/docs/examples/micropayment.rst @@ -346,11 +346,11 @@ The full contract address payable public recipient; // The account receiving the payments. uint256 public expiration; // Timeout in case the recipient never closes. - constructor (address payable _recipient, uint256 duration) + constructor (address payable recipientAddress, uint256 duration) payable { sender = payable(msg.sender); - recipient = _recipient; + recipient = recipientAddress; expiration = block.timestamp + duration; } diff --git a/docs/examples/safe-remote.rst b/docs/examples/safe-remote.rst index eb02251a3..e42b017fb 100644 --- a/docs/examples/safe-remote.rst +++ b/docs/examples/safe-remote.rst @@ -36,8 +36,8 @@ you can use state machine-like constructs inside a contract. // The state variable has a default value of the first member, `State.created` State public state; - modifier condition(bool _condition) { - require(_condition); + modifier condition(bool condition_) { + require(condition_); _; } @@ -62,8 +62,8 @@ you can use state machine-like constructs inside a contract. _; } - modifier inState(State _state) { - if (state != _state) + modifier inState(State state_) { + if (state != state_) revert InvalidState(); _; } diff --git a/docs/path-resolution.rst b/docs/path-resolution.rst index 1d4b200de..470bfbf31 100644 --- a/docs/path-resolution.rst +++ b/docs/path-resolution.rst @@ -71,8 +71,10 @@ The initial content of the VFS depends on how you invoke the compiler: solc contract.sol /usr/local/dapp-bin/token.sol - The source unit name of a file loaded this way is simply the specified path after shell expansion - and with platform-specific separators converted to forward slashes. + The source unit name of a file loaded this way is constructed by converting its path to a + canonical form and making it relative to the base path if it is located inside. + See :ref:`Base Path Normalization and Stripping ` for + a detailed description of this process. .. index:: standard JSON @@ -309,9 +311,67 @@ When the source unit name is a relative path, this results in the file being loo directory the compiler has been invoked from. It is also the only value that results in absolute paths in source unit names being actually interpreted as absolute paths on disk. +If the base path itself is relative, it is interpreted as relative to the current working directory +of the compiler. -If the base path itself is relative, it is also interpreted as relative to the current working -directory of the compiler. +.. _base-path-normalization-and-stripping: + +Base Path Normalization and Stripping +------------------------------------- + +On the command line the compiler behaves just as you would expect from any other program: +it accepts paths in a format native to the platform and relative paths are relative to the current +working directory. +The source unit names assigned to files whose paths are specified on the command line, however, +should not change just because the project is being compiled on a different platform or because the +compiler happens to have been invoked from a different directory. +To achieve this, paths to source files coming from the command line must be converted to a canonical +form, and, if possible, made relative to the base path. + +The normalization rules are as follows: + +- If a path is relative, it is made absolute by prepending the current working directory to it. +- Internal ``.`` and ``..`` segments are collapsed. +- Platform-specific path separators are replaced with forward slashes. +- Sequences of multiple consecutive path separators are squashed into a single separator (unless + they are the leading slashes of an `UNC path `_). +- If the path includes a root name (e.g. a drive letter on Windows) and the root is the same as the + root of the current working directory, the root is replaced with ``/``. +- Symbolic links in the path are **not** resolved. + + - The only exception is the path to the current working directory prepended to relative paths in + the process of making them absolute. + On some platforms the working directory is reported always with symbolic links resolved so for + consistency the compiler resolves them everywhere. + +- The original case of the path is preserved even if the filesystem is case-insensitive but + `case-preserving `_ and the actual case on + disk is different. + +.. note:: + + There are situations where paths cannot be made platform-independent. + For example on Windows the compiler can avoid using drive letters by referring to the root + directory of the current drive as ``/`` but drive letters are still necessary for paths leading + to other drives. + You can avoid such situations by ensuring that all the files are available within a single + directory tree on the same drive. + +Once canonicalized, the base path is stripped from all source file paths that start with it. +If the base path is empty or not specified, it is treated as if it was equal to the path to the +current working directory (with all symbolic links resolved). +The result is accepted only if the normalized directory path is the exact prefix of the normalized +file path. +Otherwise the file path remains absolute. +This makes the conversion unambiguous and ensures that the relative path does not start with ``../``. +The resulting file path becomes the source unit name. + +.. note:: + + Prior to version 0.8.8, CLI path stripping was not performed and the only normalization applied + was the conversion of path separators. + When working with older versions of the compiler it is recommended to invoke the compiler from + the base path and to only use relative paths on the command line. .. index:: ! remapping; import, ! import; remapping, ! remapping; context, ! remapping; prefix, ! remapping; target .. _import-remapping: @@ -414,7 +474,7 @@ Here are the detailed rules governing the behaviour of remappings: .. code-block:: bash - solc /project/=/contracts/ /project/contract.sol --base-path /project # source unit name: /project/contract.sol + solc /project/=/contracts/ /project/contract.sol --base-path /project # source unit name: contract.sol .. code-block:: solidity :caption: /project/contract.sol diff --git a/docs/smtchecker.rst b/docs/smtchecker.rst index d1e8f6c81..a9732d05e 100644 --- a/docs/smtchecker.rst +++ b/docs/smtchecker.rst @@ -830,6 +830,25 @@ are located in storage, even though they also have type ``uint[]``. However, if ``d`` was assigned, we would need to clear knowledge about ``array`` and vice-versa. +Contract Balance +================ + +A contract may be deployed with funds sent to it, if ``msg.value`` > 0 in the +deployment transaction. +However, the contract's address may already have funds before deployment, +which are kept by the contract. +Therefore, the SMTChecker assumes that ``address(this).balance >= msg.value`` +in the constructor in order to be consistent with the EVM rules. +The contract's balance may also increase without triggering any calls to the +contract, if + +- ``selfdestruct`` is executed by another contract with the analyzed contract + as the target of the remaining funds, +- the contract is the coinbase (i.e., ``block.coinbase``) of some block. + +To model this properly, the SMTChecker assumes that at every new transaction +the contract's balance may grow by at least ``msg.value``. + ********************** Real World Assumptions ********************** @@ -841,3 +860,7 @@ push: If the ``push`` operation is applied to an array of length 2^256 - 1, its length silently overflows. However, this is unlikely to happen in practice, since the operations required to grow the array to that point would take billions of years to execute. +Another similar assumption taken by the SMTChecker is that an address' balance +can never overflow. + +A similar idea was presented in `EIP-1985 `_. diff --git a/liblangutil/CMakeLists.txt b/liblangutil/CMakeLists.txt index c98877963..96f2a23d8 100644 --- a/liblangutil/CMakeLists.txt +++ b/liblangutil/CMakeLists.txt @@ -25,6 +25,7 @@ set(sources Token.cpp Token.h UndefMacros.h + UniqueErrorReporter.h ) add_library(langutil ${sources}) diff --git a/liblangutil/Exceptions.h b/liblangutil/Exceptions.h index 456637cd6..c7385bac8 100644 --- a/liblangutil/Exceptions.h +++ b/liblangutil/Exceptions.h @@ -105,6 +105,7 @@ struct ErrorId unsigned long long error = 0; bool operator==(ErrorId const& _rhs) const { return error == _rhs.error; } bool operator!=(ErrorId const& _rhs) const { return !(*this == _rhs); } + bool operator<(ErrorId const& _rhs) const { return error < _rhs.error; } }; constexpr ErrorId operator"" _error(unsigned long long _error) { return ErrorId{ _error }; } diff --git a/liblangutil/UniqueErrorReporter.h b/liblangutil/UniqueErrorReporter.h new file mode 100644 index 000000000..d0f6dc4e2 --- /dev/null +++ b/liblangutil/UniqueErrorReporter.h @@ -0,0 +1,94 @@ +/* + This file is part of solidity. + + solidity is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + solidity is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with solidity. If not, see . +*/ +// SPDX-License-Identifier: GPL-3.0 + +#pragma once + +#include +#include + +namespace solidity::langutil +{ + +/* + * Wrapper for ErrorReporter that removes duplicates. + * Two errors are considered the same if their error ID and location are the same. + */ +class UniqueErrorReporter +{ +public: + UniqueErrorReporter(): m_errorReporter(m_uniqueErrors) {} + + void warning(ErrorId _error, SourceLocation const& _location, std::string const& _description) + { + if (!seen(_error, _location, _description)) + { + m_errorReporter.warning(_error, _location, _description); + markAsSeen(_error, _location, _description); + } + } + + void warning( + ErrorId _error, + SourceLocation const& _location, + std::string const& _description, + SecondarySourceLocation const& _secondaryLocation + ) + { + if (!seen(_error, _location, _description)) + { + m_errorReporter.warning(_error, _location, _description, _secondaryLocation); + markAsSeen(_error, _location, _description); + } + } + + void warning(ErrorId _error, std::string const& _description) + { + if (!seen(_error, {}, _description)) + { + m_errorReporter.warning(_error, _description); + markAsSeen(_error, {}, _description); + } + } + + bool seen(ErrorId _error, SourceLocation const& _location, std::string const& _description) const + { + if (m_seenErrors.count({_error, _location})) + { + solAssert(m_seenErrors.at({_error, _location}) == _description, ""); + return true; + } + return false; + } + + void markAsSeen(ErrorId _error, SourceLocation const& _location, std::string const& _description) + { + solAssert(!seen(_error, _location, _description), ""); + m_seenErrors[{_error, _location}] = _description; + } + + ErrorList const& errors() const { return m_errorReporter.errors(); } + + void clear() { m_errorReporter.clear(); } + +private: + ErrorReporter m_errorReporter; + ErrorList m_uniqueErrors; + std::map, std::string> m_seenErrors; +}; + +} diff --git a/libsmtutil/Sorts.h b/libsmtutil/Sorts.h index 45668f269..107dc1f2c 100644 --- a/libsmtutil/Sorts.h +++ b/libsmtutil/Sorts.h @@ -159,7 +159,15 @@ struct TupleSort: public Sort name(std::move(_name)), members(std::move(_members)), components(std::move(_components)) - {} + { + for (size_t i = 0; i < members.size(); ++i) + memberToIndex[members.at(i)] = i; + } + + SortPointer memberSort(std::string const& _member) + { + return components.at(memberToIndex.at(_member)); + } bool operator==(Sort const& _other) const override { @@ -186,8 +194,10 @@ struct TupleSort: public Sort std::string const name; std::vector const members; std::vector const components; + std::map memberToIndex; }; + /** Frequently used sorts.*/ struct SortProvider { diff --git a/libsolidity/analysis/ControlFlowAnalyzer.cpp b/libsolidity/analysis/ControlFlowAnalyzer.cpp index 8ea82bc43..181943032 100644 --- a/libsolidity/analysis/ControlFlowAnalyzer.cpp +++ b/libsolidity/analysis/ControlFlowAnalyzer.cpp @@ -20,7 +20,8 @@ #include #include -#include + +#include #include @@ -141,7 +142,7 @@ void ControlFlowAnalyzer::checkUninitializedAccess(CFGNode const* _entry, CFGNod exitInfo.uninitializedVariableAccesses.begin(), exitInfo.uninitializedVariableAccesses.end() ); - boost::range::sort( + ranges::sort( uninitializedAccessesOrdered, [](VariableOccurrence const* lhs, VariableOccurrence const* rhs) -> bool { diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 89f769420..0f5ead34b 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -38,7 +38,6 @@ #include #include -#include #include #include diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index bae1b7d62..e009bc8cb 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -34,7 +34,8 @@ #include #include -#include + +#include #include #include @@ -563,8 +564,9 @@ bool ASTJsonConverter::visit(InlineAssembly const& _node) Json::Value externalReferencesJson = Json::arrayValue; - for (auto&& it: boost::range::sort(externalReferences)) - externalReferencesJson.append(std::move(it.second)); + ranges::sort(externalReferences); + for (Json::Value& it: externalReferences | ranges::views::values) + externalReferencesJson.append(std::move(it)); setJsonNode(_node, "InlineAssembly", { make_pair("AST", Json::Value(yul::AsmJsonConverter(sourceIndexFromLocation(_node.location()))(_node.operations()))), diff --git a/libsolidity/formal/BMC.cpp b/libsolidity/formal/BMC.cpp index d7742084a..dc7547433 100644 --- a/libsolidity/formal/BMC.cpp +++ b/libsolidity/formal/BMC.cpp @@ -37,15 +37,14 @@ using namespace solidity::frontend; BMC::BMC( smt::EncodingContext& _context, - ErrorReporter& _errorReporter, + UniqueErrorReporter& _errorReporter, map const& _smtlib2Responses, ReadCallback::Callback const& _smtCallback, ModelCheckerSettings const& _settings, CharStreamProvider const& _charStreamProvider ): - SMTEncoder(_context, _settings, _charStreamProvider), - m_interface(make_unique(_smtlib2Responses, _smtCallback, _settings.solvers, _settings.timeout)), - m_outerErrorReporter(_errorReporter) + SMTEncoder(_context, _settings, _errorReporter, _charStreamProvider), + m_interface(make_unique(_smtlib2Responses, _smtCallback, _settings.solvers, _settings.timeout)) { #if defined (HAVE_Z3) || defined (HAVE_CVC4) if (m_settings.solvers.cvc4 || m_settings.solvers.z3) @@ -67,7 +66,7 @@ void BMC::analyze(SourceUnit const& _source, map 0 && !m_settings.showUnproved) - m_errorReporter.warning( - 2788_error, - {}, - "BMC: " + - to_string(m_unprovedAmt) + - " verification condition(s) could not be proved." + - " Enable the model checker option \"show unproved\" to see all of them." + - " Consider choosing a specific contract to be verified in order to reduce the solving problems." + - " Consider increasing the timeout per query." - ); - } + _source.accept(*this); + + if (m_unprovedAmt > 0 && !m_settings.showUnproved) + m_errorReporter.warning( + 2788_error, + {}, + "BMC: " + + to_string(m_unprovedAmt) + + " verification condition(s) could not be proved." + + " Enable the model checker option \"show unproved\" to see all of them." + + " Consider choosing a specific contract to be verified in order to reduce the solving problems." + + " Consider increasing the timeout per query." + ); // If this check is true, Z3 and CVC4 are not available // and the query answers were not provided, since SMTPortfolio @@ -113,7 +112,7 @@ void BMC::analyze(SourceUnit const& _source, map #include -#include +#include #include #include @@ -59,7 +59,7 @@ class BMC: public SMTEncoder public: BMC( smt::EncodingContext& _context, - langutil::ErrorReporter& _errorReporter, + langutil::UniqueErrorReporter& _errorReporter, std::map const& _smtlib2Responses, ReadCallback::Callback const& _smtCallback, ModelCheckerSettings const& _settings, @@ -186,9 +186,6 @@ private: bool m_loopExecutionHappened = false; bool m_externalFunctionCallHappened = false; - /// ErrorReporter that comes from CompilerStack. - langutil::ErrorReporter& m_outerErrorReporter; - std::vector m_verificationTargets; /// Targets that were already proven. diff --git a/libsolidity/formal/CHC.cpp b/libsolidity/formal/CHC.cpp index 64f868b6a..140b2a27d 100644 --- a/libsolidity/formal/CHC.cpp +++ b/libsolidity/formal/CHC.cpp @@ -53,14 +53,13 @@ using namespace solidity::frontend::smt; CHC::CHC( EncodingContext& _context, - ErrorReporter& _errorReporter, + UniqueErrorReporter& _errorReporter, [[maybe_unused]] map const& _smtlib2Responses, [[maybe_unused]] ReadCallback::Callback const& _smtCallback, ModelCheckerSettings const& _settings, CharStreamProvider const& _charStreamProvider ): - SMTEncoder(_context, _settings, _charStreamProvider), - m_outerErrorReporter(_errorReporter) + SMTEncoder(_context, _settings, _errorReporter, _charStreamProvider) { bool usesZ3 = m_settings.solvers.z3; #ifdef HAVE_Z3 @@ -79,7 +78,7 @@ void CHC::analyze(SourceUnit const& _source) if (!m_noSolverWarning) { m_noSolverWarning = true; - m_outerErrorReporter.warning( + m_errorReporter.warning( 7649_error, SourceLocation(), "CHC analysis was not possible since no Horn solver was enabled." @@ -88,20 +87,19 @@ void CHC::analyze(SourceUnit const& _source) return; } - if (SMTEncoder::analyze(_source)) - { - resetSourceAnalysis(); + resetSourceAnalysis(); - auto sources = sourceDependencies(_source); - collectFreeFunctions(sources); - createFreeConstants(sources); - for (auto const* source: sources) - defineInterfacesAndSummaries(*source); - for (auto const* source: sources) - source->accept(*this); + auto sources = sourceDependencies(_source); + collectFreeFunctions(sources); + createFreeConstants(sources); + state().prepareForSourceUnit(_source); - checkVerificationTargets(); - } + for (auto const* source: sources) + defineInterfacesAndSummaries(*source); + for (auto const* source: sources) + source->accept(*this); + + checkVerificationTargets(); bool ranSolver = true; // If ranSolver is true here it's because an SMT solver callback was @@ -111,7 +109,7 @@ void CHC::analyze(SourceUnit const& _source) if (!ranSolver && !m_noSolverWarning) { m_noSolverWarning = true; - m_outerErrorReporter.warning( + m_errorReporter.warning( 3996_error, SourceLocation(), #ifdef HAVE_Z3_DLOPEN @@ -122,10 +120,6 @@ void CHC::analyze(SourceUnit const& _source) #endif ); } - else - m_outerErrorReporter.append(m_errorReporter.errors()); - - m_errorReporter.clear(); } vector CHC::unhandledQueries() const @@ -169,7 +163,13 @@ void CHC::endVisit(ContractDefinition const& _contract) smtutil::Expression zeroes(true); for (auto var: stateVariablesIncludingInheritedAndPrivate(_contract)) zeroes = zeroes && currentValue(*var) == smt::zeroValue(var->type()); - addRule(smtutil::Expression::implies(initialConstraints(_contract) && zeroes, predicate(entry)), entry.functor().name); + // The contract's address might already have funds before deployment, + // so the balance must be at least `msg.value`, but not equals. + auto initialBalanceConstraint = state().balance(state().thisAddress()) >= state().txMember("msg.value"); + addRule(smtutil::Expression::implies( + initialConstraints(_contract) && zeroes && initialBalanceConstraint, + predicate(entry) + ), entry.functor().name); setCurrentBlock(entry); solAssert(!m_errorDest, ""); @@ -315,11 +315,16 @@ void CHC::endVisit(FunctionDefinition const& _function) shouldAnalyze(*m_currentContract) ) { - auto sum = summary(_function); + defineExternalFunctionInterface(_function, *m_currentContract); + setCurrentBlock(*m_interfaces.at(m_currentContract)); + + // Create the rule + // interface \land externalFunctionEntry => interface' auto ifacePre = smt::interfacePre(*m_interfaces.at(m_currentContract), *m_currentContract, m_context); - auto txConstraints = state().txTypeConstraints() && state().txFunctionConstraints(_function); - m_queryPlaceholders[&_function].push_back({txConstraints && sum, errorFlag().currentValue(), ifacePre}); - connectBlocks(ifacePre, interface(), txConstraints && sum && errorFlag().currentValue() == 0); + auto sum = externalSummary(_function); + + m_queryPlaceholders[&_function].push_back({sum, errorFlag().currentValue(), ifacePre}); + connectBlocks(ifacePre, interface(), sum && errorFlag().currentValue() == 0); } m_currentFunction = nullptr; @@ -941,6 +946,8 @@ pair CHC::arithmeticOperation( void CHC::resetSourceAnalysis() { + SMTEncoder::resetSourceAnalysis(); + m_safeTargets.clear(); m_unsafeTargets.clear(); m_unprovedTargets.clear(); @@ -949,6 +956,7 @@ void CHC::resetSourceAnalysis() m_queryPlaceholders.clear(); m_callGraph.clear(); m_summaries.clear(); + m_externalSummaries.clear(); m_interfaces.clear(); m_nondetInterfaces.clear(); m_constructorSummaries.clear(); @@ -1128,6 +1136,8 @@ void CHC::defineInterfacesAndSummaries(SourceUnit const& _source) if (!function->isConstructor() && function->isPublic() && resolved.count(function)) { + m_externalSummaries[contract].emplace(function, createSummaryBlock(*function, *contract)); + auto state1 = stateVariablesAtIndex(1, *contract); auto state2 = stateVariablesAtIndex(2, *contract); @@ -1144,12 +1154,41 @@ void CHC::defineInterfacesAndSummaries(SourceUnit const& _source) applyMap(function->parameters(), [this](auto _var) { return valueAtIndex(*_var, 1); }) + applyMap(function->returnParameters(), [this](auto _var) { return valueAtIndex(*_var, 1); }); - connectBlocks(nondetPre, nondetPost, errorPre == 0 && (*m_summaries.at(contract).at(function))(args)); + connectBlocks(nondetPre, nondetPost, errorPre == 0 && (*m_externalSummaries.at(contract).at(function))(args)); } } } } +void CHC::defineExternalFunctionInterface(FunctionDefinition const& _function, ContractDefinition const& _contract) +{ + // Create a rule that represents an external call to this function. + // This contains more things than the function body itself, + // such as balance updates because of ``msg.value``. + auto functionEntryBlock = createBlock(&_function, PredicateType::FunctionBlock); + auto functionPred = predicate(*functionEntryBlock); + addRule(functionPred, functionPred.name); + setCurrentBlock(*functionEntryBlock); + + m_context.addAssertion(initialConstraints(_contract, &_function)); + m_context.addAssertion(state().txTypeConstraints() && state().txFunctionConstraints(_function)); + + // The contract may have received funds through a selfdestruct or + // block.coinbase, which do not trigger calls into the contract. + // So the only constraint we can add here is that the balance of + // the contract grows by at least `msg.value`. + SymbolicIntVariable k{TypeProvider::uint256(), TypeProvider::uint256(), "funds_" + to_string(m_context.newUniqueId()), m_context}; + m_context.addAssertion(k.currentValue() >= state().txMember("msg.value")); + // Assume that address(this).balance cannot overflow. + m_context.addAssertion(smt::symbolicUnknownConstraints(state().balance(state().thisAddress()) + k.currentValue(), TypeProvider::uint256())); + state().addBalance(state().thisAddress(), k.currentValue()); + + errorFlag().increaseIndex(); + m_context.addAssertion(summaryCall(_function)); + + connectBlocks(functionPred, externalSummary(_function)); +} + void CHC::defineContractInitializer(ContractDefinition const& _contract, ContractDefinition const& _contextContract) { m_contractInitializers[&_contextContract][&_contract] = createConstructorBlock(_contract, "contract_initializer"); @@ -1220,12 +1259,34 @@ smtutil::Expression CHC::summary(FunctionDefinition const& _function, ContractDe return smt::function(*m_summaries.at(&_contract).at(&_function), &_contract, m_context); } +smtutil::Expression CHC::summaryCall(FunctionDefinition const& _function, ContractDefinition const& _contract) +{ + return smt::functionCall(*m_summaries.at(&_contract).at(&_function), &_contract, m_context); +} + +smtutil::Expression CHC::externalSummary(FunctionDefinition const& _function, ContractDefinition const& _contract) +{ + return smt::function(*m_externalSummaries.at(&_contract).at(&_function), &_contract, m_context); +} + smtutil::Expression CHC::summary(FunctionDefinition const& _function) { solAssert(m_currentContract, ""); return summary(_function, *m_currentContract); } +smtutil::Expression CHC::summaryCall(FunctionDefinition const& _function) +{ + solAssert(m_currentContract, ""); + return summaryCall(_function, *m_currentContract); +} + +smtutil::Expression CHC::externalSummary(FunctionDefinition const& _function) +{ + solAssert(m_currentContract, ""); + return externalSummary(_function, *m_currentContract); +} + Predicate const* CHC::createBlock(ASTNode const* _node, PredicateType _predType, string const& _prefix) { auto block = createSymbolicBlock( diff --git a/libsolidity/formal/CHC.h b/libsolidity/formal/CHC.h index f2e8f62a1..24b27c55b 100644 --- a/libsolidity/formal/CHC.h +++ b/libsolidity/formal/CHC.h @@ -40,6 +40,7 @@ #include #include +#include #include @@ -55,7 +56,7 @@ class CHC: public SMTEncoder public: CHC( smt::EncodingContext& _context, - langutil::ErrorReporter& _errorReporter, + langutil::UniqueErrorReporter& _errorReporter, std::map const& _smtlib2Responses, ReadCallback::Callback const& _smtCallback, ModelCheckerSettings const& _settings, @@ -164,6 +165,12 @@ private: /// in a given _source. void defineInterfacesAndSummaries(SourceUnit const& _source); + /// Creates the rule + /// summary_function \land transaction_entry_constraints => external_summary_function + /// This is needed to add these transaction entry constraints which include + /// potential balance increase by external means, for example. + void defineExternalFunctionInterface(FunctionDefinition const& _function, ContractDefinition const& _contract); + /// Creates a CHC system that, for a given contract, /// - initializes its state variables (as 0 or given value, if any). /// - "calls" the explicit constructor function of the contract, if any. @@ -225,6 +232,13 @@ private: /// @returns a predicate that defines a function summary. smtutil::Expression summary(FunctionDefinition const& _function); smtutil::Expression summary(FunctionDefinition const& _function, ContractDefinition const& _contract); + /// @returns a predicate that applies a function summary + /// over the constrained variables. + smtutil::Expression summaryCall(FunctionDefinition const& _function); + smtutil::Expression summaryCall(FunctionDefinition const& _function, ContractDefinition const& _contract); + /// @returns a predicate that defines an external function summary. + smtutil::Expression externalSummary(FunctionDefinition const& _function); + smtutil::Expression externalSummary(FunctionDefinition const& _function, ContractDefinition const& _contract); //@} /// Solver related. @@ -317,6 +331,9 @@ private: /// Function predicates. std::map> m_summaries; + + /// External function predicates. + std::map> m_externalSummaries; //@} /// Variables. @@ -399,9 +416,6 @@ private: /// CHC solver. std::unique_ptr m_interface; - - /// ErrorReporter that comes from CompilerStack. - langutil::ErrorReporter& m_outerErrorReporter; }; } diff --git a/libsolidity/formal/ModelChecker.cpp b/libsolidity/formal/ModelChecker.cpp index 9b304f8ea..cf7a398ec 100644 --- a/libsolidity/formal/ModelChecker.cpp +++ b/libsolidity/formal/ModelChecker.cpp @@ -40,8 +40,8 @@ ModelChecker::ModelChecker( m_errorReporter(_errorReporter), m_settings(move(_settings)), m_context(), - m_bmc(m_context, _errorReporter, _smtlib2Responses, _smtCallback, m_settings, _charStreamProvider), - m_chc(m_context, _errorReporter, _smtlib2Responses, _smtCallback, m_settings, _charStreamProvider) + m_bmc(m_context, m_uniqueErrorReporter, _smtlib2Responses, _smtCallback, m_settings, _charStreamProvider), + m_chc(m_context, m_uniqueErrorReporter, _smtlib2Responses, _smtCallback, m_settings, _charStreamProvider) { } @@ -68,7 +68,7 @@ void ModelChecker::checkRequestedSourcesAndContracts(vectorlocation(), "The SMTChecker pragma has been deprecated and will be removed in the future. " @@ -125,6 +125,9 @@ void ModelChecker::analyze(SourceUnit const& _source) if (m_settings.engine.bmc) m_bmc.analyze(_source, solvedTargets); + + m_errorReporter.append(m_uniqueErrorReporter.errors()); + m_uniqueErrorReporter.clear(); } vector ModelChecker::unhandledQueries() diff --git a/libsolidity/formal/ModelChecker.h b/libsolidity/formal/ModelChecker.h index 8156e39e7..ff1e19f3b 100644 --- a/libsolidity/formal/ModelChecker.h +++ b/libsolidity/formal/ModelChecker.h @@ -31,7 +31,9 @@ #include #include + #include +#include namespace solidity::langutil { @@ -73,8 +75,16 @@ public: static smtutil::SMTSolverChoice availableSolvers(); private: + /// Error reporter from CompilerStack. + /// We need to append m_uniqueErrorReporter + /// to this one when the analysis is done. langutil::ErrorReporter& m_errorReporter; + /// Used by ModelChecker, SMTEncoder, BMC and CHC to avoid duplicates. + /// This is local to ModelChecker, so needs to be appended + /// to m_errorReporter at the end of the analysis. + langutil::UniqueErrorReporter m_uniqueErrorReporter; + ModelCheckerSettings m_settings; /// Stores the context of the encoding. diff --git a/libsolidity/formal/SMTEncoder.cpp b/libsolidity/formal/SMTEncoder.cpp index c1a5393e7..6ecb57a7f 100644 --- a/libsolidity/formal/SMTEncoder.cpp +++ b/libsolidity/formal/SMTEncoder.cpp @@ -34,8 +34,6 @@ #include -#include - #include @@ -48,20 +46,19 @@ using namespace solidity::frontend; SMTEncoder::SMTEncoder( smt::EncodingContext& _context, ModelCheckerSettings const& _settings, + UniqueErrorReporter& _errorReporter, langutil::CharStreamProvider const& _charStreamProvider ): - m_errorReporter(m_smtErrors), + m_errorReporter(_errorReporter), m_context(_context), m_settings(_settings), m_charStreamProvider(_charStreamProvider) { } -bool SMTEncoder::analyze(SourceUnit const& _source) +void SMTEncoder::resetSourceAnalysis() { - state().prepareForSourceUnit(_source); - - return true; + m_freeFunctions.clear(); } bool SMTEncoder::visit(ContractDefinition const& _contract) @@ -1980,26 +1977,32 @@ void SMTEncoder::assignment( indexOrMemberAssignment(*left, _right); else if (auto const* funCall = dynamic_cast(left)) { - if ( - auto funType = dynamic_cast(funCall->expression().annotation().type); - funType && funType->kind() == FunctionType::Kind::ArrayPush - ) + if (auto funType = dynamic_cast(funCall->expression().annotation().type)) { - auto memberAccess = dynamic_cast(&funCall->expression()); - solAssert(memberAccess, ""); - auto symbArray = dynamic_pointer_cast(m_context.expression(memberAccess->expression())); - solAssert(symbArray, ""); + if (funType->kind() == FunctionType::Kind::ArrayPush) + { + auto memberAccess = dynamic_cast(&funCall->expression()); + solAssert(memberAccess, ""); + auto symbArray = dynamic_pointer_cast(m_context.expression(memberAccess->expression())); + solAssert(symbArray, ""); - auto oldLength = symbArray->length(); - auto store = smtutil::Expression::store( - symbArray->elements(), - symbArray->length() - 1, - _right - ); - symbArray->increaseIndex(); - m_context.addAssertion(symbArray->elements() == store); - m_context.addAssertion(symbArray->length() == oldLength); - assignment(memberAccess->expression(), symbArray->currentValue()); + auto oldLength = symbArray->length(); + auto store = smtutil::Expression::store( + symbArray->elements(), + symbArray->length() - 1, + _right + ); + symbArray->increaseIndex(); + m_context.addAssertion(symbArray->elements() == store); + m_context.addAssertion(symbArray->length() == oldLength); + assignment(memberAccess->expression(), symbArray->currentValue()); + } + else if (funType->kind() == FunctionType::Kind::Internal) + { + for (auto type: funType->returnParameterTypes()) + if (type->category() == Type::Category::Mapping || dynamic_cast(type)) + resetReferences(type); + } } } else @@ -2283,9 +2286,7 @@ void SMTEncoder::resetStorageVariables() void SMTEncoder::resetBalances() { - // TODO this should be changed to `balances` only - // when `state` gets more members. - state().newState(); + state().newBalances(); } void SMTEncoder::resetReferences(VariableDeclaration const& _varDecl) diff --git a/libsolidity/formal/SMTEncoder.h b/libsolidity/formal/SMTEncoder.h index e8f876f40..7cf4b065e 100644 --- a/libsolidity/formal/SMTEncoder.h +++ b/libsolidity/formal/SMTEncoder.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -55,12 +55,10 @@ public: SMTEncoder( smt::EncodingContext& _context, ModelCheckerSettings const& _settings, + langutil::UniqueErrorReporter& _errorReporter, langutil::CharStreamProvider const& _charStreamProvider ); - /// @returns true if engine should proceed with analysis. - bool analyze(SourceUnit const& _sources); - /// @returns the leftmost identifier in a multi-d IndexAccess. static Expression const* leftmostBase(IndexAccess const& _indexAccess); @@ -122,6 +120,8 @@ public: static std::set sourceDependencies(SourceUnit const& _source); protected: + void resetSourceAnalysis(); + // TODO: Check that we do not have concurrent reads and writes to a variable, // because the order of expression evaluation is undefined // TODO: or just force a certain order, but people might have a different idea about that. @@ -420,11 +420,7 @@ protected: /// or unchecked arithmetic. bool m_checked = true; - /// Local SMTEncoder ErrorReporter. - /// This is necessary to show the "No SMT solver available" - /// warning before the others in case it's needed. - langutil::ErrorReporter m_errorReporter; - langutil::ErrorList m_smtErrors; + langutil::UniqueErrorReporter& m_errorReporter; /// Stores the current function/modifier call/invocation path. std::vector m_callStack; diff --git a/libsolidity/formal/SymbolicState.cpp b/libsolidity/formal/SymbolicState.cpp index 3789dd569..57ff725ba 100644 --- a/libsolidity/formal/SymbolicState.cpp +++ b/libsolidity/formal/SymbolicState.cpp @@ -78,10 +78,8 @@ void SymbolicState::reset() m_state.reset(); m_tx.reset(); m_crypto.reset(); - /// We don't reset m_abi's pointer nor clear m_abiMembers on purpose, - /// since it only helps to keep the already generated types. - solAssert(m_abi, ""); - m_abi->reset(); + if (m_abi) + m_abi->reset(); } smtutil::Expression SymbolicState::balances() const @@ -104,6 +102,14 @@ smtutil::Expression SymbolicState::blockhash(smtutil::Expression _blockNumber) c return smtutil::Expression::select(m_tx.member("blockhash"), move(_blockNumber)); } +void SymbolicState::newBalances() +{ + auto tupleSort = dynamic_pointer_cast(stateSort()); + auto balanceSort = tupleSort->components.at(tupleSort->memberToIndex.at("balances")); + SymbolicVariable newBalances(balanceSort, "fresh_balances_" + to_string(m_context.newUniqueId()), m_context); + m_state.assignMember("balances", newBalances.currentValue()); +} + void SymbolicState::transfer(smtutil::Expression _from, smtutil::Expression _to, smtutil::Expression _value) { unsigned indexBefore = m_state.index(); @@ -121,6 +127,16 @@ void SymbolicState::transfer(smtutil::Expression _from, smtutil::Expression _to, m_context.addAssertion(m_state.value() == newState); } +void SymbolicState::addBalance(smtutil::Expression _address, smtutil::Expression _value) +{ + auto newBalances = smtutil::Expression::store( + balances(), + _address, + balance(_address) + move(_value) + ); + m_state.assignMember("balances", newBalances); +} + smtutil::Expression SymbolicState::txMember(string const& _member) const { return m_tx.member(_member); @@ -181,16 +197,6 @@ void SymbolicState::prepareForSourceUnit(SourceUnit const& _source) /// Private helpers. -void SymbolicState::addBalance(smtutil::Expression _address, smtutil::Expression _value) -{ - auto newBalances = smtutil::Expression::store( - balances(), - _address, - balance(_address) + move(_value) - ); - m_state.assignMember("balances", newBalances); -} - void SymbolicState::buildABIFunctions(set const& _abiFunctions) { map functions; diff --git a/libsolidity/formal/SymbolicState.h b/libsolidity/formal/SymbolicState.h index d2f3016c3..309d545b8 100644 --- a/libsolidity/formal/SymbolicState.h +++ b/libsolidity/formal/SymbolicState.h @@ -108,6 +108,8 @@ public: smtutil::Expression state(unsigned _idx) const { return m_state.value(_idx); } smtutil::SortPointer const& stateSort() const { return m_state.sort(); } void newState() { m_state.newVar(); } + + void newBalances(); /// @returns the symbolic balances. smtutil::Expression balances() const; /// @returns the symbolic balance of address `this`. @@ -117,6 +119,9 @@ public: /// Transfer _value from _from to _to. void transfer(smtutil::Expression _from, smtutil::Expression _to, smtutil::Expression _value); + + /// Adds _value to _account's balance. + void addBalance(smtutil::Expression _account, smtutil::Expression _value); //@} /// Transaction data. @@ -163,9 +168,6 @@ public: //@} private: - /// Adds _value to _account's balance. - void addBalance(smtutil::Expression _account, smtutil::Expression _value); - /// Builds m_abi based on the abi.* calls _abiFunctions. void buildABIFunctions(std::set const& _abiFunctions); diff --git a/libsolidity/formal/SymbolicTypes.cpp b/libsolidity/formal/SymbolicTypes.cpp index a4c46604c..ba82a1666 100644 --- a/libsolidity/formal/SymbolicTypes.cpp +++ b/libsolidity/formal/SymbolicTypes.cpp @@ -551,6 +551,11 @@ smtutil::Expression symbolicUnknownConstraints(smtutil::Expression _expr, fronte solAssert(_type, ""); if (isEnum(*_type) || isInteger(*_type) || isAddress(*_type) || isFixedBytes(*_type)) return _expr >= minValue(_type) && _expr <= maxValue(_type); + else if ( + auto arrayType = dynamic_cast(_type); + arrayType && !arrayType->isDynamicallySized() + ) + return smtutil::Expression::tuple_get(_expr, 1) == arrayType->length(); else if (isArray(*_type) || isMapping(*_type)) /// Length cannot be negative. return smtutil::Expression::tuple_get(_expr, 1) >= 0; diff --git a/libsolidity/interface/FileReader.cpp b/libsolidity/interface/FileReader.cpp index 1ac1e531e..f00102e9e 100644 --- a/libsolidity/interface/FileReader.cpp +++ b/libsolidity/interface/FileReader.cpp @@ -22,6 +22,8 @@ #include #include +#include + using solidity::frontend::ReadCallback; using solidity::langutil::InternalCompilerError; using solidity::util::errinfo_comment; @@ -31,9 +33,22 @@ using std::string; namespace solidity::frontend { +void FileReader::setBasePath(boost::filesystem::path const& _path) +{ + m_basePath = (_path.empty() ? "" : normalizeCLIPathForVFS(_path)); +} + void FileReader::setSource(boost::filesystem::path const& _path, SourceCode _source) { - m_sourceCodes[_path.generic_string()] = std::move(_source); + boost::filesystem::path normalizedPath = normalizeCLIPathForVFS(_path); + boost::filesystem::path prefix = (m_basePath.empty() ? normalizeCLIPathForVFS(".") : m_basePath); + + m_sourceCodes[stripPrefixIfPresent(prefix, normalizedPath).generic_string()] = std::move(_source); +} + +void FileReader::setStdin(SourceCode _source) +{ + m_sourceCodes[""] = std::move(_source); } void FileReader::setSources(StringMap _sources) @@ -92,5 +107,138 @@ ReadCallback::Result FileReader::readFile(string const& _kind, string const& _so } } +boost::filesystem::path FileReader::normalizeCLIPathForVFS(boost::filesystem::path const& _path) +{ + // Detailed normalization rules: + // - Makes the path either be absolute or have slash as root (note that on Windows paths with + // slash as root are not considered absolute by Boost). If it is empty, it becomes + // the current working directory. + // - Collapses redundant . and .. segments. + // - Removes leading .. segments from an absolute path (i.e. /../../ becomes just /). + // - Squashes sequences of multiple path separators into one. + // - Ensures that forward slashes are used as path separators on all platforms. + // - Removes the root name (e.g. drive letter on Windows) when it matches the root name in the + // path to the current working directory. + // + // Also note that this function: + // - Does NOT resolve symlinks (except for symlinks in the path to the current working directory). + // - Does NOT check if the path refers to a file or a directory. If the path ends with a slash, + // the slash is preserved even if it's a file. + // - The only exception are paths where the file name is a dot (e.g. '.' or 'a/b/.'). These + // always have a trailing slash after normalization. + // - Preserves case. Even if the filesystem is case-insensitive but case-preserving and the + // case differs, the actual case from disk is NOT detected. + + boost::filesystem::path canonicalWorkDir = boost::filesystem::weakly_canonical(boost::filesystem::current_path()); + + // NOTE: On UNIX systems the path returned from current_path() has symlinks resolved while on + // Windows it does not. To get consistent results we resolve them on all platforms. + boost::filesystem::path absolutePath = boost::filesystem::absolute(_path, canonicalWorkDir); + + // NOTE: boost path preserves certain differences that are ignored by its operator ==. + // E.g. "a//b" vs "a/b" or "a/b/" vs "a/b/.". lexically_normal() does remove these differences. + boost::filesystem::path normalizedPath = absolutePath.lexically_normal(); + solAssert(normalizedPath.is_absolute() || normalizedPath.root_path() == "/", ""); + + // If the path is on the same drive as the working dir, for portability we prefer not to + // include the root name. Do this only for non-UNC paths - my experiments show that on Windows + // when the working dir is an UNC path, / does not not actually refer to the root of the UNC path. + boost::filesystem::path normalizedRootPath = normalizedPath.root_path(); + if (!isUNCPath(normalizedPath)) + { + boost::filesystem::path workingDirRootPath = canonicalWorkDir.root_path(); + if (normalizedRootPath == workingDirRootPath) + normalizedRootPath = "/"; + } + + // lexically_normal() will not squash paths like "/../../" into "/". We have to do it manually. + boost::filesystem::path dotDotPrefix = absoluteDotDotPrefix(normalizedPath); + + boost::filesystem::path normalizedPathNoDotDot = normalizedPath; + if (dotDotPrefix.empty()) + normalizedPathNoDotDot = normalizedRootPath / normalizedPath.relative_path(); + else + normalizedPathNoDotDot = normalizedRootPath / normalizedPath.lexically_relative(normalizedPath.root_path() / dotDotPrefix); + solAssert(!hasDotDotSegments(normalizedPathNoDotDot), ""); + + // NOTE: On Windows lexically_normal() converts all separators to forward slashes. Convert them back. + // Separators do not affect path comparison but remain in internal representation returned by native(). + // This will also normalize the root name to start with // in UNC paths. + normalizedPathNoDotDot = normalizedPathNoDotDot.generic_string(); + + // For some reason boost considers "/." different than "/" even though for other directories + // the trailing dot is ignored. + if (normalizedPathNoDotDot == "/.") + return "/"; + + return normalizedPathNoDotDot; } +bool FileReader::isPathPrefix(boost::filesystem::path const& _prefix, boost::filesystem::path const& _path) +{ + solAssert(!_prefix.empty() && !_path.empty(), ""); + // NOTE: On Windows paths starting with a slash (rather than a drive letter) are considered relative by boost. + solAssert(_prefix.is_absolute() || isUNCPath(_prefix) || _prefix.root_path() == "/", ""); + solAssert(_path.is_absolute() || isUNCPath(_path) || _path.root_path() == "/", ""); + solAssert(_prefix == _prefix.lexically_normal() && _path == _path.lexically_normal(), ""); + solAssert(!hasDotDotSegments(_prefix) && !hasDotDotSegments(_path), ""); + + boost::filesystem::path strippedPath = _path.lexically_relative( + // Before 1.72.0 lexically_relative() was not handling paths with empty, dot and dot dot segments + // correctly (see https://github.com/boostorg/filesystem/issues/76). The only case where this + // is possible after our normalization is a directory name ending in a slash (filename is a dot). + _prefix.filename_is_dot() ? _prefix.parent_path() : _prefix + ); + return !strippedPath.empty() && *strippedPath.begin() != ".."; +} + +boost::filesystem::path FileReader::stripPrefixIfPresent(boost::filesystem::path const& _prefix, boost::filesystem::path const& _path) +{ + if (!isPathPrefix(_prefix, _path)) + return _path; + + boost::filesystem::path strippedPath = _path.lexically_relative( + _prefix.filename_is_dot() ? _prefix.parent_path() : _prefix + ); + solAssert(strippedPath.empty() || *strippedPath.begin() != "..", ""); + return strippedPath; +} + +boost::filesystem::path FileReader::absoluteDotDotPrefix(boost::filesystem::path const& _path) +{ + solAssert(_path.is_absolute() || _path.root_path() == "/", ""); + + boost::filesystem::path _pathWithoutRoot = _path.relative_path(); + boost::filesystem::path prefix; + for (boost::filesystem::path const& segment: _pathWithoutRoot) + if (segment.filename_is_dot_dot()) + prefix /= segment; + + return prefix; +} + +bool FileReader::hasDotDotSegments(boost::filesystem::path const& _path) +{ + for (boost::filesystem::path const& segment: _path) + if (segment.filename_is_dot_dot()) + return true; + + return false; +} + +bool FileReader::isUNCPath(boost::filesystem::path const& _path) +{ + string rootName = _path.root_name().string(); + + return ( + rootName.size() == 2 || + (rootName.size() > 2 && rootName[2] != rootName[1]) + ) && ( + (rootName[0] == '/' && rootName[1] == '/') +#if defined(_WIN32) + || (rootName[0] == '\\' && rootName[1] == '\\') +#endif + ); +} + +} diff --git a/libsolidity/interface/FileReader.h b/libsolidity/interface/FileReader.h index 5aca710db..bbe24d264 100644 --- a/libsolidity/interface/FileReader.h +++ b/libsolidity/interface/FileReader.h @@ -45,12 +45,13 @@ public: boost::filesystem::path _basePath = {}, FileSystemPathSet _allowedDirectories = {} ): - m_basePath(std::move(_basePath)), m_allowedDirectories(std::move(_allowedDirectories)), m_sourceCodes() - {} + { + setBasePath(_basePath); + } - void setBasePath(boost::filesystem::path _path) { m_basePath = std::move(_path); } + void setBasePath(boost::filesystem::path const& _path); boost::filesystem::path const& basePath() const noexcept { return m_basePath; } void allowDirectory(boost::filesystem::path _path) { m_allowedDirectories.insert(std::move(_path)); } @@ -58,17 +59,21 @@ public: StringMap const& sourceCodes() const noexcept { return m_sourceCodes; } - /// Retrieves the source code for a given source unit ID. + /// Retrieves the source code for a given source unit name. SourceCode const& sourceCode(SourceUnitName const& _sourceUnitName) const { return m_sourceCodes.at(_sourceUnitName); } - /// Resets all sources to the given map of source unit ID to source codes. + /// Resets all sources to the given map of source unit name to source codes. /// Does not enforce @a allowedDirectories(). void setSources(StringMap _sources); - /// Adds the source code for a given source unit ID. + /// Adds the source code under a source unit name created by normalizing the file path. /// Does not enforce @a allowedDirectories(). void setSource(boost::filesystem::path const& _path, SourceCode _source); + /// Adds the source code under the source unit name of @a . + /// Does not enforce @a allowedDirectories(). + void setStdin(SourceCode _source); + /// Receives a @p _sourceUnitName that refers to a source unit in compiler's virtual filesystem /// and attempts to interpret it as a path and read the corresponding file from disk. /// The read will only succeed if the canonical path of the file is within one of the @a allowedDirectories(). @@ -83,7 +88,43 @@ public: return [this](std::string const& _kind, std::string const& _path) { return readFile(_kind, _path); }; } + /// Normalizes a filesystem path to make it include all components up to the filesystem root, + /// remove small, inconsequential differences that do not affect the meaning and make it look + /// the same on all platforms (if possible). Symlinks in the path are not resolved. + /// The resulting path uses forward slashes as path separators, has no redundant separators, + /// has no redundant . or .. segments and has no root name if removing it does not change the meaning. + /// The path does not have to actually exist. + static boost::filesystem::path normalizeCLIPathForVFS(boost::filesystem::path const& _path); + + /// @returns true if all the path components of @a _prefix are present at the beginning of @a _path. + /// Both paths must be absolute (or have slash as root) and normalized (no . or .. segments, no + /// multiple consecutive slashes). + /// Paths are treated as case-sensitive. Does not require the path to actually exist in the + /// filesystem and does not follow symlinks. Only considers whole segments, e.g. /abc/d is not + /// considered a prefix of /abc/def. Both paths must be non-empty. + /// Ignores the trailing slash, i.e. /a/b/c.sol/ is treated as a valid prefix of /a/b/c.sol. + static bool isPathPrefix(boost::filesystem::path const& _prefix, boost::filesystem::path const& _path); + + /// If @a _prefix is actually a prefix of @p _path, removes it from @a _path to make it relative. + /// @returns The path without the prefix or unchanged path if there is not prefix. + /// If @a _path and @_prefix are identical, the result is '.'. + static boost::filesystem::path stripPrefixIfPresent(boost::filesystem::path const& _prefix, boost::filesystem::path const& _path); + + /// @returns true if the specified path is an UNC path. + /// UNC paths start with // followed by a name (on Windows they can also start with \\). + /// They are used for network shares on Windows. On UNIX systems they do not have the same + /// functionality but usually they are still recognized and treated in a special way. + static bool isUNCPath(boost::filesystem::path const& _path); + private: + /// If @a _path starts with a number of .. segments, returns a path consisting only of those + /// segments (root name is not included). Otherwise returns an empty path. @a _path must be + /// absolute (or have slash as root). + static boost::filesystem::path absoluteDotDotPrefix(boost::filesystem::path const& _path); + + /// @returns true if the path contains any .. segments. + static bool hasDotDotSegments(boost::filesystem::path const& _path); + /// Base path, used for resolving relative paths in imports. boost::filesystem::path m_basePath; diff --git a/libsolidity/parsing/DocStringParser.cpp b/libsolidity/parsing/DocStringParser.cpp index d5a849751..5c07950ed 100644 --- a/libsolidity/parsing/DocStringParser.cpp +++ b/libsolidity/parsing/DocStringParser.cpp @@ -24,8 +24,9 @@ #include #include -#include -#include +#include +#include +#include using namespace std; using namespace solidity; @@ -52,8 +53,7 @@ string::const_iterator firstNonIdentifier( if (currPos == _pos && isIdentifierStart(*currPos)) { currPos++; - while (currPos != _end && isIdentifierPart(*currPos)) - currPos++; + currPos = ranges::find_if_not(ranges::make_subrange(currPos, _end), isIdentifierPart); } return currPos; } @@ -63,7 +63,7 @@ string::const_iterator firstWhitespaceOrNewline( string::const_iterator _end ) { - return boost::range::find_first_of(make_pair(_pos, _end), " \t\n"); + return ranges::find_first_of(ranges::make_subrange(_pos, _end), " \t\n"); } @@ -72,10 +72,8 @@ string::const_iterator skipWhitespace( string::const_iterator _end ) { - auto currPos = _pos; - while (currPos != _end && (*currPos == ' ' || *currPos == '\t')) - currPos += 1; - return currPos; + auto isWhitespace = [](char const& c) { return (c == ' ' || c == '\t'); }; + return ranges::find_if_not(ranges::make_subrange(_pos, _end), isWhitespace); } } diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 092ebb2b0..549991d61 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -451,7 +451,7 @@ bool CommandLineInterface::readInputFiles() m_standardJsonInput = readUntilEnd(m_sin); } else - m_fileReader.setSource(g_stdinFileName, readUntilEnd(m_sin)); + m_fileReader.setStdin(readUntilEnd(m_sin)); } if (m_fileReader.sourceCodes().empty() && !m_standardJsonInput.has_value()) diff --git a/solc/CommandLineParser.cpp b/solc/CommandLineParser.cpp index 0ccd99d0b..8ce0dfcfe 100644 --- a/solc/CommandLineParser.cpp +++ b/solc/CommandLineParser.cpp @@ -927,6 +927,16 @@ General Information)").c_str(), else m_options.input.mode = InputMode::Compiler; + if ( + m_args.count(g_strExperimentalViaIR) > 0 && + m_options.input.mode != InputMode::Compiler && + m_options.input.mode != InputMode::CompilerWithASTImport + ) + { + serr() << "The option --" << g_strExperimentalViaIR << " is only supported in the compiler mode." << endl; + return false; + } + if (!parseInputPathsAndRemappings()) return false; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bb15c256a..fa55d76a2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -103,6 +103,7 @@ set(libsolidity_sources libsolidity/SyntaxTest.h libsolidity/ViewPureChecker.cpp libsolidity/analysis/FunctionCallGraph.cpp + libsolidity/interface/FileReader.cpp ) detect_stray_source_files("${libsolidity_sources}" "libsolidity/") diff --git a/test/FilesystemUtils.cpp b/test/FilesystemUtils.cpp index cdad58e62..c016f7fd1 100644 --- a/test/FilesystemUtils.cpp +++ b/test/FilesystemUtils.cpp @@ -39,7 +39,7 @@ void solidity::test::createFilesWithParentDirs(set cons } } -void solidity::test::createFileWithContent(boost::filesystem::path const& _path, string const& content) +void solidity::test::createFileWithContent(boost::filesystem::path const& _path, string const& _content) { if (boost::filesystem::is_regular_file(_path)) BOOST_THROW_EXCEPTION(runtime_error("File already exists: \"" + _path.string() + "\".")); \ @@ -49,16 +49,21 @@ void solidity::test::createFileWithContent(boost::filesystem::path const& _path, if (newFile.fail() || !boost::filesystem::is_regular_file(_path)) BOOST_THROW_EXCEPTION(runtime_error("Failed to create a file: \"" + _path.string() + "\".")); \ - newFile << content; + newFile << _content; } bool solidity::test::createSymlinkIfSupportedByFilesystem( boost::filesystem::path const& _targetPath, - boost::filesystem::path const& _linkName + boost::filesystem::path const& _linkName, + bool _directorySymlink ) { boost::system::error_code symlinkCreationError; - boost::filesystem::create_symlink(_targetPath, _linkName, symlinkCreationError); + + if (_directorySymlink) + boost::filesystem::create_directory_symlink(_targetPath, _linkName, symlinkCreationError); + else + boost::filesystem::create_symlink(_targetPath, _linkName, symlinkCreationError); if (!symlinkCreationError) return true; diff --git a/test/FilesystemUtils.h b/test/FilesystemUtils.h index 291188114..f993ce03d 100644 --- a/test/FilesystemUtils.h +++ b/test/FilesystemUtils.h @@ -35,16 +35,20 @@ void createFilesWithParentDirs(std::set const& _paths, /// Creates a file with the exact content specified in the second argument. /// Throws an exception if the file already exists or if the parent directory of the file does not. -void createFileWithContent(boost::filesystem::path const& _path, std::string const& content); +void createFileWithContent(boost::filesystem::path const& _path, std::string const& _content); /// Creates a symlink between two paths. /// The target does not have to exist. +/// If @p directorySymlink is true, indicate to the operating system that this is a directory +/// symlink. On some systems (e.g. Windows) it's possible to create a non-directory symlink pointing +/// at a directory, which makes such a symlinks unusable. /// @returns true if the symlink has been successfully created, false if the filesystem does not /// support symlinks. /// Throws an exception of the operation fails for a different reason. bool createSymlinkIfSupportedByFilesystem( boost::filesystem::path const& _targetPath, - boost::filesystem::path const& _linkName + boost::filesystem::path const& _linkName, + bool _directorySymlink ); } diff --git a/test/TemporaryDirectory.cpp b/test/TemporaryDirectory.cpp index e84cfa873..51c1ba9af 100644 --- a/test/TemporaryDirectory.cpp +++ b/test/TemporaryDirectory.cpp @@ -18,9 +18,11 @@ #include +#include + +#include #include -#include #include #include @@ -31,21 +33,39 @@ using namespace solidity::test; namespace fs = boost::filesystem; TemporaryDirectory::TemporaryDirectory(std::string const& _prefix): - m_path(fs::temp_directory_path() / fs::unique_path(_prefix + "%%%%-%%%%-%%%%-%%%%")) + m_path(fs::temp_directory_path() / fs::unique_path(_prefix + "-%%%%-%%%%-%%%%-%%%%")) { // Prefix should just be a file name and not contain anything that would make us step out of /tmp. - assert(fs::path(_prefix) == fs::path(_prefix).stem()); + soltestAssert(fs::path(_prefix) == fs::path(_prefix).stem(), ""); fs::create_directory(m_path); } +TemporaryDirectory::TemporaryDirectory( + vector const& _subdirectories, + string const& _prefix +): + TemporaryDirectory(_prefix) +{ + for (boost::filesystem::path const& subdirectory: _subdirectories) + { + soltestAssert(!subdirectory.is_absolute() && subdirectory.root_path() != "/", ""); + soltestAssert( + m_path.lexically_relative(subdirectory).empty() || + *m_path.lexically_relative(subdirectory).begin() != "..", + "" + ); + boost::filesystem::create_directories(m_path / subdirectory); + } +} + TemporaryDirectory::~TemporaryDirectory() { // A few paranoid sanity checks just to be extra sure we're not deleting someone's homework. - assert(m_path.string().find(fs::temp_directory_path().string()) == 0); - assert(!fs::equivalent(m_path, fs::temp_directory_path())); - assert(!fs::equivalent(m_path, m_path.root_path())); - assert(!m_path.empty()); + soltestAssert(m_path.string().find(fs::temp_directory_path().string()) == 0, ""); + soltestAssert(!fs::equivalent(m_path, fs::temp_directory_path()), ""); + soltestAssert(!fs::equivalent(m_path, m_path.root_path()), ""); + soltestAssert(!m_path.empty(), ""); boost::system::error_code errorCode; uintmax_t numRemoved = fs::remove_all(m_path, errorCode); diff --git a/test/TemporaryDirectory.h b/test/TemporaryDirectory.h index 47f6cd2a0..94ecdca13 100644 --- a/test/TemporaryDirectory.h +++ b/test/TemporaryDirectory.h @@ -25,6 +25,7 @@ #include #include +#include namespace solidity::test { @@ -40,10 +41,15 @@ namespace solidity::test class TemporaryDirectory { public: - TemporaryDirectory(std::string const& _prefix = "solidity-test-"); + TemporaryDirectory(std::string const& _prefix = "solidity-test"); + TemporaryDirectory( + std::vector const& _subdirectories, + std::string const& _prefix = "solidity-test" + ); ~TemporaryDirectory(); boost::filesystem::path const& path() const { return m_path; } + operator boost::filesystem::path() const { return m_path; } private: boost::filesystem::path m_path; @@ -59,6 +65,7 @@ public: ~TemporaryWorkingDirectory(); boost::filesystem::path const& originalWorkingDirectory() const { return m_originalWorkingDirectory; } + operator boost::filesystem::path() const { return boost::filesystem::current_path(); } private: boost::filesystem::path m_originalWorkingDirectory; diff --git a/test/TemporaryDirectoryTest.cpp b/test/TemporaryDirectoryTest.cpp index cfc669f56..1fef44c3e 100644 --- a/test/TemporaryDirectoryTest.cpp +++ b/test/TemporaryDirectoryTest.cpp @@ -18,6 +18,8 @@ #include +#include + #include #include @@ -26,8 +28,6 @@ using namespace std; using namespace boost::test_tools; -namespace fs = boost::filesystem; - namespace solidity::test { @@ -35,59 +35,72 @@ BOOST_AUTO_TEST_SUITE(TemporaryDirectoryTest) BOOST_AUTO_TEST_CASE(TemporaryDirectory_should_create_and_delete_a_unique_and_empty_directory) { - fs::path dirPath; + boost::filesystem::path dirPath; { - TemporaryDirectory tempDir("temporary-directory-test-"); + TemporaryDirectory tempDir("temporary-directory-test"); dirPath = tempDir.path(); - BOOST_TEST(dirPath.stem().string().find("temporary-directory-test-") == 0); - BOOST_TEST(fs::equivalent(dirPath.parent_path(), fs::temp_directory_path())); - BOOST_TEST(fs::is_directory(dirPath)); - BOOST_TEST(fs::is_empty(dirPath)); + BOOST_TEST(dirPath.stem().string().find("temporary-directory-test") == 0); + BOOST_TEST(boost::filesystem::equivalent(dirPath.parent_path(), boost::filesystem::temp_directory_path())); + BOOST_TEST(boost::filesystem::is_directory(dirPath)); + BOOST_TEST(boost::filesystem::is_empty(dirPath)); } - BOOST_TEST(!fs::exists(dirPath)); + BOOST_TEST(!boost::filesystem::exists(dirPath)); } BOOST_AUTO_TEST_CASE(TemporaryDirectory_should_delete_its_directory_even_if_not_empty) { - fs::path dirPath; + boost::filesystem::path dirPath; { - TemporaryDirectory tempDir("temporary-directory-test-"); + TemporaryDirectory tempDir("temporary-directory-test"); dirPath = tempDir.path(); - BOOST_TEST(fs::is_directory(dirPath)); + BOOST_TEST(boost::filesystem::is_directory(dirPath)); { ofstream tmpFile((dirPath / "test-file.txt").string()); tmpFile << "Delete me!" << endl; } - assert(fs::is_regular_file(dirPath / "test-file.txt")); + soltestAssert(boost::filesystem::is_regular_file(dirPath / "test-file.txt"), ""); + } + BOOST_TEST(!boost::filesystem::exists(dirPath / "test-file.txt")); +} + +BOOST_AUTO_TEST_CASE(TemporaryDirectory_should_create_subdirectories) +{ + boost::filesystem::path dirPath; + { + TemporaryDirectory tempDir({"a", "a/", "a/b/c", "x.y/z"}, "temporary-directory-test"); + dirPath = tempDir.path(); + + BOOST_TEST(boost::filesystem::is_directory(dirPath / "a")); + BOOST_TEST(boost::filesystem::is_directory(dirPath / "a/b/c")); + BOOST_TEST(boost::filesystem::is_directory(dirPath / "x.y/z")); } - BOOST_TEST(!fs::exists(dirPath / "test-file.txt")); } BOOST_AUTO_TEST_CASE(TemporaryWorkingDirectory_should_change_and_restore_working_directory) { - fs::path originalWorkingDirectory = fs::current_path(); + boost::filesystem::path originalWorkingDirectory = boost::filesystem::current_path(); try { { - TemporaryDirectory tempDir("temporary-directory-test-"); - assert(fs::equivalent(fs::current_path(), originalWorkingDirectory)); - assert(!fs::equivalent(tempDir.path(), originalWorkingDirectory)); + TemporaryDirectory tempDir("temporary-directory-test"); + soltestAssert(boost::filesystem::equivalent(boost::filesystem::current_path(), originalWorkingDirectory), ""); + soltestAssert(!boost::filesystem::equivalent(tempDir.path(), originalWorkingDirectory), ""); TemporaryWorkingDirectory tempWorkDir(tempDir.path()); - BOOST_TEST(fs::equivalent(fs::current_path(), tempDir.path())); + BOOST_TEST(boost::filesystem::equivalent(boost::filesystem::current_path(), tempDir.path())); } - BOOST_TEST(fs::equivalent(fs::current_path(), originalWorkingDirectory)); + BOOST_TEST(boost::filesystem::equivalent(boost::filesystem::current_path(), originalWorkingDirectory)); - fs::current_path(originalWorkingDirectory); + boost::filesystem::current_path(originalWorkingDirectory); } catch (...) { - fs::current_path(originalWorkingDirectory); + boost::filesystem::current_path(originalWorkingDirectory); } } diff --git a/test/cmdlineTests/model_checker_solvers_smtlib2/err b/test/cmdlineTests/model_checker_solvers_smtlib2/err index 9a156ff90..3aa989348 100644 --- a/test/cmdlineTests/model_checker_solvers_smtlib2/err +++ b/test/cmdlineTests/model_checker_solvers_smtlib2/err @@ -1,3 +1,7 @@ +Warning: CHC: 1 verification condition(s) could not be proved. Enable the model checker option "show unproved" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query. + Warning: CHC analysis was not possible. No Horn solver was available. None of the installed solvers was enabled. +Warning: BMC: 1 verification condition(s) could not be proved. Enable the model checker option "show unproved" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query. + Warning: BMC analysis was not possible. No SMT solver (Z3 or CVC4) was available. None of the installed solvers was enabled. diff --git a/test/cmdlineTests/standard_model_checker_contracts_multi_source/output.json b/test/cmdlineTests/standard_model_checker_contracts_multi_source/output.json index 2f260231c..955b97025 100644 --- a/test/cmdlineTests/standard_model_checker_contracts_multi_source/output.json +++ b/test/cmdlineTests/standard_model_checker_contracts_multi_source/output.json @@ -41,46 +41,6 @@ A.constructor() A.f(0)","severity":"warning","sourceLocation":{"end":231,"file":"Source","start":218},"type":"Warning"},{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here. Counterexample: -y = 0 - -Transaction trace: -A.constructor() -B.g(0) - --> Source:5:7: - | -5 | \t\t\t\t\t\tassert(y > 0); - | \t\t\t\t\t\t^^^^^^^^^^^^^ - -","message":"CHC: Assertion violation happens here. -Counterexample: - -y = 0 - -Transaction trace: -A.constructor() -B.g(0)","severity":"warning","sourceLocation":{"end":137,"file":"Source","start":124},"type":"Warning"},{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here. -Counterexample: - -x = 0 - -Transaction trace: -A.constructor() -A.f(0) - --> Source:10:7: - | -10 | \t\t\t\t\t\tassert(x > 0); - | \t\t\t\t\t\t^^^^^^^^^^^^^ - -","message":"CHC: Assertion violation happens here. -Counterexample: - -x = 0 - -Transaction trace: -A.constructor() -A.f(0)","severity":"warning","sourceLocation":{"end":231,"file":"Source","start":218},"type":"Warning"},{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here. -Counterexample: - z = 0 Transaction trace: diff --git a/test/cmdlineTests/standard_model_checker_solvers_smtlib2/output.json b/test/cmdlineTests/standard_model_checker_solvers_smtlib2/output.json index e5f9636df..866727f4b 100644 --- a/test/cmdlineTests/standard_model_checker_solvers_smtlib2/output.json +++ b/test/cmdlineTests/standard_model_checker_solvers_smtlib2/output.json @@ -24,7 +24,7 @@ (assert (= |EVALEXPR_0| x_3_0)) (check-sat) (get-value (|EVALEXPR_0| )) -","0xa51d18d2c7cb0481228dd7dd4e7debb5d54580595265d16f67b236faa98f4862":"(set-logic HORN) +","0x4e70784a8a93c7429a716aa8b778f3de5d1f63b30158452534da5d44e5967d2b":"(set-logic HORN) (declare-datatypes ((|state_type| 0)) (((|state_type| (|balances| (Array Int Int)))))) (declare-datatypes ((|bytes_tuple| 0)) (((|bytes_tuple| (|bytes_tuple_accessor_array| (Array Int Int)) (|bytes_tuple_accessor_length| Int))))) @@ -41,100 +41,116 @@ (declare-fun |summary_3_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) +(declare-fun |summary_4_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) (assert (forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (nondet_interface_1_C_14_0 error_0 this_0 abi_0 crypto_0 state_0 state_1) true) (and (= error_0 0) (summary_3_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_1 x_3_0 state_2 x_3_1))) (nondet_interface_1_C_14_0 error_1 this_0 abi_0 crypto_0 state_0 state_2)))) +(=> (and (and (nondet_interface_1_C_14_0 error_0 this_0 abi_0 crypto_0 state_0 state_1) true) (and (= error_0 0) (summary_4_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_1 x_3_0 state_2 x_3_1))) (nondet_interface_1_C_14_0 error_1 this_0 abi_0 crypto_0 state_0 state_2)))) -(declare-fun |block_4_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) -(declare-fun |block_5_f_12_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) +(declare-fun |block_5_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) +(declare-fun |block_6_f_12_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) (assert (forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(block_4_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1))) +(block_5_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1))) (assert (forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (block_4_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (and (and (and (and (= state_1 state_0) (= error_0 0)) true) (and true (= x_3_1 x_3_0))) true)) true) (block_5_f_12_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) +(=> (and (and (block_5_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (and (and (and (and (= state_1 state_0) (= error_0 0)) true) (and true (= x_3_1 x_3_0))) true)) true) (block_6_f_12_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) -(declare-fun |block_6_return_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) -(declare-fun |block_7_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) +(declare-fun |block_7_return_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) +(declare-fun |block_8_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) (assert (forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (block_5_f_12_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (and (= expr_9_1 (> expr_7_0 expr_8_0)) (and (=> true true) (and (= expr_8_0 0) (and (=> true (and (>= expr_7_0 0) (<= expr_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_7_0 x_3_1) (and (and (>= x_3_1 0) (<= x_3_1 115792089237316195423570985008687907853269984665640564039457584007913129639935)) true))))))) (and (not expr_9_1) (= error_1 1))) (block_7_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) +(=> (and (and (block_6_f_12_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (and (= expr_9_1 (> expr_7_0 expr_8_0)) (and (=> true true) (and (= expr_8_0 0) (and (=> true (and (>= expr_7_0 0) (<= expr_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_7_0 x_3_1) (and (and (>= x_3_1 0) (<= x_3_1 115792089237316195423570985008687907853269984665640564039457584007913129639935)) true))))))) (and (not expr_9_1) (= error_1 1))) (block_8_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) (assert (forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (block_7_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (summary_3_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) +(=> (block_8_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (summary_3_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) (assert (forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (block_5_f_12_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (and (= error_1 error_0) (and (= expr_9_1 (> expr_7_0 expr_8_0)) (and (=> true true) (and (= expr_8_0 0) (and (=> true (and (>= expr_7_0 0) (<= expr_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_7_0 x_3_1) (and (and (>= x_3_1 0) (<= x_3_1 115792089237316195423570985008687907853269984665640564039457584007913129639935)) true)))))))) true) (block_6_return_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) +(=> (and (and (block_6_f_12_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (and (= error_1 error_0) (and (= expr_9_1 (> expr_7_0 expr_8_0)) (and (=> true true) (and (= expr_8_0 0) (and (=> true (and (>= expr_7_0 0) (<= expr_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_7_0 x_3_1) (and (and (>= x_3_1 0) (<= x_3_1 115792089237316195423570985008687907853269984665640564039457584007913129639935)) true)))))))) true) (block_7_return_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) (assert (forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (block_6_return_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) true) true) (summary_3_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) +(=> (and (and (block_7_return_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) true) true) (summary_3_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)))) + + +(declare-fun |block_9_function_f__13_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| Int |state_type| Int ) Bool) +(assert +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) +(block_9_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1))) (assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (interface_0_C_14_0 this_0 abi_0 crypto_0 state_0) true) (and (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3017696395)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 179)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 222)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 100)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 139)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) (summary_3_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)) (= error_0 0))) (interface_0_C_14_0 this_0 abi_0 crypto_0 state_1)))) - - -(declare-fun |contract_initializer_8_C_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| |state_type| ) Bool) -(declare-fun |contract_initializer_entry_9_C_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| |state_type| ) Bool) -(assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (= state_1 state_0) (= error_0 0)) true) (contract_initializer_entry_9_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1)))) - - -(declare-fun |contract_initializer_after_init_10_C_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| |state_type| ) Bool) -(assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (contract_initializer_entry_9_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) true) true) (contract_initializer_after_init_10_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1)))) +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (block_9_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (and (summary_3_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_2 x_3_1 state_3 x_3_2) (and (= state_2 (|state_type| (store (|balances| state_1) this_0 (+ (select (|balances| state_1) this_0) funds_2_0)))) (and (and (>= (+ (select (|balances| state_1) this_0) funds_2_0) 0) (<= (+ (select (|balances| state_1) this_0) funds_2_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= funds_2_0 (|msg.value| tx_0)) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3017696395)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 179)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 222)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 100)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 139)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) (and (and (and (and (= state_1 state_0) (= error_0 0)) true) (and true (= x_3_1 x_3_0))) true))))))) true) (summary_4_function_f__13_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_3 x_3_2)))) (assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (contract_initializer_after_init_10_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) true) true) (contract_initializer_8_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1)))) +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (interface_0_C_14_0 this_0 abi_0 crypto_0 state_0) true) (and (summary_4_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (= error_0 0))) (interface_0_C_14_0 this_0 abi_0 crypto_0 state_1)))) -(declare-fun |implicit_constructor_entry_11_C_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| |state_type| ) Bool) +(declare-fun |contract_initializer_10_C_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| |state_type| ) Bool) +(declare-fun |contract_initializer_entry_11_C_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| |state_type| ) Bool) (assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (and (= state_1 state_0) (= error_0 0)) true) true) (implicit_constructor_entry_11_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1)))) +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (= state_1 state_0) (= error_0 0)) true) (contract_initializer_entry_11_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1)))) + + +(declare-fun |contract_initializer_after_init_12_C_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| |state_type| ) Bool) +(assert +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (contract_initializer_entry_11_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) true) true) (contract_initializer_after_init_12_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1)))) (assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (implicit_constructor_entry_11_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) (and (contract_initializer_8_C_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_1 state_2) true)) (> error_1 0)) (summary_constructor_2_C_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 state_2)))) +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (contract_initializer_after_init_12_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) true) true) (contract_initializer_10_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1)))) + + +(declare-fun |implicit_constructor_entry_13_C_14_0| (Int Int |abi_type| |crypto_type| |tx_type| |state_type| |state_type| ) Bool) +(assert +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (and (and (= state_1 state_0) (= error_0 0)) true) true) (>= (select (|balances| state_1) this_0) (|msg.value| tx_0))) (implicit_constructor_entry_13_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1)))) (assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) -(=> (and (and (implicit_constructor_entry_11_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) (and (= error_1 0) (and (contract_initializer_8_C_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_1 state_2) true))) true) (summary_constructor_2_C_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 state_2)))) +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (implicit_constructor_entry_13_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) (and (contract_initializer_10_C_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_1 state_2) true)) (> error_1 0)) (summary_constructor_2_C_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 state_2)))) (assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int)) +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (implicit_constructor_entry_13_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) (and (= error_1 0) (and (contract_initializer_10_C_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_1 state_2) true))) true) (summary_constructor_2_C_14_0 error_1 this_0 abi_0 crypto_0 tx_0 state_0 state_2)))) + + +(assert +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) (=> (and (and (summary_constructor_2_C_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 state_1) true) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (= (|msg.value| tx_0) 0)) (= error_0 0))) (interface_0_C_14_0 this_0 abi_0 crypto_0 state_1)))) -(declare-fun |error_target_2_0| () Bool) +(declare-fun |error_target_3_0| () Bool) (assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) -(=> (and (and (interface_0_C_14_0 this_0 abi_0 crypto_0 state_0) true) (and (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3017696395)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 179)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 222)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 100)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 139)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) (summary_3_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1)) (= error_0 1))) error_target_2_0))) +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> (and (and (interface_0_C_14_0 this_0 abi_0 crypto_0 state_0) true) (and (summary_4_function_f__13_14_0 error_0 this_0 abi_0 crypto_0 tx_0 state_0 x_3_0 state_1 x_3_1) (= error_0 1))) error_target_3_0))) (assert -(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) -(=> error_target_2_0 false))) -(check-sat)"}},"errors":[{"component":"general","errorCode":"3996","formattedMessage":"Warning: CHC analysis was not possible. No Horn solver was available. None of the installed solvers was enabled. +(forall ( (abi_0 |abi_type|) (crypto_0 |crypto_type|) (error_0 Int) (error_1 Int) (expr_7_0 Int) (expr_8_0 Int) (expr_9_1 Bool) (funds_2_0 Int) (state_0 |state_type|) (state_1 |state_type|) (state_2 |state_type|) (state_3 |state_type|) (this_0 Int) (tx_0 |tx_type|) (x_3_0 Int) (x_3_1 Int) (x_3_2 Int)) +(=> error_target_3_0 false))) +(check-sat)"}},"errors":[{"component":"general","errorCode":"5840","formattedMessage":"Warning: CHC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query. -","message":"CHC analysis was not possible. No Horn solver was available. None of the installed solvers was enabled.","severity":"warning","type":"Warning"},{"component":"general","errorCode":"8084","formattedMessage":"Warning: BMC analysis was not possible. No SMT solver (Z3 or CVC4) was available. None of the installed solvers was enabled. +","message":"CHC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.","severity":"warning","type":"Warning"},{"component":"general","errorCode":"3996","formattedMessage":"Warning: CHC analysis was not possible. No Horn solver was available. None of the installed solvers was enabled. + +","message":"CHC analysis was not possible. No Horn solver was available. None of the installed solvers was enabled.","severity":"warning","type":"Warning"},{"component":"general","errorCode":"2788","formattedMessage":"Warning: BMC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query. + +","message":"BMC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.","severity":"warning","type":"Warning"},{"component":"general","errorCode":"8084","formattedMessage":"Warning: BMC analysis was not possible. No SMT solver (Z3 or CVC4) was available. None of the installed solvers was enabled. ","message":"BMC analysis was not possible. No SMT solver (Z3 or CVC4) was available. None of the installed solvers was enabled.","severity":"warning","type":"Warning"}],"sources":{"A":{"id":0}}} diff --git a/test/cmdlineTests/standard_model_checker_targets_default_all_engines/output.json b/test/cmdlineTests/standard_model_checker_targets_default_all_engines/output.json index b0eb45c29..d5491b274 100644 --- a/test/cmdlineTests/standard_model_checker_targets_default_all_engines/output.json +++ b/test/cmdlineTests/standard_model_checker_targets_default_all_engines/output.json @@ -30,7 +30,7 @@ (assert (and (and (and true true) (and (= expr_14_1 (>= expr_12_0 expr_13_0)) (and (=> (and true true) true) (and (= expr_13_0 0) (and (=> (and true true) (and (>= expr_12_0 0) (<= expr_12_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_12_0 x_8_0) (and (and (>= x_8_0 0) (<= x_8_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= a_6_0 0) (<= a_6_0 1461501637330902918203684832716283019655932542975)) (and (>= (|uint_array_tuple_accessor_length| arr_4_length_pair_1) 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 1917212865)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 114)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 70)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 88)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 193)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true)))))))))) (not expr_14_1))) (check-sat) -","0x7bc2dabee60a201f5515fdb8dd9d201cff4e984c3f7c74d87fbdb6e6070e6252":"(set-option :produce-models true) +","0xa7b2de16abc4c0f0f9e2c540a576178d99cb73a01cf0d0d1d62d51735c6d3b44":"(set-option :produce-models true) (set-logic ALL) (declare-datatypes ((|uint_array_tuple| 0)) (((|uint_array_tuple| (|uint_array_tuple_accessor_array| (Array Int Int)) (|uint_array_tuple_accessor_length| Int))))) (declare-fun |arr_4_length_pair_2| () |uint_array_tuple|) @@ -67,8 +67,8 @@ (declare-fun |expr_26_1| () Int) (declare-fun |expr_28_0| () Int) (declare-fun |expr_29_0| () Int) -(declare-fun |d_div_mod_10_0| () Int) -(declare-fun |r_div_mod_10_0| () Int) +(declare-fun |d_div_mod_11_0| () Int) +(declare-fun |r_div_mod_11_0| () Int) (declare-fun |expr_30_1| () Int) (declare-fun |expr_32_0| () Int) (declare-fun |expr_35_0| () Int) @@ -84,7 +84,7 @@ (declare-fun |expr_50_0| () Int) (declare-fun |expr_51_1| () Int) -(assert (and (and (and true true) (and (=> (and true true) (and (>= expr_35_0 0) (<= expr_35_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_35_0 x_8_1) (and (=> (and true true) (and (>= expr_32_0 0) (<= expr_32_0 1461501637330902918203684832716283019655932542975))) (and (= expr_32_0 a_6_0) (and (=> (and true true) (and (>= expr_30_1 0) (<= expr_30_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_30_1 (ite (= expr_29_0 0) 0 d_div_mod_10_0)) (and (and (<= 0 r_div_mod_10_0) (or (= expr_29_0 0) (< r_div_mod_10_0 expr_29_0))) (and (= (+ (* d_div_mod_10_0 expr_29_0) r_div_mod_10_0) expr_28_0) (and (=> (and true true) (and (>= expr_29_0 0) (<= expr_29_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_29_0 x_8_1) (and (=> (and true true) true) (and (= expr_28_0 2) (and (=> (and true true) (and (>= expr_26_1 0) (<= expr_26_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_26_1 (+ expr_20_0 expr_25_1)) (and (=> (and true true) (and (>= expr_25_1 0) (<= expr_25_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_25_1 115792089237316195423570985008687907853269984665640564039457584007913129639935) (and (=> (and true true) (and (>= expr_20_0 0) (<= expr_20_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_20_0 x_8_1) (and (ite (and true true) (= x_8_1 (- expr_17_0 1)) (= x_8_1 x_8_0)) (and (=> (and true true) (and (>= expr_18_1 0) (<= expr_18_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_1 (- expr_17_0 1)) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_8_0) (and (=> (and true true) expr_14_1) (and (= expr_14_1 (>= expr_12_0 expr_13_0)) (and (=> (and true true) true) (and (= expr_13_0 0) (and (=> (and true true) (and (>= expr_12_0 0) (<= expr_12_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_12_0 x_8_0) (and (and (>= x_8_0 0) (<= x_8_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= a_6_0 0) (<= a_6_0 1461501637330902918203684832716283019655932542975)) (and (>= (|uint_array_tuple_accessor_length| arr_4_length_pair_1) 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 1917212865)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 114)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 70)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 88)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 193)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true)))))))))))))))))))))))))))))))))) (< (select (|balances| state_0) this_0) expr_35_0))) +(assert (and (and (and true true) (and (=> (and true true) (and (>= expr_35_0 0) (<= expr_35_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_35_0 x_8_1) (and (=> (and true true) (and (>= expr_32_0 0) (<= expr_32_0 1461501637330902918203684832716283019655932542975))) (and (= expr_32_0 a_6_0) (and (=> (and true true) (and (>= expr_30_1 0) (<= expr_30_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_30_1 (ite (= expr_29_0 0) 0 d_div_mod_11_0)) (and (and (<= 0 r_div_mod_11_0) (or (= expr_29_0 0) (< r_div_mod_11_0 expr_29_0))) (and (= (+ (* d_div_mod_11_0 expr_29_0) r_div_mod_11_0) expr_28_0) (and (=> (and true true) (and (>= expr_29_0 0) (<= expr_29_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_29_0 x_8_1) (and (=> (and true true) true) (and (= expr_28_0 2) (and (=> (and true true) (and (>= expr_26_1 0) (<= expr_26_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_26_1 (+ expr_20_0 expr_25_1)) (and (=> (and true true) (and (>= expr_25_1 0) (<= expr_25_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_25_1 115792089237316195423570985008687907853269984665640564039457584007913129639935) (and (=> (and true true) (and (>= expr_20_0 0) (<= expr_20_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_20_0 x_8_1) (and (ite (and true true) (= x_8_1 (- expr_17_0 1)) (= x_8_1 x_8_0)) (and (=> (and true true) (and (>= expr_18_1 0) (<= expr_18_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_1 (- expr_17_0 1)) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_8_0) (and (=> (and true true) expr_14_1) (and (= expr_14_1 (>= expr_12_0 expr_13_0)) (and (=> (and true true) true) (and (= expr_13_0 0) (and (=> (and true true) (and (>= expr_12_0 0) (<= expr_12_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_12_0 x_8_0) (and (and (>= x_8_0 0) (<= x_8_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= a_6_0 0) (<= a_6_0 1461501637330902918203684832716283019655932542975)) (and (>= (|uint_array_tuple_accessor_length| arr_4_length_pair_1) 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 1917212865)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 114)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 70)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 88)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 193)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true)))))))))))))))))))))))))))))))))) (< (select (|balances| state_0) this_0) expr_35_0))) (declare-const |EVALEXPR_0| Int) (assert (= |EVALEXPR_0| a_6_0)) (declare-const |EVALEXPR_1| Int) diff --git a/test/cmdlineTests/standard_model_checker_timeout_all/output.json b/test/cmdlineTests/standard_model_checker_timeout_all/output.json index b5283d4b0..7f4d3ddb4 100644 --- a/test/cmdlineTests/standard_model_checker_timeout_all/output.json +++ b/test/cmdlineTests/standard_model_checker_timeout_all/output.json @@ -1,4 +1,4 @@ -{"auxiliaryInputRequested":{"smtlib2queries":{"0x28ce23073a4e2dc137e11aaee76e6eb71956cea75c734c4c46fc0a8579fa8d95":"(set-option :produce-models true) +{"auxiliaryInputRequested":{"smtlib2queries":{"0x18c291cddb0272d6f9afaa62c0b2c2afbc1fae5b3a880c413000b0907aed4aeb":"(set-option :produce-models true) (set-option :timeout 1000) (set-logic ALL) (declare-fun |x_3_3| () Int) @@ -30,86 +30,14 @@ (declare-fun |expr_13_1| () Bool) (declare-fun |expr_17_0| () Int) (declare-fun |expr_18_0| () Int) -(declare-fun |d_div_mod_15_0| () Int) -(declare-fun |r_div_mod_15_0| () Int) -(declare-fun |expr_19_1| () Int) -(declare-fun |expr_20_0| () Int) -(declare-fun |expr_21_1| () Bool) - -(assert (and (and (and true true) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_15_0)) (and (and (<= 0 r_div_mod_15_0) (or (= expr_18_0 0) (< r_div_mod_15_0 expr_18_0))) (and (= (+ (* d_div_mod_15_0 expr_18_0) r_div_mod_15_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))) expr_21_1)) -(check-sat) -","0x50333625cdfd8d37e6643ede94ad1dde6659cb4bc4bc8098e0767d15250784d8":"(set-option :produce-models true) -(set-option :timeout 1000) -(set-logic ALL) -(declare-fun |x_3_3| () Int) -(declare-fun |y_5_3| () Int) -(declare-fun |k_7_3| () Int) -(declare-fun |r_33_3| () Int) -(declare-fun |error_0| () Int) -(declare-fun |this_0| () Int) -(declare-datatypes ((|state_type| 0)) (((|state_type| (|balances| (Array Int Int)))))) -(declare-fun |state_0| () |state_type|) -(declare-datatypes ((|bytes_tuple| 0)) (((|bytes_tuple| (|bytes_tuple_accessor_array| (Array Int Int)) (|bytes_tuple_accessor_length| Int))))) -(declare-datatypes ((|tx_type| 0)) (((|tx_type| (|block.basefee| Int) (|block.chainid| Int) (|block.coinbase| Int) (|block.difficulty| Int) (|block.gaslimit| Int) (|block.number| Int) (|block.timestamp| Int) (|blockhash| (Array Int Int)) (|msg.data| |bytes_tuple|) (|msg.sender| Int) (|msg.sig| Int) (|msg.value| Int) (|tx.gasprice| Int) (|tx.origin| Int))))) -(declare-fun |tx_0| () |tx_type|) -(declare-datatypes ((|ecrecover_input_type| 0)) (((|ecrecover_input_type| (|hash| Int) (|v| Int) (|r| Int) (|s| Int))))) -(declare-datatypes ((|crypto_type| 0)) (((|crypto_type| (|ecrecover| (Array |ecrecover_input_type| Int)) (|keccak256| (Array |bytes_tuple| Int)) (|ripemd160| (Array |bytes_tuple| Int)) (|sha256| (Array |bytes_tuple| Int)))))) -(declare-fun |crypto_0| () |crypto_type|) -(declare-datatypes ((|abi_type| 0)) (((|abi_type|)))) -(declare-fun |abi_0| () |abi_type|) -(declare-fun |x_3_4| () Int) -(declare-fun |y_5_4| () Int) -(declare-fun |k_7_4| () Int) -(declare-fun |r_33_4| () Int) -(declare-fun |x_3_0| () Int) -(declare-fun |y_5_0| () Int) -(declare-fun |k_7_0| () Int) -(declare-fun |r_33_0| () Int) -(declare-fun |expr_11_0| () Int) -(declare-fun |expr_12_0| () Int) -(declare-fun |expr_13_1| () Bool) -(declare-fun |expr_17_0| () Int) -(declare-fun |expr_18_0| () Int) -(declare-fun |d_div_mod_15_0| () Int) -(declare-fun |r_div_mod_15_0| () Int) -(declare-fun |expr_19_1| () Int) -(declare-fun |expr_20_0| () Int) -(declare-fun |expr_21_1| () Bool) -(declare-fun |expr_25_0| () Int) -(declare-fun |expr_26_0| () Int) (declare-fun |d_div_mod_16_0| () Int) (declare-fun |r_div_mod_16_0| () Int) -(declare-fun |expr_27_1| () Int) -(declare-fun |expr_28_0| () Int) -(declare-fun |expr_29_1| () Bool) -(declare-fun |t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_0| (Int Int Int ) Int) -(declare-fun |t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_abstract_0| () Int) -(declare-fun |expr_35_0| () Int) -(declare-fun |expr_36_0| () Int) -(declare-fun |expr_37_0| () Int) -(declare-fun |d_div_mod_17_0| () Int) -(declare-fun |r_div_mod_17_0| () Int) -(declare-fun |expr_38_1| () Int) -(declare-fun |r_33_1| () Int) -(declare-fun |expr_41_0| () Int) -(declare-fun |expr_42_0| () Int) -(declare-fun |d_div_mod_18_0| () Int) -(declare-fun |r_div_mod_18_0| () Int) -(declare-fun |expr_43_1| () Int) -(declare-fun |expr_44_0| () Int) -(declare-fun |expr_45_1| () Bool) +(declare-fun |expr_19_1| () Int) +(declare-fun |expr_20_0| () Int) +(declare-fun |expr_21_1| () Bool) -(assert (and (and (and true true) (and (= expr_45_1 (= expr_43_1 expr_44_0)) (and (=> (and true true) true) (and (= expr_44_0 0) (and (=> (and true true) (and (>= expr_43_1 0) (<= expr_43_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_43_1 (ite (= expr_42_0 0) 0 r_div_mod_18_0)) (and (and (<= 0 r_div_mod_18_0) (or (= expr_42_0 0) (< r_div_mod_18_0 expr_42_0))) (and (= (+ (* d_div_mod_18_0 expr_42_0) r_div_mod_18_0) expr_41_0) (and (=> (and true true) (and (>= expr_42_0 0) (<= expr_42_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_42_0 k_7_0) (and (=> (and true true) (and (>= expr_41_0 0) (<= expr_41_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_41_0 r_33_1) (and (ite (and true true) (= r_33_1 expr_38_1) (= r_33_1 r_33_0)) (and (=> (and true true) (and (>= expr_38_1 0) (<= expr_38_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_38_1 (ite (= expr_37_0 0) 0 r_div_mod_17_0)) (and (and (<= 0 r_div_mod_17_0) (or (= expr_37_0 0) (< r_div_mod_17_0 expr_37_0))) (and (= (+ (* d_div_mod_17_0 expr_37_0) r_div_mod_17_0) (* expr_35_0 expr_36_0)) (and (=> (and true true) (and (>= expr_37_0 0) (<= expr_37_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_37_0 k_7_0) (and (=> (and true true) (and (>= expr_36_0 0) (<= expr_36_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_36_0 y_5_0) (and (=> (and true true) (and (>= expr_35_0 0) (<= expr_35_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_35_0 x_3_0) (and true (and (=> (and true true) expr_29_1) (and (= expr_29_1 (= expr_27_1 expr_28_0)) (and (=> (and true true) true) (and (= expr_28_0 0) (and (=> (and true true) (and (>= expr_27_1 0) (<= expr_27_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_27_1 (ite (= expr_26_0 0) 0 r_div_mod_16_0)) (and (and (<= 0 r_div_mod_16_0) (or (= expr_26_0 0) (< r_div_mod_16_0 expr_26_0))) (and (= (+ (* d_div_mod_16_0 expr_26_0) r_div_mod_16_0) expr_25_0) (and (=> (and true true) (and (>= expr_26_0 0) (<= expr_26_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_26_0 k_7_0) (and (=> (and true true) (and (>= expr_25_0 0) (<= expr_25_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_25_0 y_5_0) (and (=> (and true true) expr_21_1) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_15_0)) (and (and (<= 0 r_div_mod_15_0) (or (= expr_18_0 0) (< r_div_mod_15_0 expr_18_0))) (and (= (+ (* d_div_mod_15_0 expr_18_0) r_div_mod_15_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) (not expr_45_1))) -(declare-const |EVALEXPR_0| Int) -(assert (= |EVALEXPR_0| x_3_0)) -(declare-const |EVALEXPR_1| Int) -(assert (= |EVALEXPR_1| y_5_0)) -(declare-const |EVALEXPR_2| Int) -(assert (= |EVALEXPR_2| k_7_0)) -(declare-const |EVALEXPR_3| Int) -(assert (= |EVALEXPR_3| r_33_1)) +(assert (and (and (and true true) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_16_0)) (and (and (<= 0 r_div_mod_16_0) (or (= expr_18_0 0) (< r_div_mod_16_0 expr_18_0))) (and (= (+ (* d_div_mod_16_0 expr_18_0) r_div_mod_16_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))) (not expr_21_1))) (check-sat) -(get-value (|EVALEXPR_0| |EVALEXPR_1| |EVALEXPR_2| |EVALEXPR_3| )) ","0x74e7fbb4ed837661c73d27b70acb3e91238303f8ec1d916f24d47bc9cbcf8710":"(set-option :produce-models true) (set-option :timeout 1000) (set-logic ALL) @@ -176,7 +104,7 @@ (assert (and (and (and true true) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))) (not expr_13_1))) (check-sat) -","0xa53830d27e1166fe7be8ebd2c70a87a92ee7a76dc5f4fa850489969380148251":"(set-option :produce-models true) +","0xc37900bf0c35dca7bc5c59eca0d169ec4baa8ac48960d828d2ffbef94b5be280":"(set-option :produce-models true) (set-option :timeout 1000) (set-logic ALL) (declare-fun |x_3_3| () Int) @@ -208,22 +136,22 @@ (declare-fun |expr_13_1| () Bool) (declare-fun |expr_17_0| () Int) (declare-fun |expr_18_0| () Int) -(declare-fun |d_div_mod_15_0| () Int) -(declare-fun |r_div_mod_15_0| () Int) +(declare-fun |d_div_mod_16_0| () Int) +(declare-fun |r_div_mod_16_0| () Int) (declare-fun |expr_19_1| () Int) (declare-fun |expr_20_0| () Int) (declare-fun |expr_21_1| () Bool) (declare-fun |expr_25_0| () Int) (declare-fun |expr_26_0| () Int) -(declare-fun |d_div_mod_16_0| () Int) -(declare-fun |r_div_mod_16_0| () Int) +(declare-fun |d_div_mod_17_0| () Int) +(declare-fun |r_div_mod_17_0| () Int) (declare-fun |expr_27_1| () Int) (declare-fun |expr_28_0| () Int) (declare-fun |expr_29_1| () Bool) -(assert (and (and (and true true) (and (= expr_29_1 (= expr_27_1 expr_28_0)) (and (=> (and true true) true) (and (= expr_28_0 0) (and (=> (and true true) (and (>= expr_27_1 0) (<= expr_27_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_27_1 (ite (= expr_26_0 0) 0 r_div_mod_16_0)) (and (and (<= 0 r_div_mod_16_0) (or (= expr_26_0 0) (< r_div_mod_16_0 expr_26_0))) (and (= (+ (* d_div_mod_16_0 expr_26_0) r_div_mod_16_0) expr_25_0) (and (=> (and true true) (and (>= expr_26_0 0) (<= expr_26_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_26_0 k_7_0) (and (=> (and true true) (and (>= expr_25_0 0) (<= expr_25_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_25_0 y_5_0) (and (=> (and true true) expr_21_1) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_15_0)) (and (and (<= 0 r_div_mod_15_0) (or (= expr_18_0 0) (< r_div_mod_15_0 expr_18_0))) (and (= (+ (* d_div_mod_15_0 expr_18_0) r_div_mod_15_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))))))))))))))) (not expr_29_1))) +(assert (and (and (and true true) (and (= expr_29_1 (= expr_27_1 expr_28_0)) (and (=> (and true true) true) (and (= expr_28_0 0) (and (=> (and true true) (and (>= expr_27_1 0) (<= expr_27_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_27_1 (ite (= expr_26_0 0) 0 r_div_mod_17_0)) (and (and (<= 0 r_div_mod_17_0) (or (= expr_26_0 0) (< r_div_mod_17_0 expr_26_0))) (and (= (+ (* d_div_mod_17_0 expr_26_0) r_div_mod_17_0) expr_25_0) (and (=> (and true true) (and (>= expr_26_0 0) (<= expr_26_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_26_0 k_7_0) (and (=> (and true true) (and (>= expr_25_0 0) (<= expr_25_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_25_0 y_5_0) (and (=> (and true true) expr_21_1) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_16_0)) (and (and (<= 0 r_div_mod_16_0) (or (= expr_18_0 0) (< r_div_mod_16_0 expr_18_0))) (and (= (+ (* d_div_mod_16_0 expr_18_0) r_div_mod_16_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))))))))))))))) expr_29_1)) (check-sat) -","0xcd14878719d506f9d680b8ed8bc340f6ab8e23262abb921866cd9c503d0850fe":"(set-option :produce-models true) +","0xcf75850659a91bcdeae2161dd859054b536a5b776454ab5fcbfe4b04394e82e4":"(set-option :produce-models true) (set-option :timeout 1000) (set-logic ALL) (declare-fun |x_3_3| () Int) @@ -255,15 +183,15 @@ (declare-fun |expr_13_1| () Bool) (declare-fun |expr_17_0| () Int) (declare-fun |expr_18_0| () Int) -(declare-fun |d_div_mod_15_0| () Int) -(declare-fun |r_div_mod_15_0| () Int) +(declare-fun |d_div_mod_16_0| () Int) +(declare-fun |r_div_mod_16_0| () Int) (declare-fun |expr_19_1| () Int) (declare-fun |expr_20_0| () Int) (declare-fun |expr_21_1| () Bool) -(assert (and (and (and true true) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_15_0)) (and (and (<= 0 r_div_mod_15_0) (or (= expr_18_0 0) (< r_div_mod_15_0 expr_18_0))) (and (= (+ (* d_div_mod_15_0 expr_18_0) r_div_mod_15_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))) (not expr_21_1))) +(assert (and (and (and true true) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_16_0)) (and (and (<= 0 r_div_mod_16_0) (or (= expr_18_0 0) (< r_div_mod_16_0 expr_18_0))) (and (= (+ (* d_div_mod_16_0 expr_18_0) r_div_mod_16_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))) expr_21_1)) (check-sat) -","0xd3850f6f04a11f854aa8ebd42eb99411eaf77553c20e01abe4b1a411d6eec6eb":"(set-option :produce-models true) +","0xe39f08760131429ca6c71cf526231ab81674474859187242afd8cec7ce0ce328":"(set-option :produce-models true) (set-option :timeout 1000) (set-logic ALL) (declare-fun |x_3_3| () Int) @@ -295,20 +223,92 @@ (declare-fun |expr_13_1| () Bool) (declare-fun |expr_17_0| () Int) (declare-fun |expr_18_0| () Int) -(declare-fun |d_div_mod_15_0| () Int) -(declare-fun |r_div_mod_15_0| () Int) +(declare-fun |d_div_mod_16_0| () Int) +(declare-fun |r_div_mod_16_0| () Int) (declare-fun |expr_19_1| () Int) (declare-fun |expr_20_0| () Int) (declare-fun |expr_21_1| () Bool) (declare-fun |expr_25_0| () Int) (declare-fun |expr_26_0| () Int) +(declare-fun |d_div_mod_17_0| () Int) +(declare-fun |r_div_mod_17_0| () Int) +(declare-fun |expr_27_1| () Int) +(declare-fun |expr_28_0| () Int) +(declare-fun |expr_29_1| () Bool) +(declare-fun |t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_0| (Int Int Int ) Int) +(declare-fun |t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_abstract_0| () Int) +(declare-fun |expr_35_0| () Int) +(declare-fun |expr_36_0| () Int) +(declare-fun |expr_37_0| () Int) +(declare-fun |d_div_mod_18_0| () Int) +(declare-fun |r_div_mod_18_0| () Int) +(declare-fun |expr_38_1| () Int) +(declare-fun |r_33_1| () Int) +(declare-fun |expr_41_0| () Int) +(declare-fun |expr_42_0| () Int) +(declare-fun |d_div_mod_19_0| () Int) +(declare-fun |r_div_mod_19_0| () Int) +(declare-fun |expr_43_1| () Int) +(declare-fun |expr_44_0| () Int) +(declare-fun |expr_45_1| () Bool) + +(assert (and (and (and true true) (and (= expr_45_1 (= expr_43_1 expr_44_0)) (and (=> (and true true) true) (and (= expr_44_0 0) (and (=> (and true true) (and (>= expr_43_1 0) (<= expr_43_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_43_1 (ite (= expr_42_0 0) 0 r_div_mod_19_0)) (and (and (<= 0 r_div_mod_19_0) (or (= expr_42_0 0) (< r_div_mod_19_0 expr_42_0))) (and (= (+ (* d_div_mod_19_0 expr_42_0) r_div_mod_19_0) expr_41_0) (and (=> (and true true) (and (>= expr_42_0 0) (<= expr_42_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_42_0 k_7_0) (and (=> (and true true) (and (>= expr_41_0 0) (<= expr_41_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_41_0 r_33_1) (and (ite (and true true) (= r_33_1 expr_38_1) (= r_33_1 r_33_0)) (and (=> (and true true) (and (>= expr_38_1 0) (<= expr_38_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_38_1 (ite (= expr_37_0 0) 0 r_div_mod_18_0)) (and (and (<= 0 r_div_mod_18_0) (or (= expr_37_0 0) (< r_div_mod_18_0 expr_37_0))) (and (= (+ (* d_div_mod_18_0 expr_37_0) r_div_mod_18_0) (* expr_35_0 expr_36_0)) (and (=> (and true true) (and (>= expr_37_0 0) (<= expr_37_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_37_0 k_7_0) (and (=> (and true true) (and (>= expr_36_0 0) (<= expr_36_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_36_0 y_5_0) (and (=> (and true true) (and (>= expr_35_0 0) (<= expr_35_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_35_0 x_3_0) (and true (and (=> (and true true) expr_29_1) (and (= expr_29_1 (= expr_27_1 expr_28_0)) (and (=> (and true true) true) (and (= expr_28_0 0) (and (=> (and true true) (and (>= expr_27_1 0) (<= expr_27_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_27_1 (ite (= expr_26_0 0) 0 r_div_mod_17_0)) (and (and (<= 0 r_div_mod_17_0) (or (= expr_26_0 0) (< r_div_mod_17_0 expr_26_0))) (and (= (+ (* d_div_mod_17_0 expr_26_0) r_div_mod_17_0) expr_25_0) (and (=> (and true true) (and (>= expr_26_0 0) (<= expr_26_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_26_0 k_7_0) (and (=> (and true true) (and (>= expr_25_0 0) (<= expr_25_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_25_0 y_5_0) (and (=> (and true true) expr_21_1) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_16_0)) (and (and (<= 0 r_div_mod_16_0) (or (= expr_18_0 0) (< r_div_mod_16_0 expr_18_0))) (and (= (+ (* d_div_mod_16_0 expr_18_0) r_div_mod_16_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) (not expr_45_1))) +(declare-const |EVALEXPR_0| Int) +(assert (= |EVALEXPR_0| x_3_0)) +(declare-const |EVALEXPR_1| Int) +(assert (= |EVALEXPR_1| y_5_0)) +(declare-const |EVALEXPR_2| Int) +(assert (= |EVALEXPR_2| k_7_0)) +(declare-const |EVALEXPR_3| Int) +(assert (= |EVALEXPR_3| r_33_1)) +(check-sat) +(get-value (|EVALEXPR_0| |EVALEXPR_1| |EVALEXPR_2| |EVALEXPR_3| )) +","0xf9f64bcc789d80a36748834de05ce2f0fa7a498fe6ff511d74e00b2c9ea54061":"(set-option :produce-models true) +(set-option :timeout 1000) +(set-logic ALL) +(declare-fun |x_3_3| () Int) +(declare-fun |y_5_3| () Int) +(declare-fun |k_7_3| () Int) +(declare-fun |r_33_3| () Int) +(declare-fun |error_0| () Int) +(declare-fun |this_0| () Int) +(declare-datatypes ((|state_type| 0)) (((|state_type| (|balances| (Array Int Int)))))) +(declare-fun |state_0| () |state_type|) +(declare-datatypes ((|bytes_tuple| 0)) (((|bytes_tuple| (|bytes_tuple_accessor_array| (Array Int Int)) (|bytes_tuple_accessor_length| Int))))) +(declare-datatypes ((|tx_type| 0)) (((|tx_type| (|block.basefee| Int) (|block.chainid| Int) (|block.coinbase| Int) (|block.difficulty| Int) (|block.gaslimit| Int) (|block.number| Int) (|block.timestamp| Int) (|blockhash| (Array Int Int)) (|msg.data| |bytes_tuple|) (|msg.sender| Int) (|msg.sig| Int) (|msg.value| Int) (|tx.gasprice| Int) (|tx.origin| Int))))) +(declare-fun |tx_0| () |tx_type|) +(declare-datatypes ((|ecrecover_input_type| 0)) (((|ecrecover_input_type| (|hash| Int) (|v| Int) (|r| Int) (|s| Int))))) +(declare-datatypes ((|crypto_type| 0)) (((|crypto_type| (|ecrecover| (Array |ecrecover_input_type| Int)) (|keccak256| (Array |bytes_tuple| Int)) (|ripemd160| (Array |bytes_tuple| Int)) (|sha256| (Array |bytes_tuple| Int)))))) +(declare-fun |crypto_0| () |crypto_type|) +(declare-datatypes ((|abi_type| 0)) (((|abi_type|)))) +(declare-fun |abi_0| () |abi_type|) +(declare-fun |x_3_4| () Int) +(declare-fun |y_5_4| () Int) +(declare-fun |k_7_4| () Int) +(declare-fun |r_33_4| () Int) +(declare-fun |x_3_0| () Int) +(declare-fun |y_5_0| () Int) +(declare-fun |k_7_0| () Int) +(declare-fun |r_33_0| () Int) +(declare-fun |expr_11_0| () Int) +(declare-fun |expr_12_0| () Int) +(declare-fun |expr_13_1| () Bool) +(declare-fun |expr_17_0| () Int) +(declare-fun |expr_18_0| () Int) (declare-fun |d_div_mod_16_0| () Int) (declare-fun |r_div_mod_16_0| () Int) +(declare-fun |expr_19_1| () Int) +(declare-fun |expr_20_0| () Int) +(declare-fun |expr_21_1| () Bool) +(declare-fun |expr_25_0| () Int) +(declare-fun |expr_26_0| () Int) +(declare-fun |d_div_mod_17_0| () Int) +(declare-fun |r_div_mod_17_0| () Int) (declare-fun |expr_27_1| () Int) (declare-fun |expr_28_0| () Int) (declare-fun |expr_29_1| () Bool) -(assert (and (and (and true true) (and (= expr_29_1 (= expr_27_1 expr_28_0)) (and (=> (and true true) true) (and (= expr_28_0 0) (and (=> (and true true) (and (>= expr_27_1 0) (<= expr_27_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_27_1 (ite (= expr_26_0 0) 0 r_div_mod_16_0)) (and (and (<= 0 r_div_mod_16_0) (or (= expr_26_0 0) (< r_div_mod_16_0 expr_26_0))) (and (= (+ (* d_div_mod_16_0 expr_26_0) r_div_mod_16_0) expr_25_0) (and (=> (and true true) (and (>= expr_26_0 0) (<= expr_26_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_26_0 k_7_0) (and (=> (and true true) (and (>= expr_25_0 0) (<= expr_25_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_25_0 y_5_0) (and (=> (and true true) expr_21_1) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_15_0)) (and (and (<= 0 r_div_mod_15_0) (or (= expr_18_0 0) (< r_div_mod_15_0 expr_18_0))) (and (= (+ (* d_div_mod_15_0 expr_18_0) r_div_mod_15_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))))))))))))))) expr_29_1)) +(assert (and (and (and true true) (and (= expr_29_1 (= expr_27_1 expr_28_0)) (and (=> (and true true) true) (and (= expr_28_0 0) (and (=> (and true true) (and (>= expr_27_1 0) (<= expr_27_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_27_1 (ite (= expr_26_0 0) 0 r_div_mod_17_0)) (and (and (<= 0 r_div_mod_17_0) (or (= expr_26_0 0) (< r_div_mod_17_0 expr_26_0))) (and (= (+ (* d_div_mod_17_0 expr_26_0) r_div_mod_17_0) expr_25_0) (and (=> (and true true) (and (>= expr_26_0 0) (<= expr_26_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_26_0 k_7_0) (and (=> (and true true) (and (>= expr_25_0 0) (<= expr_25_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_25_0 y_5_0) (and (=> (and true true) expr_21_1) (and (= expr_21_1 (= expr_19_1 expr_20_0)) (and (=> (and true true) true) (and (= expr_20_0 0) (and (=> (and true true) (and (>= expr_19_1 0) (<= expr_19_1 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_19_1 (ite (= expr_18_0 0) 0 r_div_mod_16_0)) (and (and (<= 0 r_div_mod_16_0) (or (= expr_18_0 0) (< r_div_mod_16_0 expr_18_0))) (and (= (+ (* d_div_mod_16_0 expr_18_0) r_div_mod_16_0) expr_17_0) (and (=> (and true true) (and (>= expr_18_0 0) (<= expr_18_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_18_0 k_7_0) (and (=> (and true true) (and (>= expr_17_0 0) (<= expr_17_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_17_0 x_3_0) (and (=> (and true true) expr_13_1) (and (= expr_13_1 (> expr_11_0 expr_12_0)) (and (=> (and true true) true) (and (= expr_12_0 0) (and (=> (and true true) (and (>= expr_11_0 0) (<= expr_11_0 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (= expr_11_0 k_7_0) (and (and (>= k_7_0 0) (<= k_7_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= y_5_0 0) (<= y_5_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (and (>= x_3_0 0) (<= x_3_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (= r_33_0 0) (and (and (and (and (and (and (and (and (and (and (and (and (and (>= (|block.basefee| tx_0) 0) (<= (|block.basefee| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935)) (and (>= (|block.chainid| tx_0) 0) (<= (|block.chainid| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.coinbase| tx_0) 0) (<= (|block.coinbase| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|block.difficulty| tx_0) 0) (<= (|block.difficulty| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.gaslimit| tx_0) 0) (<= (|block.gaslimit| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.number| tx_0) 0) (<= (|block.number| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|block.timestamp| tx_0) 0) (<= (|block.timestamp| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|msg.sender| tx_0) 0) (<= (|msg.sender| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|msg.value| tx_0) 0) (<= (|msg.value| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (>= (|tx.origin| tx_0) 0) (<= (|tx.origin| tx_0) 1461501637330902918203684832716283019655932542975))) (and (>= (|tx.gasprice| tx_0) 0) (<= (|tx.gasprice| tx_0) 115792089237316195423570985008687907853269984665640564039457584007913129639935))) (and (and (and (and (and (and (= (|msg.value| tx_0) 0) (= (|msg.sig| tx_0) 3204897777)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 0) 191)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 1) 6)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 2) 219)) (= (select (|bytes_tuple_accessor_array| (|msg.data| tx_0)) 3) 241)) (>= (|bytes_tuple_accessor_length| (|msg.data| tx_0)) 4))) true))))))))))))))))))))))))))))))))))) (not expr_29_1))) (check-sat) "}},"errors":[{"component":"general","errorCode":"5840","formattedMessage":"Warning: CHC: 1 verification condition(s) could not be proved. Enable the model checker option \"show unproved\" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query. diff --git a/test/libsolidity/interface/FileReader.cpp b/test/libsolidity/interface/FileReader.cpp new file mode 100644 index 000000000..fd1eb52cc --- /dev/null +++ b/test/libsolidity/interface/FileReader.cpp @@ -0,0 +1,447 @@ +/* + This file is part of solidity. + + solidity is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + solidity is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with solidity. If not, see . +*/ +// SPDX-License-Identifier: GPL-3.0 + +/// Unit tests for libsolidity/interface/FileReader.h + +#include + +#include +#include +#include +#include + +#include +#include + +using namespace std; +using namespace solidity::test; + +#define TEST_CASE_NAME (boost::unit_test::framework::current_test_case().p_name) + +namespace solidity::frontend::test +{ + +BOOST_AUTO_TEST_SUITE(FileReaderTest) + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_absolute_path) +{ + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/"), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/./"), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/./."), "/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a"), "/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/"), "/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/."), "/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/./a"), "/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/./a/"), "/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/./a/."), "/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/b"), "/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/b/"), "/a/b/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/./b/"), "/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/../a/b/"), "/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/b/c/.."), "/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/b/c/../"), "/a/b/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/b/c/../../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/b/c/../../../"), "/"); +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_relative_path) +{ + TemporaryDirectory tempDir({"x/y/z"}, TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDir.path() / "x/y/z"); + + // NOTE: If path to work dir contains symlinks (often the case on macOS), boost might resolve + // them, making the path different from tempDirPath. + boost::filesystem::path expectedPrefix = boost::filesystem::current_path().parent_path().parent_path().parent_path(); + // On Windows tempDir.path() normally contains the drive letter while the normalized path should not. + expectedPrefix = "/" / expectedPrefix.relative_path(); + soltestAssert(expectedPrefix.is_absolute() || expectedPrefix.root_path() == "/", ""); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("."), expectedPrefix / "x/y/z/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./"), expectedPrefix / "x/y/z/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(".//"), expectedPrefix / "x/y/z/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(".."), expectedPrefix / "x/y"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../"), expectedPrefix / "x/y/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("..//"), expectedPrefix / "x/y/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a"), expectedPrefix / "x/y/z/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/"), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/."), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a"), expectedPrefix / "x/y/z/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a/"), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a/."), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a/./"), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a/.//"), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a/./."), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a/././"), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a/././/"), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/b"), expectedPrefix / "x/y/z/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/b/"), expectedPrefix / "x/y/z/a/b/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../a/b"), expectedPrefix / "x/y/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../../a/b"), expectedPrefix / "x/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("./a/b"), expectedPrefix / "x/y/z/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("././a/b"), expectedPrefix / "x/y/z/a/b"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/./b/"), expectedPrefix / "x/y/z/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/../a/b/"), expectedPrefix / "x/y/z/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/b/c/.."), expectedPrefix / "x/y/z/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/b/c/../"), expectedPrefix / "x/y/z/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/b/c/..//"), expectedPrefix / "x/y/z/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/b/c/../.."), expectedPrefix / "x/y/z/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/b/c/../../"), expectedPrefix / "x/y/z/a/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/b/c/../..//"), expectedPrefix / "x/y/z/a/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../../a/.././../p/../q/../a/b"), expectedPrefix / "a/b"); +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_redundant_slashes) +{ + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("///"), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("////"), "/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("////a/b/"), "/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a//b/"), "/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a////b/"), "/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/b//"), "/a/b/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/b////"), "/a/b/"); +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_unc_path) +{ + TemporaryDirectory tempDir(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDir); + + // On Windows tempDir.path() normally contains the drive letter while the normalized path should not. + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::current_path().relative_path(); + soltestAssert(expectedWorkDir.is_absolute() || expectedWorkDir.root_path() == "/", ""); + + // UNC paths start with // or \\ followed by a name. They are used for network shares on Windows. + // On UNIX systems they are not supported but still treated in a special way. + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("//host/"), "//host/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("//host/a/b"), "//host/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("//host/a/b/"), "//host/a/b/"); + +#if defined(_WIN32) + // On Windows an UNC path can also start with \\ instead of // + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("\\\\host/"), "//host/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("\\\\host/a/b"), "//host/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("\\\\host/a/b/"), "//host/a/b/"); +#else + // On UNIX systems it's just a fancy relative path instead + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("\\\\host/"), expectedWorkDir / "\\\\host/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("\\\\host/a/b"), expectedWorkDir / "\\\\host/a/b"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("\\\\host/a/b/"), expectedWorkDir / "\\\\host/a/b/"); +#endif +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_root_name_only) +{ + TemporaryDirectory tempDir(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDir); + + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::current_path().relative_path(); + soltestAssert(expectedWorkDir.is_absolute() || expectedWorkDir.root_path() == "/", ""); + + // A root **path** consists of a directory name (typically / or \) and the root name (drive + // letter (C:), UNC host name (//host), etc.). Either can be empty. Root path as a whole may be + // an absolute path but root name on its own is considered relative. For example on Windows + // C:\ represents the root directory of drive C: but C: on its own refers to the current working + // directory. + + // UNC paths + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("//"), "//" / expectedWorkDir); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("//host"), "//host" / expectedWorkDir); + + // On UNIX systems root name is empty. + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(""), expectedWorkDir); + +#if defined(_WIN32) + boost::filesystem::path driveLetter = boost::filesystem::current_path().root_name(); + solAssert(!driveLetter.empty(), ""); + solAssert(driveLetter.is_relative(), ""); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(driveLetter), expectedWorkDir); +#endif +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_stripping_root_name) +{ + TemporaryDirectory tempDir(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDir); + + soltestAssert(boost::filesystem::current_path().is_absolute(), ""); +#if defined(_WIN32) + soltestAssert(!boost::filesystem::current_path().root_name().empty(), ""); +#endif + + boost::filesystem::path normalizedPath = FileReader::normalizeCLIPathForVFS(boost::filesystem::current_path()); + BOOST_CHECK_EQUAL(normalizedPath, "/" / boost::filesystem::current_path().relative_path()); + BOOST_TEST(normalizedPath.root_name().empty()); + BOOST_CHECK_EQUAL(normalizedPath.root_directory(), "/"); +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_path_beyond_root) +{ + TemporaryWorkingDirectory tempWorkDir("/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../"), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../a"), "/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../a/.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../a/../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../../a"), "/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../../a/.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/../../a/../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("/a/../../b/../.."), "/"); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(".."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../"), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../a"), "/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../a/.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../a/../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../../a"), "/a"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../../a/.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("../../a/../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/../.."), "/"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("a/../../b/../.."), "/"); +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_case_sensitivity) +{ + TemporaryDirectory tempDir(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDir); + + boost::filesystem::path expectedPrefix = "/" / tempDir.path().relative_path(); + soltestAssert(expectedPrefix.is_absolute() || expectedPrefix.root_path() == "/", ""); + + BOOST_TEST(FileReader::normalizeCLIPathForVFS(tempDir.path() / "abc") == expectedPrefix / "abc"); + BOOST_TEST(FileReader::normalizeCLIPathForVFS(tempDir.path() / "abc") != expectedPrefix / "ABC"); + BOOST_TEST(FileReader::normalizeCLIPathForVFS(tempDir.path() / "ABC") != expectedPrefix / "abc"); + BOOST_TEST(FileReader::normalizeCLIPathForVFS(tempDir.path() / "ABC") == expectedPrefix / "ABC"); +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_path_separators) +{ + // Even on Windows we want / as a separator. + BOOST_TEST((FileReader::normalizeCLIPathForVFS("/a/b/c").native() == boost::filesystem::path("/a/b/c").native())); +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_should_not_resolve_symlinks) +{ + TemporaryDirectory tempDir({"abc/"}, TEST_CASE_NAME); + soltestAssert(tempDir.path().is_absolute(), ""); + + if (!createSymlinkIfSupportedByFilesystem(tempDir.path() / "abc", tempDir.path() / "sym", true)) + return; + + boost::filesystem::path expectedPrefix = "/" / tempDir.path().relative_path(); + soltestAssert(expectedPrefix.is_absolute() || expectedPrefix.root_path() == "/", ""); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(tempDir.path() / "sym/contract.sol"), expectedPrefix / "sym/contract.sol"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(tempDir.path() / "abc/contract.sol"), expectedPrefix / "abc/contract.sol"); +} + +BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_should_resolve_symlinks_in_workdir_when_path_is_relative) +{ + TemporaryDirectory tempDir({"abc/"}, TEST_CASE_NAME); + soltestAssert(tempDir.path().is_absolute(), ""); + + if (!createSymlinkIfSupportedByFilesystem(tempDir.path() / "abc", tempDir.path() / "sym", true)) + return; + + TemporaryWorkingDirectory tempWorkDir(tempDir.path() / "sym"); + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::weakly_canonical(boost::filesystem::current_path()).relative_path(); + soltestAssert(expectedWorkDir.is_absolute() || expectedWorkDir.root_path() == "/", ""); + + boost::filesystem::path expectedPrefix = "/" / tempDir.path().relative_path(); + soltestAssert(expectedPrefix.is_absolute() || expectedPrefix.root_path() == "/", ""); + + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS("contract.sol"), expectedWorkDir / "contract.sol"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(tempDir.path() / "sym/contract.sol"), expectedPrefix / "sym/contract.sol"); + BOOST_CHECK_EQUAL(FileReader::normalizeCLIPathForVFS(tempDir.path() / "abc/contract.sol"), expectedPrefix / "abc/contract.sol"); +} + +BOOST_AUTO_TEST_CASE(isPathPrefix_file_prefix) +{ + BOOST_TEST(FileReader::isPathPrefix("/", "/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/contract.sol", "/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/contract.sol/", "/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/contract.sol/.", "/contract.sol")); + + BOOST_TEST(FileReader::isPathPrefix("/", "/a/bc/def/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/a", "/a/bc/def/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/a/", "/a/bc/def/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/a/bc", "/a/bc/def/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/a/bc/def/contract.sol", "/a/bc/def/contract.sol")); + + BOOST_TEST(FileReader::isPathPrefix("/", "/a/bc/def/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/a", "/a/bc/def/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/a/", "/a/bc/def/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/a/bc", "/a/bc/def/contract.sol")); + BOOST_TEST(FileReader::isPathPrefix("/a/bc/def/contract.sol", "/a/bc/def/contract.sol")); + + BOOST_TEST(!FileReader::isPathPrefix("/contract.sol", "/token.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/contract", "/contract.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/contract.sol", "/contract")); + BOOST_TEST(!FileReader::isPathPrefix("/contract.so", "/contract.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/contract.sol", "/contract.so")); + + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c/contract.sol", "/a/b/contract.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/a/b/contract.sol", "/a/b/c/contract.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c/contract.sol", "/a/b/c/d/contract.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c/d/contract.sol", "/a/b/c/contract.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c/contract.sol", "/contract.sol")); +} + +BOOST_AUTO_TEST_CASE(isPathPrefix_directory_prefix) +{ + BOOST_TEST(FileReader::isPathPrefix("/", "/")); + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c/", "/")); + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c", "/")); + + BOOST_TEST(FileReader::isPathPrefix("/", "/a/bc/")); + BOOST_TEST(FileReader::isPathPrefix("/a", "/a/bc/")); + BOOST_TEST(FileReader::isPathPrefix("/a/", "/a/bc/")); + BOOST_TEST(FileReader::isPathPrefix("/a/bc", "/a/bc/")); + BOOST_TEST(FileReader::isPathPrefix("/a/bc/", "/a/bc/")); + + BOOST_TEST(!FileReader::isPathPrefix("/a", "/b/")); + BOOST_TEST(!FileReader::isPathPrefix("/a/", "/b/")); + BOOST_TEST(!FileReader::isPathPrefix("/a/contract.sol", "/a/b/")); + + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c/", "/a/b/")); + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c", "/a/b/")); +} + +BOOST_AUTO_TEST_CASE(isPathPrefix_unc_path) +{ + BOOST_TEST(FileReader::isPathPrefix("//host/a/b/", "//host/a/b/")); + BOOST_TEST(FileReader::isPathPrefix("//host/a/b", "//host/a/b/")); + BOOST_TEST(FileReader::isPathPrefix("//host/a/", "//host/a/b/")); + BOOST_TEST(FileReader::isPathPrefix("//host/a", "//host/a/b/")); + BOOST_TEST(FileReader::isPathPrefix("//host/", "//host/a/b/")); + + // NOTE: //host and // cannot be passed to isPathPrefix() because they are considered relative. + + BOOST_TEST(!FileReader::isPathPrefix("//host1/", "//host2/")); + BOOST_TEST(!FileReader::isPathPrefix("//host1/a/b/", "//host2/a/b/")); + + BOOST_TEST(!FileReader::isPathPrefix("/a/b/c/", "//a/b/c/")); + BOOST_TEST(!FileReader::isPathPrefix("//a/b/c/", "/a/b/c/")); +} + +BOOST_AUTO_TEST_CASE(isPathPrefix_case_sensitivity) +{ + BOOST_TEST(!FileReader::isPathPrefix("/a.sol", "/A.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/A.sol", "/a.sol")); + BOOST_TEST(!FileReader::isPathPrefix("/A/", "/a/")); + BOOST_TEST(!FileReader::isPathPrefix("/a/", "/A/")); + BOOST_TEST(!FileReader::isPathPrefix("/a/BC/def/", "/a/bc/def/contract.sol")); +} + +BOOST_AUTO_TEST_CASE(stripPrefixIfPresent_file_prefix) +{ + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/", "/contract.sol"), "contract.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/contract.sol", "/contract.sol"), "."); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/contract.sol/", "/contract.sol"), "."); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/contract.sol/.", "/contract.sol"), "."); + + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/", "/a/bc/def/contract.sol"), "a/bc/def/contract.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a", "/a/bc/def/contract.sol"), "bc/def/contract.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/", "/a/bc/def/contract.sol"), "bc/def/contract.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/bc", "/a/bc/def/contract.sol"), "def/contract.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/bc/def/", "/a/bc/def/contract.sol"), "contract.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/bc/def/contract.sol", "/a/bc/def/contract.sol"), "."); + + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/contract.sol", "/token.sol"), "/token.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/contract", "/contract.sol"), "/contract.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/contract.sol", "/contract"), "/contract"); + + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/b/c/contract.sol", "/a/b/contract.sol"), "/a/b/contract.sol"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/b/contract.sol", "/a/b/c/contract.sol"), "/a/b/c/contract.sol"); +} + +BOOST_AUTO_TEST_CASE(stripPrefixIfPresent_directory_prefix) +{ + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/", "/"), "."); + + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/", "/a/bc/def/"), "a/bc/def/"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a", "/a/bc/def/"), "bc/def/"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/", "/a/bc/def/"), "bc/def/"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/bc", "/a/bc/def/"), "def/"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/bc/def/", "/a/bc/def/"), "."); + + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a", "/b/"), "/b/"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/", "/b/"), "/b/"); + + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/b/c/", "/a/b/"), "/a/b/"); + BOOST_CHECK_EQUAL(FileReader::stripPrefixIfPresent("/a/b/c", "/a/b/"), "/a/b/"); +} + +BOOST_AUTO_TEST_CASE(isUNCPath) +{ + BOOST_TEST(FileReader::isUNCPath("//")); + BOOST_TEST(FileReader::isUNCPath("//root")); + BOOST_TEST(FileReader::isUNCPath("//root/")); + +#if defined(_WIN32) + // On Windows boost sees these as ///, which is equivalent to / + BOOST_TEST(!FileReader::isUNCPath("//\\")); + BOOST_TEST(!FileReader::isUNCPath("\\\\/")); + BOOST_TEST(!FileReader::isUNCPath("\\/\\")); + + BOOST_TEST(FileReader::isUNCPath("\\\\")); + BOOST_TEST(FileReader::isUNCPath("\\\\root")); + BOOST_TEST(FileReader::isUNCPath("\\\\root/")); +#else + // On UNIX it's actually an UNC path + BOOST_TEST(FileReader::isUNCPath("//\\")); + + // On UNIX these are just weird relative directory names consisting only of backslashes. + BOOST_TEST(!FileReader::isUNCPath("\\\\/")); + BOOST_TEST(!FileReader::isUNCPath("\\/\\")); + + BOOST_TEST(!FileReader::isUNCPath("\\\\")); + BOOST_TEST(!FileReader::isUNCPath("\\\\root")); + BOOST_TEST(!FileReader::isUNCPath("\\\\root/")); +#endif + + BOOST_TEST(!FileReader::isUNCPath("\\/")); + BOOST_TEST(!FileReader::isUNCPath("/\\")); + + BOOST_TEST(!FileReader::isUNCPath("")); + BOOST_TEST(!FileReader::isUNCPath(".")); + BOOST_TEST(!FileReader::isUNCPath("..")); + BOOST_TEST(!FileReader::isUNCPath("/")); + BOOST_TEST(!FileReader::isUNCPath("a")); + BOOST_TEST(!FileReader::isUNCPath("a/b/c")); + BOOST_TEST(!FileReader::isUNCPath("contract.sol")); +} + +BOOST_AUTO_TEST_SUITE_END() + +} // namespace solidity::frontend::test diff --git a/test/libsolidity/smtCheckerTests/abi/abi_decode_1_tuple.sol b/test/libsolidity/smtCheckerTests/abi/abi_decode_1_tuple.sol index 2cfa10b31..e9c4e2043 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_decode_1_tuple.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_decode_1_tuple.sol @@ -8,5 +8,3 @@ contract C { // ---- // Warning 8364: (116-125): Assertion checker does not yet implement type type(uint256[] memory) // Warning 8364: (115-126): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (116-125): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (115-126): Assertion checker does not yet implement type type(uint256[] memory) diff --git a/test/libsolidity/smtCheckerTests/abi/abi_decode_array.sol b/test/libsolidity/smtCheckerTests/abi/abi_decode_array.sol index 10e6115e5..998503eb8 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_decode_array.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_decode_array.sol @@ -30,6 +30,7 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- // Warning 8364: (162-168): Assertion checker does not yet implement type type(uint256[] memory) // Warning 8364: (170-176): Assertion checker does not yet implement type type(uint256[] memory) @@ -45,6 +46,9 @@ contract C { // Warning 8364: (779-789): Assertion checker does not yet implement type type(uint256[] memory[] memory[] memory) // Warning 8364: (989-995): Assertion checker does not yet implement type type(uint256[] memory) // Warning 8364: (997-1003): Assertion checker does not yet implement type type(uint256[] memory) +// Warning 1218: (1009-1037): CHC: Error trying to invoke SMT solver. +// Warning 1218: (1056-1084): CHC: Error trying to invoke SMT solver. +// Warning 1218: (1103-1131): CHC: Error trying to invoke SMT solver. // Warning 6328: (182-210): CHC: Assertion violation happens here. // Warning 6328: (335-363): CHC: Assertion violation happens here. // Warning 6328: (414-442): CHC: Assertion violation happens here. @@ -52,20 +56,9 @@ contract C { // Warning 6328: (607-635): CHC: Assertion violation happens here. // Warning 6328: (654-682): CHC: Assertion violation happens here. // Warning 6328: (879-916): CHC: Assertion violation happens here. -// Warning 6328: (1009-1037): CHC: Assertion violation happens here. -// Warning 6328: (1056-1084): CHC: Assertion violation happens here. -// Warning 6328: (1103-1131): CHC: Assertion violation happens here. -// Warning 8364: (162-168): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (170-176): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (283-289): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (291-297): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (532-538): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (540-546): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (548-554): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (769-775): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (769-777): Assertion checker does not yet implement type type(uint256[] memory[] memory) -// Warning 8364: (779-785): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (779-787): Assertion checker does not yet implement type type(uint256[] memory[] memory) -// Warning 8364: (779-789): Assertion checker does not yet implement type type(uint256[] memory[] memory[] memory) -// Warning 8364: (989-995): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (997-1003): Assertion checker does not yet implement type type(uint256[] memory) +// Warning 6328: (1009-1037): CHC: Assertion violation might happen here. +// Warning 6328: (1056-1084): CHC: Assertion violation might happen here. +// Warning 6328: (1103-1131): CHC: Assertion violation might happen here. +// Warning 4661: (1009-1037): BMC: Assertion violation happens here. +// Warning 4661: (1056-1084): BMC: Assertion violation happens here. +// Warning 4661: (1103-1131): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_decode_simple.sol b/test/libsolidity/smtCheckerTests/abi/abi_decode_simple.sol index 2020ce7ae..585020d0a 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_decode_simple.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_decode_simple.sol @@ -21,10 +21,14 @@ contract C { // SMTEngine: all // SMTIgnoreCex: yes // ---- +// Warning 1218: (505-519): CHC: Error trying to invoke SMT solver. +// Warning 1218: (538-552): CHC: Error trying to invoke SMT solver. // Warning 6328: (209-223): CHC: Assertion violation happens here. // Warning 6328: (260-274): CHC: Assertion violation happens here. // Warning 6328: (359-373): CHC: Assertion violation happens here. // Warning 6328: (392-406): CHC: Assertion violation happens here. // Warning 6328: (425-434): CHC: Assertion violation happens here. -// Warning 6328: (505-519): CHC: Assertion violation happens here. -// Warning 6328: (538-552): CHC: Assertion violation happens here. +// Warning 6328: (505-519): CHC: Assertion violation might happen here. +// Warning 6328: (538-552): CHC: Assertion violation might happen here. +// Warning 4661: (505-519): BMC: Assertion violation happens here. +// Warning 4661: (538-552): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_function.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_function.sol index fd082d9c5..1a3c71982 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_function.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_function.sol @@ -7,4 +7,3 @@ contract C { // SMTEngine: all // ---- // Warning 6031: (54-60): Internal error: Expression undefined for SMT solver. -// Warning 6031: (54-60): Internal error: Expression undefined for SMT solver. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_simple.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_simple.sol index 75fd7e989..8257afd1e 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_simple.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_simple.sol @@ -23,7 +23,15 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (322-352): CHC: Assertion violation happens here. -// Warning 6328: (419-449): CHC: Assertion violation happens here. -// Warning 6328: (528-558): CHC: Assertion violation happens here. -// Warning 6328: (577-607): CHC: Assertion violation happens here. +// Warning 1218: (322-352): CHC: Error trying to invoke SMT solver. +// Warning 1218: (419-449): CHC: Error trying to invoke SMT solver. +// Warning 1218: (528-558): CHC: Error trying to invoke SMT solver. +// Warning 1218: (577-607): CHC: Error trying to invoke SMT solver. +// Warning 6328: (322-352): CHC: Assertion violation might happen here. +// Warning 6328: (419-449): CHC: Assertion violation might happen here. +// Warning 6328: (528-558): CHC: Assertion violation might happen here. +// Warning 6328: (577-607): CHC: Assertion violation might happen here. +// Warning 4661: (322-352): BMC: Assertion violation happens here. +// Warning 4661: (419-449): BMC: Assertion violation happens here. +// Warning 4661: (528-558): BMC: Assertion violation happens here. +// Warning 4661: (577-607): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_string_literal.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_string_literal.sol index 2bbaa2e1c..31b9f59ce 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_string_literal.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_string_literal.sol @@ -22,15 +22,17 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 1218: (226-256): CHC: Error trying to invoke SMT solver. // Warning 1218: (310-340): CHC: Error trying to invoke SMT solver. // Warning 1218: (483-513): CHC: Error trying to invoke SMT solver. // Warning 1218: (568-598): CHC: Error trying to invoke SMT solver. // Warning 1218: (654-684): CHC: Error trying to invoke SMT solver. -// Warning 6328: (226-256): CHC: Assertion violation happens here. +// Warning 6328: (226-256): CHC: Assertion violation might happen here. // Warning 6328: (310-340): CHC: Assertion violation might happen here. // Warning 6328: (483-513): CHC: Assertion violation might happen here. // Warning 6328: (568-598): CHC: Assertion violation might happen here. // Warning 6328: (654-684): CHC: Assertion violation might happen here. +// Warning 4661: (226-256): BMC: Assertion violation happens here. // Warning 4661: (310-340): BMC: Assertion violation happens here. // Warning 4661: (483-513): BMC: Assertion violation happens here. // Warning 4661: (568-598): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_string_literal_no_unproved.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_string_literal_no_unproved.sol index ffeef4896..23501603c 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_string_literal_no_unproved.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_packed_string_literal_no_unproved.sol @@ -23,12 +23,13 @@ contract C { // SMTEngine: all // SMTShowUnproved: no // ---- +// Warning 1218: (226-256): CHC: Error trying to invoke SMT solver. // Warning 1218: (310-340): CHC: Error trying to invoke SMT solver. // Warning 1218: (483-513): CHC: Error trying to invoke SMT solver. // Warning 1218: (568-598): CHC: Error trying to invoke SMT solver. // Warning 1218: (654-684): CHC: Error trying to invoke SMT solver. -// Warning 6328: (226-256): CHC: Assertion violation happens here. -// Warning 5840: CHC: 4 verification condition(s) could not be proved. Enable the model checker option "show unproved" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query. +// Warning 5840: CHC: 5 verification condition(s) could not be proved. Enable the model checker option "show unproved" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query. +// Warning 4661: (226-256): BMC: Assertion violation happens here. // Warning 4661: (310-340): BMC: Assertion violation happens here. // Warning 4661: (483-513): BMC: Assertion violation happens here. // Warning 4661: (568-598): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_simple.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_simple.sol index 9164f5e3b..3bff0d448 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_simple.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_simple.sol @@ -20,6 +20,12 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (298-328): CHC: Assertion violation happens here. -// Warning 6328: (389-419): CHC: Assertion violation happens here. -// Warning 6328: (492-522): CHC: Assertion violation happens here. +// Warning 1218: (298-328): CHC: Error trying to invoke SMT solver. +// Warning 1218: (389-419): CHC: Error trying to invoke SMT solver. +// Warning 1218: (492-522): CHC: Error trying to invoke SMT solver. +// Warning 6328: (298-328): CHC: Assertion violation might happen here. +// Warning 6328: (389-419): CHC: Assertion violation might happen here. +// Warning 6328: (492-522): CHC: Assertion violation might happen here. +// Warning 4661: (298-328): BMC: Assertion violation happens here. +// Warning 4661: (389-419): BMC: Assertion violation happens here. +// Warning 4661: (492-522): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_string_literal.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_string_literal.sol index 2a3ff2bb2..9cdf6f248 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_string_literal.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_string_literal.sol @@ -19,13 +19,15 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 1218: (208-238): CHC: Error trying to invoke SMT solver. // Warning 1218: (286-316): CHC: Error trying to invoke SMT solver. // Warning 1218: (453-483): CHC: Error trying to invoke SMT solver. // Warning 1218: (532-562): CHC: Error trying to invoke SMT solver. -// Warning 6328: (208-238): CHC: Assertion violation happens here. +// Warning 6328: (208-238): CHC: Assertion violation might happen here. // Warning 6328: (286-316): CHC: Assertion violation might happen here. // Warning 6328: (453-483): CHC: Assertion violation might happen here. // Warning 6328: (532-562): CHC: Assertion violation might happen here. +// Warning 4661: (208-238): BMC: Assertion violation happens here. // Warning 4661: (286-316): BMC: Assertion violation happens here. // Warning 4661: (453-483): BMC: Assertion violation happens here. // Warning 4661: (532-562): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_array_slice.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_array_slice.sol index c9d9bb056..4043617cb 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_array_slice.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_array_slice.sol @@ -24,15 +24,18 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- +// Warning 1218: (578-608): CHC: Error trying to invoke SMT solver. // Warning 1218: (691-721): CHC: Error trying to invoke SMT solver. // Warning 1218: (959-989): CHC: Error trying to invoke SMT solver. // Warning 1218: (1079-1109): CHC: Error trying to invoke SMT solver. // Warning 6328: (325-355): CHC: Assertion violation happens here. -// Warning 6328: (578-608): CHC: Assertion violation happens here. +// Warning 6328: (578-608): CHC: Assertion violation might happen here. // Warning 6328: (691-721): CHC: Assertion violation might happen here. // Warning 6328: (959-989): CHC: Assertion violation might happen here. // Warning 6328: (1079-1109): CHC: Assertion violation might happen here. +// Warning 4661: (578-608): BMC: Assertion violation happens here. // Warning 4661: (691-721): BMC: Assertion violation happens here. // Warning 4661: (959-989): BMC: Assertion violation happens here. // Warning 4661: (1079-1109): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_array_slice_2.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_array_slice_2.sol index 740411bf3..c019af2ee 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_array_slice_2.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_array_slice_2.sol @@ -25,14 +25,16 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 1218: (579-609): CHC: Error trying to invoke SMT solver. // Warning 1218: (692-722): CHC: Error trying to invoke SMT solver. // Warning 1218: (960-990): CHC: Error trying to invoke SMT solver. // Warning 1218: (1080-1110): CHC: Error trying to invoke SMT solver. // Warning 6328: (326-356): CHC: Assertion violation happens here. -// Warning 6328: (579-609): CHC: Assertion violation happens here. +// Warning 6328: (579-609): CHC: Assertion violation might happen here. // Warning 6328: (692-722): CHC: Assertion violation might happen here. // Warning 6328: (960-990): CHC: Assertion violation might happen here. // Warning 6328: (1080-1110): CHC: Assertion violation might happen here. +// Warning 4661: (579-609): BMC: Assertion violation happens here. // Warning 4661: (692-722): BMC: Assertion violation happens here. // Warning 4661: (960-990): BMC: Assertion violation happens here. // Warning 4661: (1080-1110): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_simple.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_simple.sol index f776c3dc4..95ec1cf37 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_simple.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_simple.sol @@ -23,9 +23,12 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- // Warning 5667: (100-115): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 1218: (855-885): CHC: Error trying to invoke SMT solver. // Warning 6328: (571-601): CHC: Assertion violation happens here. // Warning 6328: (691-721): CHC: Assertion violation happens here. // Warning 6328: (740-770): CHC: Assertion violation happens here. -// Warning 6328: (855-885): CHC: Assertion violation happens here. +// Warning 6328: (855-885): CHC: Assertion violation might happen here. +// Warning 4661: (855-885): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_string_literal.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_string_literal.sol index 839d00835..cbcc65734 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_string_literal.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_selector_string_literal.sol @@ -22,15 +22,17 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 1218: (252-282): CHC: Error trying to invoke SMT solver. // Warning 1218: (347-377): CHC: Error trying to invoke SMT solver. // Warning 1218: (531-561): CHC: Error trying to invoke SMT solver. // Warning 1218: (627-657): CHC: Error trying to invoke SMT solver. // Warning 1218: (746-776): CHC: Error trying to invoke SMT solver. -// Warning 6328: (252-282): CHC: Assertion violation happens here. +// Warning 6328: (252-282): CHC: Assertion violation might happen here. // Warning 6328: (347-377): CHC: Assertion violation might happen here. // Warning 6328: (531-561): CHC: Assertion violation might happen here. // Warning 6328: (627-657): CHC: Assertion violation might happen here. // Warning 6328: (746-776): CHC: Assertion violation might happen here. +// Warning 4661: (252-282): BMC: Assertion violation happens here. // Warning 4661: (347-377): BMC: Assertion violation happens here. // Warning 4661: (531-561): BMC: Assertion violation happens here. // Warning 4661: (627-657): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_array_slice.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_array_slice.sol index fd15ea27d..70c06dab2 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_array_slice.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_array_slice.sol @@ -25,14 +25,16 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 1218: (588-618): CHC: Error trying to invoke SMT solver. // Warning 1218: (702-732): CHC: Error trying to invoke SMT solver. // Warning 1218: (971-1001): CHC: Error trying to invoke SMT solver. // Warning 1218: (1086-1116): CHC: Error trying to invoke SMT solver. // Warning 6328: (334-364): CHC: Assertion violation happens here. -// Warning 6328: (588-618): CHC: Assertion violation happens here. +// Warning 6328: (588-618): CHC: Assertion violation might happen here. // Warning 6328: (702-732): CHC: Assertion violation might happen here. // Warning 6328: (971-1001): CHC: Assertion violation might happen here. // Warning 6328: (1086-1116): CHC: Assertion violation might happen here. +// Warning 4661: (588-618): BMC: Assertion violation happens here. // Warning 4661: (702-732): BMC: Assertion violation happens here. // Warning 4661: (971-1001): BMC: Assertion violation happens here. // Warning 4661: (1086-1116): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_array_slice_2.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_array_slice_2.sol index cdb87233e..4ac60267f 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_array_slice_2.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_array_slice_2.sol @@ -25,14 +25,16 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 1218: (589-619): CHC: Error trying to invoke SMT solver. // Warning 1218: (703-733): CHC: Error trying to invoke SMT solver. // Warning 1218: (972-1002): CHC: Error trying to invoke SMT solver. // Warning 1218: (1087-1117): CHC: Error trying to invoke SMT solver. // Warning 6328: (335-365): CHC: Assertion violation happens here. -// Warning 6328: (589-619): CHC: Assertion violation happens here. +// Warning 6328: (589-619): CHC: Assertion violation might happen here. // Warning 6328: (703-733): CHC: Assertion violation might happen here. // Warning 6328: (972-1002): CHC: Assertion violation might happen here. // Warning 6328: (1087-1117): CHC: Assertion violation might happen here. +// Warning 4661: (589-619): BMC: Assertion violation happens here. // Warning 4661: (703-733): BMC: Assertion violation happens here. // Warning 4661: (972-1002): BMC: Assertion violation happens here. // Warning 4661: (1087-1117): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_simple.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_simple.sol index 7c640a560..96f3e48d9 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_simple.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_simple.sol @@ -24,7 +24,9 @@ contract C { // SMTEngine: all // ---- // Warning 5667: (107-122): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 1218: (824-854): CHC: Error trying to invoke SMT solver. // Warning 6328: (543-573): CHC: Assertion violation happens here. // Warning 6328: (664-694): CHC: Assertion violation happens here. // Warning 6328: (713-743): CHC: Assertion violation happens here. -// Warning 6328: (824-854): CHC: Assertion violation happens here. +// Warning 6328: (824-854): CHC: Assertion violation might happen here. +// Warning 4661: (824-854): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_string_literal.sol b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_string_literal.sol index 2e64229bc..d58b3f5b4 100644 --- a/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_string_literal.sol +++ b/test/libsolidity/smtCheckerTests/abi/abi_encode_with_sig_string_literal.sol @@ -22,15 +22,17 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 1218: (261-291): CHC: Error trying to invoke SMT solver. // Warning 1218: (357-387): CHC: Error trying to invoke SMT solver. // Warning 1218: (542-572): CHC: Error trying to invoke SMT solver. // Warning 1218: (639-669): CHC: Error trying to invoke SMT solver. // Warning 1218: (753-783): CHC: Error trying to invoke SMT solver. -// Warning 6328: (261-291): CHC: Assertion violation happens here. +// Warning 6328: (261-291): CHC: Assertion violation might happen here. // Warning 6328: (357-387): CHC: Assertion violation might happen here. // Warning 6328: (542-572): CHC: Assertion violation might happen here. // Warning 6328: (639-669): CHC: Assertion violation might happen here. // Warning 6328: (753-783): CHC: Assertion violation might happen here. +// Warning 4661: (261-291): BMC: Assertion violation happens here. // Warning 4661: (357-387): BMC: Assertion violation happens here. // Warning 4661: (542-572): BMC: Assertion violation happens here. // Warning 4661: (639-669): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/array_members/array_push_string_literal.sol b/test/libsolidity/smtCheckerTests/array_members/array_push_string_literal.sol index aa3256397..f401bc11e 100644 --- a/test/libsolidity/smtCheckerTests/array_members/array_push_string_literal.sol +++ b/test/libsolidity/smtCheckerTests/array_members/array_push_string_literal.sol @@ -14,5 +14,5 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (139-161): CHC: Assertion violation happens here.\nCounterexample:\ndata = [98]\n\nTransaction trace:\nC.constructor()\nState: data = []\nC.g() +// Warning 6328: (139-161): CHC: Assertion violation happens here. // Warning 6328: (263-290): CHC: Assertion violation happens here.\nCounterexample:\ndata = [1]\n\nTransaction trace:\nC.constructor()\nState: data = []\nC.g() diff --git a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_2d.sol b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_2d.sol index 862798b17..bbd5589a4 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_2d.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_2d.sol @@ -21,4 +21,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (362-420): CHC: Assertion violation happens here.\nCounterexample:\nc = [[2]]\n\nTransaction trace:\nC.constructor()\nState: c = []\nC.g() +// Warning 6328: (362-420): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_1d.sol b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_1d.sol index c634fbaa3..6b23ac1d4 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_1d.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_1d.sol @@ -13,4 +13,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (204-230): CHC: Assertion violation happens here.\nCounterexample:\nb = [0, 0]\nlength = 2\n\nTransaction trace:\nC.constructor()\nState: b = []\nC.f() +// Warning 6328: (204-230): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_bytes.sol b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_bytes.sol index 6f3cfa214..6126b5b10 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_bytes.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_and_rhs_bytes.sol @@ -13,4 +13,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (203-244): CHC: Assertion violation happens here.\nCounterexample:\nb = [0, 0]\nlength = 2\n\nTransaction trace:\nC.constructor()\nState: b = []\nC.f() +// Warning 6328: (203-244): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_bytes.sol b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_bytes.sol index 79a1f394c..7bd74f6dc 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_bytes.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_bytes.sol @@ -19,4 +19,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (265-310): CHC: Assertion violation happens here.\nCounterexample:\nb = [1]\none = 1\n\nTransaction trace:\nC.constructor()\nState: b = []\nC.g() +// Warning 6328: (265-310): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_bytes_2d.sol b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_bytes_2d.sol index a58647e61..7151d9304 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_bytes_2d.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_as_lhs_bytes_2d.sol @@ -23,4 +23,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (435-508): CHC: Assertion violation happens here.\nCounterexample:\nc = [[2]]\nval = 2\n\nTransaction trace:\nC.constructor()\nState: c = []\nC.g() +// Warning 6328: (435-508): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/array_members/push_function_return_value.sol b/test/libsolidity/smtCheckerTests/array_members/push_function_return_value.sol new file mode 100644 index 000000000..ae897ce13 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/array_members/push_function_return_value.sol @@ -0,0 +1,20 @@ +contract C { + bytes x; + + function getX() internal view returns (bytes storage) { + return x; + } + + function s() public { + require(x.length == 0); + getX().push("a"); + assert(x.length == 1); // should hold but knowledge is erased due to pushing a reference + assert(x.length == 0); // should fail + } +} +// ==== +// SMTEngine: all +// SMTIgnoreCex: yes +// ---- +// Warning 6328: (168-189): CHC: Assertion violation happens here. +// Warning 6328: (259-280): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/array_members/push_push_no_args_2_fail.sol b/test/libsolidity/smtCheckerTests/array_members/push_push_no_args_2_fail.sol index db0a88f7b..c29c34f62 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_push_no_args_2_fail.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_push_no_args_2_fail.sol @@ -12,5 +12,5 @@ contract C { // SMTEngine: all // ---- // Warning 6328: (90-116): CHC: Assertion violation happens here.\nCounterexample:\narray2d = [[[0]]]\nlast = 0\n\nTransaction trace:\nC.constructor()\nState: array2d = []\nC.l() -// Warning 6328: (170-186): CHC: Assertion violation happens here.\nCounterexample:\narray2d = [[[0]]]\nlast = 1\n\nTransaction trace:\nC.constructor()\nState: array2d = []\nC.l() -// Warning 6328: (190-246): CHC: Assertion violation happens here.\nCounterexample:\narray2d = [[[0]]]\nlast = 1\n\nTransaction trace:\nC.constructor()\nState: array2d = []\nC.l() +// Warning 6328: (170-186): CHC: Assertion violation happens here. +// Warning 6328: (190-246): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/array_members/push_storage_ref_unsafe_aliasing.sol b/test/libsolidity/smtCheckerTests/array_members/push_storage_ref_unsafe_aliasing.sol index 402ea67b4..43eebddcf 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_storage_ref_unsafe_aliasing.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_storage_ref_unsafe_aliasing.sol @@ -14,5 +14,5 @@ contract C { // SMTEngine: all // ---- // Warning 6368: (188-192): CHC: Out of bounds access happens here.\nCounterexample:\na = []\nb = [32]\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.f() -// Warning 6368: (188-195): CHC: Out of bounds access happens here.\nCounterexample:\na = [[], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [25, 25, 25, 25, 25, 25, 25, 25], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15], [15, 15, 15, 15, 15, 15, 15, 15]]\nb = [32]\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.f() +// Warning 6368: (188-195): CHC: Out of bounds access happens here.\nCounterexample:\n\nb = [32]\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.f() // Warning 6328: (181-202): CHC: Assertion violation happens here.\nCounterexample:\n\nb = [32]\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.f() diff --git a/test/libsolidity/smtCheckerTests/array_members/storage_pointer_push_1.sol b/test/libsolidity/smtCheckerTests/array_members/storage_pointer_push_1.sol index 8b1791190..bbbc3a68f 100644 --- a/test/libsolidity/smtCheckerTests/array_members/storage_pointer_push_1.sol +++ b/test/libsolidity/smtCheckerTests/array_members/storage_pointer_push_1.sol @@ -15,5 +15,7 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- -// Warning 6328: (152-181): CHC: Assertion violation happens here.\nCounterexample:\narray2d = [[], [], []]\n\nTransaction trace:\nC.constructor()\nState: array2d = []\nC.l()\n C.s() -- internal call +// Warning 6368: (159-169): CHC: Out of bounds access happens here. +// Warning 6328: (152-181): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_non_zero.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_non_zero.sol new file mode 100644 index 000000000..22d9ae86a --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_non_zero.sol @@ -0,0 +1,11 @@ +contract C { + constructor() payable { + assert(address(this).balance == 0); // should fail + assert(address(this).balance > 0); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (40-74): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor() +// Warning 6328: (93-126): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor() diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_non_zero_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_non_zero_2.sol new file mode 100644 index 000000000..1bf99fca3 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_non_zero_2.sol @@ -0,0 +1,13 @@ +contract C { + constructor() payable { + require(msg.value > 100); + } + function f() public view { + assert(address(this).balance > 100); // should hold + assert(address(this).balance > 200); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (153-188): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor(){ value: 101 }\nC.f() diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive.sol new file mode 100644 index 000000000..ea5947d01 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive.sol @@ -0,0 +1,18 @@ +contract C { + uint prevBalance; + constructor() payable { + prevBalance = address(this).balance; + } + function f() public payable { + assert(address(this).balance == prevBalance + msg.value); // should fail because there might be funds from selfdestruct/block.coinbase + assert(address(this).balance < prevBalance + msg.value); // should fail + assert(address(this).balance >= prevBalance + msg.value); // should hold + prevBalance = address(this).balance; + } +} +// ==== +// SMTEngine: all +// SMTIgnoreCex: yes +// ---- +// Warning 6328: (132-188): CHC: Assertion violation happens here. +// Warning 6328: (269-324): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_2.sol new file mode 100644 index 000000000..f9f0093b0 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_2.sol @@ -0,0 +1,19 @@ +contract C { + uint x; + bool once; + constructor() payable { + x = address(this).balance; + } + function f() public payable { + require(!once); + once = true; + require(msg.value > 0); + assert(address(this).balance > x); // should hold + assert(address(this).balance > x + 10); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 4984: (266-272): CHC: Overflow (resulting value larger than 2**256 - 1) happens here.\nCounterexample:\nx = 115792089237316195423570985008687907853269984665640564039457584007913129639926, once = true\n\nTransaction trace:\nC.constructor(){ value: 28100 }\nState: x = 115792089237316195423570985008687907853269984665640564039457584007913129639926, once = false\nC.f(){ value: 8 } +// Warning 6328: (235-273): CHC: Assertion violation happens here.\nCounterexample:\nx = 0, once = true\n\nTransaction trace:\nC.constructor()\nState: x = 0, once = false\nC.f(){ value: 8 } diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_3.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_3.sol new file mode 100644 index 000000000..b581a537d --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_3.sol @@ -0,0 +1,9 @@ +contract C { + constructor() payable { + assert(address(this).balance == msg.value); // should fail because there might be funds from before deployment + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (40-82): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor() diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_4.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_4.sol new file mode 100644 index 000000000..47eade523 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_4.sol @@ -0,0 +1,21 @@ +contract C { + uint c; + function f() public payable { + require(msg.value > 10); + ++c; + } + function inv() public view { + assert(address(this).balance >= c * 11); // should hold + 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. +// Warning 6328: (180-219): CHC: Assertion violation happens here.\nCounterexample:\nc = 1\n\nTransaction trace:\nC.constructor()\nState: c = 0\nC.f(){ value: 11 }\nState: c = 1\nC.inv() +// 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. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_5.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_5.sol new file mode 100644 index 000000000..e703c65c3 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_5.sol @@ -0,0 +1,14 @@ +contract C { + uint sum = msg.value; + function f() public payable { + sum += msg.value; + } + function inv() public view { + assert(address(this).balance == sum); // should fail + assert(address(this).balance >= sum); // should hold + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (122-158): CHC: Assertion violation happens here.\nCounterexample:\nsum = 0\n\nTransaction trace:\nC.constructor()\nState: sum = 0\nC.inv() diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_calls.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_calls.sol new file mode 100644 index 000000000..68bae9ac5 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_calls.sol @@ -0,0 +1,26 @@ +contract C { + bool once; + function f() public payable { + require(!once); + once = true; + require(msg.value == 10); + assert(address(this).balance >= 10); // should hold + assert(address(this).balance >= 20); // should fail + g(); + } + function g() internal view { + assert(address(this).balance >= 10); // should hold + assert(address(this).balance >= 20); // should fail + h(); + } + function h() internal view { + assert(address(this).balance >= 10); // should hold + assert(address(this).balance >= 20); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (173-208): CHC: Assertion violation happens here.\nCounterexample:\nonce = true\n\nTransaction trace:\nC.constructor()\nState: once = false\nC.f(){ value: 10 } +// Warning 6328: (321-356): CHC: Assertion violation happens here.\nCounterexample:\nonce = true\n\nTransaction trace:\nC.constructor()\nState: once = false\nC.f(){ value: 10 }\n C.g(){ value: 10 } -- internal call +// Warning 6328: (469-504): CHC: Assertion violation happens here.\nCounterexample:\nonce = true\n\nTransaction trace:\nC.constructor()\nState: once = false\nC.f(){ value: 10 }\n C.g(){ value: 10 } -- internal call\n C.h(){ value: 10 } -- internal call diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls.sol new file mode 100644 index 000000000..6144056a8 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls.sol @@ -0,0 +1,18 @@ +interface I { + function ext() external; +} + +contract C { + function f(I _i) public { + uint x = address(this).balance; + _i.ext(); + assert(address(this).balance == x); // should fail + assert(address(this).balance >= x); // should hold + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 1218: (131-165): CHC: Error trying to invoke SMT solver. +// Warning 6328: (131-165): CHC: Assertion violation might happen here. +// Warning 4661: (131-165): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls_2.sol new file mode 100644 index 000000000..e0da57fb2 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls_2.sol @@ -0,0 +1,14 @@ +contract C { + function f(address _a) public { + uint x = address(this).balance; + _a.call(""); + assert(address(this).balance == x); // should fail + assert(address(this).balance >= x); // should hold + } +} +// ==== +// SMTEngine: all +// SMTIgnoreCex: yes +// ---- +// Warning 9302: (82-93): Return value of low-level calls not used. +// Warning 6328: (97-131): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls_mutex.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls_mutex.sol new file mode 100644 index 000000000..59c123429 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_receive_ext_calls_mutex.sol @@ -0,0 +1,24 @@ +interface I { + function ext() external; +} + +contract C { + bool lock; + modifier mutex { + require(!lock); + lock = true; + _; + lock = false; + } + function f(I _i) public mutex { + uint x = address(this).balance; + _i.ext(); + assert(address(this).balance == x); // should hold + assert(address(this).balance < x); // should fail + } +} +// ==== +// SMTEngine: all +// SMTIgnoreCex: yes +// ---- +// Warning 6328: (277-310): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend.sol new file mode 100644 index 000000000..72755cc35 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend.sol @@ -0,0 +1,22 @@ +contract C { + constructor() payable { + require(msg.value > 100); + } + uint c; + function f(address payable _a, uint _v) public { + require(_v < 10); + require(c < 2); + ++c; + _a.transfer(_v); + } + function inv() public view { + assert(address(this).balance > 80); // should hold + assert(address(this).balance > 90); // should fail + } +} +// ==== +// SMTEngine: all +// SMTIgnoreCex: yes +// ---- +// Warning 6328: (280-314): CHC: Assertion violation happens here. +// Warning 1236: (175-190): BMC: Insufficient funds happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend_2.sol new file mode 100644 index 000000000..0b3a432e8 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_spend_2.sol @@ -0,0 +1,24 @@ +contract C { + constructor() payable { + require(msg.value > 100); + } + function f(address payable _a, uint _v) public { + require(_v < 10); + _a.transfer(_v); + } + function inv() public view { + assert(address(this).balance > 0); // should fail + assert(address(this).balance > 80); // should fail + assert(address(this).balance > 90); // should fail + } +} +// ==== +// SMTEngine: all +// SMTIgnoreCex: yes +// ---- +// Warning 1218: (193-226): CHC: Error trying to invoke SMT solver. +// Warning 6328: (193-226): CHC: Assertion violation might happen here. +// Warning 6328: (245-279): CHC: Assertion violation happens here. +// Warning 6328: (298-332): CHC: Assertion violation happens here. +// Warning 1236: (141-156): BMC: Insufficient funds happens here. +// Warning 4661: (193-226): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero.sol new file mode 100644 index 000000000..1e585cb7d --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero.sol @@ -0,0 +1,11 @@ +contract C { + constructor() { + assert(address(this).balance == 0); // should fail because there might be funds from before deployment + assert(address(this).balance > 0); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (32-66): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor() +// Warning 6328: (137-170): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor() diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_2.sol new file mode 100644 index 000000000..1ba5eb87f --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_2.sol @@ -0,0 +1,11 @@ +contract C { + function f() public view { + assert(address(this).balance == 0); // should fail because there might be funds from before deployment + assert(address(this).balance > 0); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (43-77): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() +// Warning 6328: (148-181): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_3.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_3.sol new file mode 100644 index 000000000..39c7000c3 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_3.sol @@ -0,0 +1,18 @@ +contract C { + uint x = address(this).balance; + constructor() { + assert(x == 0); // should fail because there might be funds from before deployment + assert(x > 0); // should fail + } + function f() public view { + assert(x == 0); // should fail because there might be funds from before deployment + assert(x > 0); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (65-79): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\n\nTransaction trace:\nC.constructor() +// Warning 6328: (150-163): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nC.constructor() +// Warning 6328: (213-227): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\n\nTransaction trace:\nC.constructor()\nState: x = 1\nC.f() +// Warning 6328: (298-311): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f() diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_4.sol b/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_4.sol new file mode 100644 index 000000000..81bf41892 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/blockchain_state/balance_zero_4.sol @@ -0,0 +1,21 @@ +contract C { + uint x = g(); + function g() internal view returns (uint) { + return address(this).balance; + } + constructor() { + assert(x == 0); // should fail because there might be funds from before deployment + assert(x > 0); // should fail + } + function f() public view { + assert(x == 0); // should fail because there might be funds from before deployment + assert(x > 0); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (127-141): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\n\nTransaction trace:\nC.constructor() +// Warning 6328: (212-225): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nC.constructor() +// Warning 6328: (275-289): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\n\nTransaction trace:\nC.constructor()\nState: x = 1\nC.f() +// Warning 6328: (360-373): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f() diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/free_function_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/free_function_2.sol index cfce81c53..6c3d12026 100644 --- a/test/libsolidity/smtCheckerTests/blockchain_state/free_function_2.sol +++ b/test/libsolidity/smtCheckerTests/blockchain_state/free_function_2.sol @@ -7,10 +7,11 @@ contract C { function f(address payable a) public payable { require(msg.value > 1); uint b1 = address(this).balance; + require(a != address(this)); l(a); uint b2 = address(this).balance; assert(b1 == b2); // should fail - assert(b1 == b2 - 1); // should hold but we don't keep track of balances with msg.value yet + assert(b1 == b2 + 1); // should hold assert(x == 0); // should hold } } @@ -18,7 +19,5 @@ contract C { // SMTEngine: all // SMTIgnoreCex: yes // ---- -// Warning 6328: (227-243): CHC: Assertion violation happens here. -// Warning 3944: (275-281): CHC: Underflow (resulting value less than 0) happens here. -// Warning 6328: (262-282): CHC: Assertion violation happens here. +// Warning 6328: (258-274): CHC: Assertion violation happens here. // Warning 1236: (33-46): BMC: Insufficient funds happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/library_internal_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/library_internal_2.sol index d3ad410c1..8fca1916f 100644 --- a/test/libsolidity/smtCheckerTests/blockchain_state/library_internal_2.sol +++ b/test/libsolidity/smtCheckerTests/blockchain_state/library_internal_2.sol @@ -1,5 +1,6 @@ library L { function l(address payable a) internal { + require(a != address(this)); a.transfer(1); } } @@ -13,15 +14,13 @@ contract C { a.l(); uint b2 = address(this).balance; assert(b1 == b2); // should fail - assert(b1 == b2 - 1); // should hold but we don't keep track of balances with msg.value yet + assert(b1 == b2 + 1); // should hold assert(x == 0); // should hold } } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- -// Warning 6328: (284-300): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\na = 21238\nb1 = 8856\nb2 = 8855\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f(21238){ value: 11799 }\n L.l(21238){ value: 11799 } -- internal call -// Warning 3944: (332-338): CHC: Underflow (resulting value less than 0) happens here.\nCounterexample:\nx = 0\na = 38\nb1 = 1\nb2 = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f(38){ value: 21240 }\n L.l(38){ value: 21240 } -- internal call -// Warning 6328: (319-339): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\na = 21238\nb1 = 40\nb2 = 39\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f(21238){ value: 8857 }\n L.l(21238){ value: 8857 } -- internal call -// Warning 1236: (56-69): BMC: Insufficient funds happens here. -// Warning 1236: (56-69): BMC: Insufficient funds happens here. +// Warning 6328: (315-331): CHC: Assertion violation happens here. +// Warning 1236: (87-100): BMC: Insufficient funds happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_1.sol b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_1.sol index d62301509..98e0e664f 100644 --- a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_1.sol +++ b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_1.sol @@ -16,8 +16,8 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- // Warning 4588: (219-224): Assertion checker does not yet implement this type of function call. -// Warning 6328: (263-279): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\na = 0\nb1 = 7720\nb2 = 7719\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f(0){ value: 5855 } -// Warning 6328: (359-373): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\na = 0\nb1 = 39\nb2 = 38\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f(0){ value: 21240 } -// Warning 4588: (219-224): Assertion checker does not yet implement this type of function call. +// Warning 6328: (263-279): CHC: Assertion violation happens here. +// Warning 6328: (359-373): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_2.sol b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_2.sol index a77047efb..4b500581d 100644 --- a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_2.sol +++ b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_2.sol @@ -24,4 +24,3 @@ contract C { // Warning 6328: (282-298): CHC: Assertion violation happens here. // Warning 6328: (317-331): CHC: Assertion violation happens here. // Warning 1236: (54-67): BMC: Insufficient funds happens here. -// Warning 4588: (238-243): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_3.sol b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_3.sol index a7abdeef9..26975e359 100644 --- a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_3.sol +++ b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_3.sol @@ -26,4 +26,3 @@ contract C { // Warning 6328: (309-325): CHC: Assertion violation happens here. // Warning 6328: (405-419): CHC: Assertion violation happens here. // Warning 6328: (464-486): CHC: Assertion violation happens here. -// Warning 4588: (265-270): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_4.sol b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_4.sol index ccda62ad5..57fdbf9ad 100644 --- a/test/libsolidity/smtCheckerTests/blockchain_state/library_public_4.sol +++ b/test/libsolidity/smtCheckerTests/blockchain_state/library_public_4.sol @@ -27,4 +27,3 @@ contract C { // Warning 6328: (316-332): CHC: Assertion violation happens here. // Warning 6328: (412-426): CHC: Assertion violation happens here. // Warning 6328: (471-494): CHC: Assertion violation happens here. -// Warning 4588: (272-277): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/bmc_coverage/unchecked_function_call_with_unchecked_block.sol b/test/libsolidity/smtCheckerTests/bmc_coverage/unchecked_function_call_with_unchecked_block.sol index e5eb9b631..3fb817489 100644 --- a/test/libsolidity/smtCheckerTests/bmc_coverage/unchecked_function_call_with_unchecked_block.sol +++ b/test/libsolidity/smtCheckerTests/bmc_coverage/unchecked_function_call_with_unchecked_block.sol @@ -13,4 +13,3 @@ contract C { // SMTEngine: bmc // ---- // Warning 4661: (85-98): BMC: Assertion violation happens here. -// Warning 4661: (85-98): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/complex/slither/external_function.sol b/test/libsolidity/smtCheckerTests/complex/slither/external_function.sol index c3ce9050e..3f5096a3b 100644 --- a/test/libsolidity/smtCheckerTests/complex/slither/external_function.sol +++ b/test/libsolidity/smtCheckerTests/complex/slither/external_function.sol @@ -85,6 +85,4 @@ contract InternalCall { // Warning 2018: (1247-1309): Function state mutability can be restricted to pure // Warning 4588: (681-716): Assertion checker does not yet implement this type of function call. // Warning 4588: (854-886): Assertion checker does not yet implement this type of function call. -// Warning 4588: (681-716): Assertion checker does not yet implement this type of function call. -// Warning 4588: (854-886): Assertion checker does not yet implement this type of function call. // Warning 5729: (1370-1375): BMC does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/crypto/crypto_functions_fail.sol b/test/libsolidity/smtCheckerTests/crypto/crypto_functions_fail.sol index 8485b89a6..2791d3d64 100644 --- a/test/libsolidity/smtCheckerTests/crypto/crypto_functions_fail.sol +++ b/test/libsolidity/smtCheckerTests/crypto/crypto_functions_fail.sol @@ -33,4 +33,6 @@ contract C { // Warning 2072: (435-445): Unused local variable. // Warning 2072: (656-666): Unused local variable. // Warning 2072: (698-708): Unused local variable. -// Warning 6328: (135-151): CHC: Assertion violation happens here. +// Warning 1218: (135-151): CHC: Error trying to invoke SMT solver. +// Warning 6328: (135-151): CHC: Assertion violation might happen here. +// Warning 4661: (135-151): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/external_calls/call_reentrancy_1.sol b/test/libsolidity/smtCheckerTests/external_calls/call_reentrancy_1.sol index b2730d2a3..f33f8ada3 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/call_reentrancy_1.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/call_reentrancy_1.sol @@ -10,8 +10,9 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- // Warning 2519: (100-106): This declaration shadows an existing declaration. // Warning 2072: (100-106): Unused local variable. // Warning 2072: (108-125): Unused local variable. -// Warning 6328: (143-157): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\na = 0\ns = false\ndata = [36, 5, 5, 5, 5, 5]\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.s(1)\nState: x = 1\nC.f(0)\n a.call("") -- untrusted external call +// Warning 6328: (143-157): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_call_from_constructor_3.sol b/test/libsolidity/smtCheckerTests/external_calls/external_call_from_constructor_3.sol index eb5cd97dd..9d27d6d3b 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_call_from_constructor_3.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_call_from_constructor_3.sol @@ -20,4 +20,4 @@ contract C { // SMTEngine: all // ---- // Warning 6328: (69-85): CHC: Assertion violation happens here.\nCounterexample:\n\n_x = 100\n = 0\n\nTransaction trace:\nState.constructor()\nState.f(100) -// Warning 6328: (203-217): CHC: Assertion violation happens here.\nCounterexample:\ns = 0, z = 3\n\nTransaction trace:\nC.constructor()\nState: s = 0, z = 3\nC.f() +// Warning 6328: (203-217): CHC: Assertion violation happens here.\nCounterexample:\ns = 0, z = 0\n\nTransaction trace:\nC.constructor()\nState: s = 0, z = 0\nC.f() diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy.sol index f546bc921..29d184895 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy.sol @@ -19,7 +19,8 @@ contract C { address prevOwner = owner; uint z = s.f(); assert(z == y); - assert(prevOwner == owner); + // Disabled because of Spacer nondeterminism. + //assert(prevOwner == owner); } function g() public view returns (uint) { @@ -30,4 +31,5 @@ contract C { // SMTEngine: all // SMTIgnoreCex: yes // ---- +// Warning 2072: (219-236): Unused local variable. // Warning 6328: (266-280): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_2.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_2.sol index d20257692..a90e87cb3 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_2.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_2.sol @@ -40,4 +40,4 @@ contract C { // SMTEngine: all // ---- // Warning 2018: (33-88): Function state mutability can be restricted to view -// Warning 6328: (367-381): CHC: Assertion violation happens here.\nCounterexample:\nowner = 0, y = 0, z = 3, s = 0, insidef = true\nprevOwner = 0\n\nTransaction trace:\nC.constructor()\nState: owner = 0, y = 0, z = 0, s = 0, insidef = false\nC.f()\n s.f() -- untrusted external call, synthesized as:\n C.zz() -- reentrant call +// Warning 6328: (367-381): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_unsafe.sol b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_unsafe.sol index d871d6e13..32aa483a7 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_unsafe.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_hash_known_code_state_reentrancy_unsafe.sol @@ -35,5 +35,7 @@ contract C { // SMTEngine: all // SMTIgnoreCex: yes // ---- +// Warning 1218: (366-392): CHC: Error trying to invoke SMT solver. // Warning 6328: (348-362): CHC: Assertion violation happens here. -// Warning 6328: (366-392): CHC: Assertion violation happens here. +// Warning 6328: (366-392): CHC: Assertion violation might happen here. +// Warning 4661: (366-392): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_3.sol b/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_3.sol index bfb88988f..ff2cd7c85 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_3.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_3.sol @@ -21,11 +21,12 @@ contract C is A { function f() public view override { assert(x == 1); // should hold - assert(x == 0); // should fail + //Disabled because of Spacer nondeterminism. + //assert(x == 0); // should fail } } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- -// Warning 6328: (154-168): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nA.constructor()\nState: x = 0\nA.f() -// Warning 6328: (352-366): CHC: Assertion violation happens here.\nCounterexample:\nx = 1\nd = 0\n\nTransaction trace:\nC.constructor()\nState: x = 1\nC.call(0)\n d.d() -- untrusted external call, synthesized as:\n C.f() -- reentrant call +// Warning 6328: (154-168): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_crypto.sol b/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_crypto.sol index 2437d9829..98f6d80be 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_crypto.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/external_reentrancy_crypto.sol @@ -27,6 +27,5 @@ contract C { // SMTEngine: all // ---- // Warning 1218: (302-333): CHC: Error trying to invoke SMT solver. -// Warning 1218: (302-333): CHC: Error trying to invoke SMT solver. // Warning 6328: (302-333): CHC: Assertion violation might happen here. // Warning 4661: (302-333): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/external_calls/mutex_f_no_guard.sol b/test/libsolidity/smtCheckerTests/external_calls/mutex_f_no_guard.sol index f3b99f540..76568adf6 100644 --- a/test/libsolidity/smtCheckerTests/external_calls/mutex_f_no_guard.sol +++ b/test/libsolidity/smtCheckerTests/external_calls/mutex_f_no_guard.sol @@ -21,11 +21,12 @@ contract C { function f() public { uint y = x; d.d(); - assert(y == x); + // Disabled because of Spacer nondeterminism. + //assert(y == x); } } // ==== // SMTEngine: all // SMTIgnoreCex: yes // ---- -// Warning 6328: (274-288): CHC: Assertion violation happens here. +// Warning 2072: (251-257): Unused local variable. diff --git a/test/libsolidity/smtCheckerTests/file_level/abi_function_different_source.sol b/test/libsolidity/smtCheckerTests/file_level/abi_function_different_source.sol new file mode 100644 index 000000000..c9abf3f34 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/file_level/abi_function_different_source.sol @@ -0,0 +1,9 @@ +==== Source: s1.sol ==== +function f() { + ecrecover("1234", 1, "0", abi.decode("", (bytes2))); +} +==== Source: s2.sol ==== +contract C {} +// ---- +// Warning 6133: (s1.sol:16-67): Statement has no effect. +// Warning 2018: (s1.sol:0-70): Function state mutability can be restricted to pure diff --git a/test/libsolidity/smtCheckerTests/file_level/abi_function_different_source_2.sol b/test/libsolidity/smtCheckerTests/file_level/abi_function_different_source_2.sol new file mode 100644 index 000000000..f403b5c6e --- /dev/null +++ b/test/libsolidity/smtCheckerTests/file_level/abi_function_different_source_2.sol @@ -0,0 +1,9 @@ +==== Source: s1.sol ==== +function f() { + ecrecover("", 1, "", ""); +} +==== Source: s2.sol ==== +contract C {} +// ---- +// Warning 6133: (s1.sol:16-40): Statement has no effect. +// Warning 2018: (s1.sol:0-43): Function state mutability can be restricted to pure diff --git a/test/libsolidity/smtCheckerTests/file_level/constant_different_source.sol b/test/libsolidity/smtCheckerTests/file_level/constant_different_source.sol new file mode 100644 index 000000000..ff8d72b30 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/file_level/constant_different_source.sol @@ -0,0 +1,12 @@ +==== Source: l.sol ==== +library L { + int constant one = 1; + function f() internal { + one; + } +} +==== Source: s1.sol ==== +library L {} +// ---- +// Warning 6133: (l.sol:62-65): Statement has no effect. +// Warning 2018: (l.sol:36-69): Function state mutability can be restricted to pure diff --git a/test/libsolidity/smtCheckerTests/file_level/file_level_call_via_module.sol b/test/libsolidity/smtCheckerTests/file_level/file_level_call_via_module.sol index 71fdcceeb..2392db620 100644 --- a/test/libsolidity/smtCheckerTests/file_level/file_level_call_via_module.sol +++ b/test/libsolidity/smtCheckerTests/file_level/file_level_call_via_module.sol @@ -22,5 +22,3 @@ contract C { // Warning 8364: (b.sol:103-104): Assertion checker does not yet implement type module "a.sol" // Warning 6328: (b.sol:208-222): CHC: Assertion violation happens here.\nCounterexample:\n\na = 7\nb = 3\n\nTransaction trace:\nC.constructor()\nC.p()\n C.f() -- internal call\n a.sol:f(2) -- internal call\n a.sol:f([97, 98, 99]) -- internal call // Warning 6328: (b.sol:274-288): CHC: Assertion violation happens here.\nCounterexample:\n\na = 7\nb = 3\n\nTransaction trace:\nC.constructor()\nC.p()\n C.f() -- internal call\n a.sol:f(2) -- internal call\n a.sol:f([97, 98, 99]) -- internal call -// Warning 8364: (b.sol:95-96): Assertion checker does not yet implement type module "a.sol" -// Warning 8364: (b.sol:103-104): Assertion checker does not yet implement type module "a.sol" diff --git a/test/libsolidity/smtCheckerTests/file_level/free_runtimecode.sol b/test/libsolidity/smtCheckerTests/file_level/free_runtimecode.sol index 5da2ea0d1..939d32e22 100644 --- a/test/libsolidity/smtCheckerTests/file_level/free_runtimecode.sol +++ b/test/libsolidity/smtCheckerTests/file_level/free_runtimecode.sol @@ -15,6 +15,4 @@ contract D { // SMTEngine: all // ---- // Warning 7507: (82-101): Assertion checker does not yet support this expression. -// Warning 7507: (82-101): Assertion checker does not yet support this expression. // Warning 6328: (161-175): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nD.constructor()\nD.f()\n test() -- internal call -// Warning 7507: (82-101): Assertion checker does not yet support this expression. diff --git a/test/libsolidity/smtCheckerTests/file_level/import.sol b/test/libsolidity/smtCheckerTests/file_level/import.sol index a89219927..536e38fb1 100644 --- a/test/libsolidity/smtCheckerTests/file_level/import.sol +++ b/test/libsolidity/smtCheckerTests/file_level/import.sol @@ -25,4 +25,3 @@ contract C { // Warning 8364: (B:115-116): Assertion checker does not yet implement type module "A" // Warning 6328: (B:238-252): CHC: Assertion violation happens here.\nCounterexample:\ndata = {x: 0}\nx = 0\ny = 0\n\nTransaction trace:\nC.constructor()\nState: data = {x: 0}\nC.g()\n C.f(7) -- internal call\n A:set({x: 0}, 7) -- internal call\n A:set({x: 0}, 8) -- internal call // Warning 6328: (B:308-322): CHC: Assertion violation happens here.\nCounterexample:\ndata = {x: 0}\nx = 0\ny = 0\n\nTransaction trace:\nC.constructor()\nState: data = {x: 0}\nC.g()\n C.f(7) -- internal call\n A:set({x: 0}, 7) -- internal call\n A:set({x: 0}, 8) -- internal call -// Warning 8364: (B:115-116): Assertion checker does not yet implement type module "A" diff --git a/test/libsolidity/smtCheckerTests/file_level/libraries_from_free.sol b/test/libsolidity/smtCheckerTests/file_level/libraries_from_free.sol index 9f0104c21..881c1388e 100644 --- a/test/libsolidity/smtCheckerTests/file_level/libraries_from_free.sol +++ b/test/libsolidity/smtCheckerTests/file_level/libraries_from_free.sol @@ -20,9 +20,8 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- // Warning 4588: (190-197): Assertion checker does not yet implement this type of function call. -// Warning 4588: (190-197): Assertion checker does not yet implement this type of function call. -// Warning 6328: (284-298): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 8\ny = 8\n\nTransaction trace:\nC.constructor()\nC.f()\n fu() -- internal call\n L.inter() -- internal call -// Warning 6328: (363-377): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\ny = 8\n\nTransaction trace:\nC.constructor()\nC.f()\n fu() -- internal call\n L.inter() -- internal call -// Warning 4588: (190-197): Assertion checker does not yet implement this type of function call. +// Warning 6328: (284-298): CHC: Assertion violation happens here. +// Warning 6328: (363-377): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/file_level/new_operator.sol b/test/libsolidity/smtCheckerTests/file_level/new_operator.sol index 33a30cf0c..8a0f118ae 100644 --- a/test/libsolidity/smtCheckerTests/file_level/new_operator.sol +++ b/test/libsolidity/smtCheckerTests/file_level/new_operator.sol @@ -15,6 +15,4 @@ contract D { // SMTEngine: all // ---- // Warning 4588: (78-85): Assertion checker does not yet implement this type of function call. -// Warning 4588: (78-85): Assertion checker does not yet implement this type of function call. // Warning 6328: (133-152): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nD.constructor()\nD.f()\n test() -- internal call\n (new C()).x() -- untrusted external call -// Warning 4588: (78-85): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/file_level/same_constants_different_files.sol b/test/libsolidity/smtCheckerTests/file_level/same_constants_different_files.sol index 43273c3c3..1d7760f25 100644 --- a/test/libsolidity/smtCheckerTests/file_level/same_constants_different_files.sol +++ b/test/libsolidity/smtCheckerTests/file_level/same_constants_different_files.sol @@ -32,6 +32,3 @@ contract C { // Warning 7650: (s2.sol:182-185): Assertion checker does not yet support this expression. // Warning 8364: (s2.sol:182-183): Assertion checker does not yet implement type module "s1.sol" // Warning 6328: (s2.sol:334-349): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 13\ny = 89\nz = 0\nt = 89\n\nTransaction trace:\nC.constructor()\nC.p()\n C.f() -- internal call\n s1.sol:fre() -- internal call -// Warning 7650: (s2.sol:182-185): Assertion checker does not yet support this expression. -// Warning 8364: (s2.sol:182-183): Assertion checker does not yet implement type module "s1.sol" -// Warning 7650: (s2.sol:182-185): Assertion checker does not yet support this expression. diff --git a/test/libsolidity/smtCheckerTests/function_selector/function_types_sig.sol b/test/libsolidity/smtCheckerTests/function_selector/function_types_sig.sol index 41bd77361..54199e89c 100644 --- a/test/libsolidity/smtCheckerTests/function_selector/function_types_sig.sol +++ b/test/libsolidity/smtCheckerTests/function_selector/function_types_sig.sol @@ -27,5 +27,3 @@ contract C { // Warning 7650: (251-263): Assertion checker does not yet support this expression. // Warning 6328: (437-462): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.check()\n C.f() -- internal call\n C.g() -- internal call // Warning 6328: (507-532): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.check()\n C.f() -- internal call\n C.g() -- internal call\n C.i() -- internal call\n C.i() -- internal call -// Warning 7650: (251-263): Assertion checker does not yet support this expression. -// Warning 7650: (251-263): Assertion checker does not yet support this expression. diff --git a/test/libsolidity/smtCheckerTests/functions/getters/bytes.sol b/test/libsolidity/smtCheckerTests/functions/getters/bytes.sol index 875cd5455..01dec8bc1 100644 --- a/test/libsolidity/smtCheckerTests/functions/getters/bytes.sol +++ b/test/libsolidity/smtCheckerTests/functions/getters/bytes.sol @@ -10,4 +10,6 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (162-201): CHC: Assertion violation happens here. +// Warning 1218: (162-201): CHC: Error trying to invoke SMT solver. +// Warning 6328: (162-201): CHC: Assertion violation might happen here. +// Warning 4661: (162-201): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/functions/getters/string.sol b/test/libsolidity/smtCheckerTests/functions/getters/string.sol index c856ad514..2f2319a16 100644 --- a/test/libsolidity/smtCheckerTests/functions/getters/string.sol +++ b/test/libsolidity/smtCheckerTests/functions/getters/string.sol @@ -10,4 +10,6 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (178-224): CHC: Assertion violation happens here. +// Warning 1218: (178-224): CHC: Error trying to invoke SMT solver. +// Warning 6328: (178-224): CHC: Assertion violation might happen here. +// Warning 4661: (178-224): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/imports/import_as_module_2.sol b/test/libsolidity/smtCheckerTests/imports/import_as_module_2.sol index 5288bd99c..7f109df23 100644 --- a/test/libsolidity/smtCheckerTests/imports/import_as_module_2.sol +++ b/test/libsolidity/smtCheckerTests/imports/import_as_module_2.sol @@ -22,5 +22,3 @@ function f(uint _x) pure { // Warning 8364: (A:145-146): Assertion checker does not yet implement type module "s1.sol" // Warning 6328: (A:50-64): CHC: Assertion violation happens here.\nCounterexample:\n\n_y = 0\n\nTransaction trace:\nD.constructor()\nD.g(0)\n s1.sol:f(200) -- internal call\n s1.sol:f(0) -- internal call\n A:f(10) -- internal call\n A:f(0) -- internal call // Warning 6328: (s1.sol:28-44): CHC: Assertion violation happens here.\nCounterexample:\n\n_y = 0\n\nTransaction trace:\nD.constructor()\nD.g(0)\n s1.sol:f(200) -- internal call\n s1.sol:f(0) -- internal call -// Warning 8364: (A:118-119): Assertion checker does not yet implement type module "s1.sol" -// Warning 8364: (A:145-146): Assertion checker does not yet implement type module "s1.sol" diff --git a/test/libsolidity/smtCheckerTests/imports/imported_fail_1.sol b/test/libsolidity/smtCheckerTests/imports/imported_fail_1.sol index 5688ddec0..cd9e2e27e 100644 --- a/test/libsolidity/smtCheckerTests/imports/imported_fail_1.sol +++ b/test/libsolidity/smtCheckerTests/imports/imported_fail_1.sol @@ -23,5 +23,4 @@ contract C is B { // SMTEngine: all // ---- // Warning 6328: (B.sol:71-85): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n_x = 0\n\nTransaction trace:\nB.constructor()\nState: x = 0\nB.g(0) -// Warning 6328: (B.sol:71-85): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n_x = 0\n\nTransaction trace:\nB.constructor()\nState: x = 0\nB.g(0) // Warning 6328: (C.sol:71-85): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n_x = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.h(0) diff --git a/test/libsolidity/smtCheckerTests/imports/imported_fail_2.sol b/test/libsolidity/smtCheckerTests/imports/imported_fail_2.sol index 5688ddec0..cd9e2e27e 100644 --- a/test/libsolidity/smtCheckerTests/imports/imported_fail_2.sol +++ b/test/libsolidity/smtCheckerTests/imports/imported_fail_2.sol @@ -23,5 +23,4 @@ contract C is B { // SMTEngine: all // ---- // Warning 6328: (B.sol:71-85): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n_x = 0\n\nTransaction trace:\nB.constructor()\nState: x = 0\nB.g(0) -// Warning 6328: (B.sol:71-85): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n_x = 0\n\nTransaction trace:\nB.constructor()\nState: x = 0\nB.g(0) // Warning 6328: (C.sol:71-85): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n_x = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.h(0) diff --git a/test/libsolidity/smtCheckerTests/inheritance/base_contract_assertion_fail_1.sol b/test/libsolidity/smtCheckerTests/inheritance/base_contract_assertion_fail_1.sol index 2f8c4a976..c86ea3e59 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/base_contract_assertion_fail_1.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/base_contract_assertion_fail_1.sol @@ -15,4 +15,4 @@ contract C is B { // ==== // SMTEngine: all // ---- -// Warning 6328: (52-66): CHC: Assertion violation happens here. +// Warning 6328: (52-66): CHC: Assertion violation happens here.\nCounterexample:\ny = 0, x = 1\n\nTransaction trace:\nC.constructor()\nState: y = 0, x = 0\nC.g()\n B.f() -- internal call\nState: y = 0, x = 1\nB.f() diff --git a/test/libsolidity/smtCheckerTests/inheritance/receive_fallback.sol b/test/libsolidity/smtCheckerTests/inheritance/receive_fallback.sol index bd94e45a0..9df407cd2 100644 --- a/test/libsolidity/smtCheckerTests/inheritance/receive_fallback.sol +++ b/test/libsolidity/smtCheckerTests/inheritance/receive_fallback.sol @@ -21,6 +21,6 @@ contract B is A { // ==== // SMTEngine: all // ---- -// Warning 6328: (87-101): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nA.constructor()\nState: x = 0\nA.receive(){ value: 10450 } +// Warning 6328: (87-101): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nA.constructor()\nState: x = 0\nA.receive(){ value: 2 } // Warning 6328: (136-150): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\n\nTransaction trace:\nA.constructor()\nState: x = 0\nA.g() // Warning 6328: (255-269): CHC: Assertion violation happens here.\nCounterexample:\ny = 0, x = 0\n\nTransaction trace:\nB.constructor()\nState: y = 0, x = 0\nB.fallback() diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_1.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_1.sol index 335171ff7..ad531cc24 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_1.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_1.sol @@ -17,8 +17,3 @@ contract C { // Warning 7737: (70-89): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). // Warning 6328: (239-250): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.g()\n C.f() -- internal call // Warning 6328: (282-294): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.g()\n C.f() -- internal call\n C.f() -- internal call -// Warning 7737: (70-89): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (70-89): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (70-89): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (70-89): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (70-89): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_2.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_2.sol index 5e5443078..68ac2ee39 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_2.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_2.sol @@ -13,4 +13,3 @@ contract C { // ---- // Warning 7737: (82-101): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). // Warning 6328: (138-147): CHC: Assertion violation happens here.\nCounterexample:\n\n = false\nb = false\nx = 42\n\nTransaction trace:\nC.constructor()\nC.f() -// Warning 7737: (82-101): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_3.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_3.sol index 643dfe155..838b69e5d 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_3.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_3.sol @@ -13,4 +13,3 @@ contract C { // ---- // Warning 7737: (106-125): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). // Warning 6328: (203-212): CHC: Assertion violation happens here.\nCounterexample:\n\n = false\nb = false\nc = true\n\nTransaction trace:\nC.constructor()\nC.f() -// Warning 7737: (106-125): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_4.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_4.sol index d024e1283..1915ca821 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_4.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_4.sol @@ -13,4 +13,3 @@ contract C { // SMTEngine: all // ---- // Warning 7737: (82-101): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (82-101): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_5.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_5.sol index 225d2672d..dc91a6822 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_5.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_5.sol @@ -23,4 +23,3 @@ contract C { // SMTEngine: all // ---- // Warning 7737: (156-187): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (156-187): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_6.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_6.sol index 60f7390ec..e7f4e37c6 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_6.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_6.sol @@ -22,4 +22,3 @@ contract C { // SMTEngine: all // ---- // Warning 7737: (157-193): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (157-193): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_local_storage_access_inside_function.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_local_storage_access_inside_function.sol index 753c4ec23..5a754b4e3 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_local_storage_access_inside_function.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_local_storage_access_inside_function.sol @@ -22,4 +22,3 @@ contract C { // Warning 7737: (83-149): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). // Warning 6328: (152-167): CHC: Assertion violation happens here. // Warning 6328: (186-200): CHC: Assertion violation happens here. -// Warning 7737: (83-149): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_local_storage_pointer.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_local_storage_pointer.sol index 8956d55c5..13232a650 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_local_storage_pointer.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_local_storage_pointer.sol @@ -21,4 +21,3 @@ contract C { // Warning 7737: (170-205): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). // Warning 6328: (208-229): CHC: Assertion violation happens here. // Warning 6328: (248-269): CHC: Assertion violation happens here. -// Warning 7737: (170-205): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_memory_write.sol b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_memory_write.sol index 04b368e9d..e8c8896ab 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/assembly_memory_write.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/assembly_memory_write.sol @@ -26,4 +26,3 @@ contract C { // Warning 7737: (156-187): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). // Warning 6328: (190-208): CHC: Assertion violation happens here. // Warning 6328: (227-244): CHC: Assertion violation happens here. -// Warning 7737: (156-187): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/empty.sol b/test/libsolidity/smtCheckerTests/inline_assembly/empty.sol index c977fc034..ed0905392 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/empty.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/empty.sol @@ -9,4 +9,3 @@ contract C // SMTEngine: all // ---- // Warning 7737: (43-57): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (43-57): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/inline_assembly/local_var.sol b/test/libsolidity/smtCheckerTests/inline_assembly/local_var.sol index fb15f6db5..f7ac997f0 100644 --- a/test/libsolidity/smtCheckerTests/inline_assembly/local_var.sol +++ b/test/libsolidity/smtCheckerTests/inline_assembly/local_var.sol @@ -11,4 +11,3 @@ contract C // SMTEngine: all // ---- // Warning 7737: (64-88): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). -// Warning 7737: (64-88): Inline assembly may cause SMTChecker to produce spurious warnings (false positives). diff --git a/test/libsolidity/smtCheckerTests/invariants/aon_blog_post.sol b/test/libsolidity/smtCheckerTests/invariants/aon_blog_post.sol index c7ed0a148..56e0eb350 100644 --- a/test/libsolidity/smtCheckerTests/invariants/aon_blog_post.sol +++ b/test/libsolidity/smtCheckerTests/invariants/aon_blog_post.sol @@ -45,4 +45,5 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (657-667): CHC: Assertion violation happens here. +// Warning 6328: (657-667): CHC: Assertion violation might happen here. +// Warning 4661: (657-667): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/loops/for_loop_array_assignment_memory_memory.sol b/test/libsolidity/smtCheckerTests/loops/for_loop_array_assignment_memory_memory.sol index 02a66575a..c51e7ca0c 100644 --- a/test/libsolidity/smtCheckerTests/loops/for_loop_array_assignment_memory_memory.sol +++ b/test/libsolidity/smtCheckerTests/loops/for_loop_array_assignment_memory_memory.sol @@ -7,8 +7,9 @@ contract LoopFor2 { uint[] memory a = b; for (uint i = 0; i < n; i += 1) { // Accesses are safe but oob is reported due to potential aliasing after c's assignment. - b[i] = i + 1; - c[i] = b[i]; + // Disabled because of Spacer nondeterminism. + //b[i] = i + 1; + //c[i] = b[i]; } // Removed because current Spacer seg faults in cex generation. //assert(b[0] == c[0]); @@ -23,6 +24,3 @@ contract LoopFor2 { // SMTIgnoreCex: yes // ---- // Warning 2072: (202-217): Unused local variable. -// Warning 6368: (354-358): CHC: Out of bounds access happens here. -// Warning 6368: (371-375): CHC: Out of bounds access happens here. -// Warning 6368: (378-382): CHC: Out of bounds access happens here. diff --git a/test/libsolidity/smtCheckerTests/loops/while_nested_continue_fail.sol b/test/libsolidity/smtCheckerTests/loops/while_nested_continue_fail.sol index 180d85adc..fe43db0de 100644 --- a/test/libsolidity/smtCheckerTests/loops/while_nested_continue_fail.sol +++ b/test/libsolidity/smtCheckerTests/loops/while_nested_continue_fail.sol @@ -27,5 +27,7 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (290-305): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\ny = 15\nb = false\nc = false\n\nTransaction trace:\nC.constructor()\nC.f(0, 0, false, false) +// Warning 1218: (290-305): CHC: Error trying to invoke SMT solver. +// Warning 6328: (290-305): CHC: Assertion violation might happen here. // Warning 6328: (329-344): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 15\ny = 0\nb = true\nc = false\n\nTransaction trace:\nC.constructor()\nC.f(0, 0, true, false) +// Warning 4661: (290-305): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/natspec/natspec_smtchecker_empty.sol b/test/libsolidity/smtCheckerTests/natspec/natspec_smtchecker_empty.sol index 6b615f763..981c4b9ff 100644 --- a/test/libsolidity/smtCheckerTests/natspec/natspec_smtchecker_empty.sol +++ b/test/libsolidity/smtCheckerTests/natspec/natspec_smtchecker_empty.sol @@ -8,4 +8,3 @@ contract C { // SMTEngine: chc // ---- // Warning 3130: (38-102): Unknown option for "custom:smtchecker": "" -// Warning 3130: (38-102): Unknown option for "custom:smtchecker": "" diff --git a/test/libsolidity/smtCheckerTests/natspec/natspec_smtchecker_error_1.sol b/test/libsolidity/smtCheckerTests/natspec/natspec_smtchecker_error_1.sol index 6b42e2200..ba704f52b 100644 --- a/test/libsolidity/smtCheckerTests/natspec/natspec_smtchecker_error_1.sol +++ b/test/libsolidity/smtCheckerTests/natspec/natspec_smtchecker_error_1.sol @@ -8,4 +8,3 @@ contract C { // SMTEngine: chc // ---- // Warning 3130: (56-120): Unknown option for "custom:smtchecker": "abstract-function" -// Warning 3130: (56-120): Unknown option for "custom:smtchecker": "abstract-function" diff --git a/test/libsolidity/smtCheckerTests/natspec/safe_assert_false_positive_pure.sol b/test/libsolidity/smtCheckerTests/natspec/safe_assert_false_positive_pure.sol index 464d9834a..11fcbf6f6 100644 --- a/test/libsolidity/smtCheckerTests/natspec/safe_assert_false_positive_pure.sol +++ b/test/libsolidity/smtCheckerTests/natspec/safe_assert_false_positive_pure.sol @@ -23,7 +23,8 @@ contract C { } // ==== // SMTEngine: chc +// SMTIgnoreCex: yes // ---- // Warning 2018: (33-335): Function state mutability can be restricted to view // Warning 2018: (457-524): Function state mutability can be restricted to pure -// Warning 6328: (135-150): CHC: Assertion violation happens here.\nCounterexample:\nx = 0, y = 0\n_x = 1\nz = 0\nt = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0, y = 0\nC.g(1)\n C.f1(1) -- internal call +// Warning 6328: (135-150): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/operators/compound_add_array_index.sol b/test/libsolidity/smtCheckerTests/operators/compound_add_array_index.sol index ab56d9504..4068ad2b9 100644 --- a/test/libsolidity/smtCheckerTests/operators/compound_add_array_index.sol +++ b/test/libsolidity/smtCheckerTests/operators/compound_add_array_index.sol @@ -19,4 +19,4 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (262-284): CHC: Assertion violation happens here.\nCounterexample:\narray = [0, 200]\nx = 0\np = 1\n\nTransaction trace:\nC.constructor()\nState: array = [0, 0]\nC.f(0, 1) +// Warning 6328: (262-284): CHC: Assertion violation happens here.\nCounterexample:\narray = [200, 0]\nx = 0\np = 0\n\nTransaction trace:\nC.constructor()\nState: array = [0, 0]\nC.f(0, 0) diff --git a/test/libsolidity/smtCheckerTests/operators/compound_add_mapping.sol b/test/libsolidity/smtCheckerTests/operators/compound_add_mapping.sol index 70d75cf1c..4169357d1 100644 --- a/test/libsolidity/smtCheckerTests/operators/compound_add_mapping.sol +++ b/test/libsolidity/smtCheckerTests/operators/compound_add_mapping.sol @@ -12,4 +12,4 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (165-185): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\np = 38\n\nTransaction trace:\nC.constructor()\nC.f(0, 38) +// Warning 6328: (165-185): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\np = 0\n\nTransaction trace:\nC.constructor()\nC.f(0, 0) diff --git a/test/libsolidity/smtCheckerTests/operators/compound_mul_mapping.sol b/test/libsolidity/smtCheckerTests/operators/compound_mul_mapping.sol index 8725f6088..42775cc9b 100644 --- a/test/libsolidity/smtCheckerTests/operators/compound_mul_mapping.sol +++ b/test/libsolidity/smtCheckerTests/operators/compound_mul_mapping.sol @@ -12,4 +12,4 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (164-183): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\np = 38\n\nTransaction trace:\nC.constructor()\nC.f(0, 38) +// Warning 6328: (164-183): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\np = 0\n\nTransaction trace:\nC.constructor()\nC.f(0, 0) diff --git a/test/libsolidity/smtCheckerTests/operators/delete_array_push.sol b/test/libsolidity/smtCheckerTests/operators/delete_array_push.sol index 9d6576604..86a3ab5cc 100644 --- a/test/libsolidity/smtCheckerTests/operators/delete_array_push.sol +++ b/test/libsolidity/smtCheckerTests/operators/delete_array_push.sol @@ -15,6 +15,7 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- -// Warning 6328: (143-190): CHC: Assertion violation happens here.\nCounterexample:\narray2d = [[]]\nlength = 0\nlength2 = 0\n\nTransaction trace:\nC.constructor()\nState: array2d = []\nC.s() -// Warning 6328: (363-408): CHC: Assertion violation happens here.\nCounterexample:\narray2d = [[], [0]]\nlength = 2\nlength2 = 1\n\nTransaction trace:\nC.constructor()\nState: array2d = []\nC.s() +// Warning 6328: (143-190): CHC: Assertion violation happens here. +// Warning 6328: (363-408): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/operators/exp.sol b/test/libsolidity/smtCheckerTests/operators/exp.sol index 12b666970..278300f42 100644 --- a/test/libsolidity/smtCheckerTests/operators/exp.sol +++ b/test/libsolidity/smtCheckerTests/operators/exp.sol @@ -8,4 +8,3 @@ contract D { // ---- // Warning 5188: (56-60): Assertion checker does not yet implement this operator. // Warning 6328: (49-66): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\n\nTransaction trace:\nD.constructor()\nD.f(0) -// Warning 5188: (56-60): Assertion checker does not yet implement this operator. diff --git a/test/libsolidity/smtCheckerTests/operators/index_access_for_bytesNN.sol b/test/libsolidity/smtCheckerTests/operators/index_access_for_bytesNN.sol index 0bf80482a..2fee40f40 100644 --- a/test/libsolidity/smtCheckerTests/operators/index_access_for_bytesNN.sol +++ b/test/libsolidity/smtCheckerTests/operators/index_access_for_bytesNN.sol @@ -7,3 +7,4 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 6368: (76-90): CHC: Out of bounds access might happen here. diff --git a/test/libsolidity/smtCheckerTests/operators/index_access_side_effect.sol b/test/libsolidity/smtCheckerTests/operators/index_access_side_effect.sol index cadcabdfe..6de2c9c61 100644 --- a/test/libsolidity/smtCheckerTests/operators/index_access_side_effect.sol +++ b/test/libsolidity/smtCheckerTests/operators/index_access_side_effect.sol @@ -13,7 +13,8 @@ contract C { return a; } function g() public { - h()[2] = 4; + // Disabled because of Spacer nondeterminism. + //h()[2] = 4; assert(h()[2] == 3); } } @@ -21,8 +22,5 @@ contract C { // SMTEngine: all // SMTIgnoreCex: yes // ---- -// Warning 6368: (207-211): CHC: Out of bounds access happens here. -// Warning 6368: (221-225): CHC: Out of bounds access happens here. -// Warning 6368: (271-277): CHC: Out of bounds access happens here. -// Warning 6368: (292-298): CHC: Out of bounds access happens here. -// Warning 6328: (285-304): CHC: Assertion violation happens here. +// Warning 6328: (335-354): CHC: Assertion violation might happen here. +// Warning 4661: (335-354): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/operators/unary_add_overflows_correctly.sol b/test/libsolidity/smtCheckerTests/operators/unary_add_overflows_correctly.sol index 66b37ec12..459d5adb7 100644 --- a/test/libsolidity/smtCheckerTests/operators/unary_add_overflows_correctly.sol +++ b/test/libsolidity/smtCheckerTests/operators/unary_add_overflows_correctly.sol @@ -13,4 +13,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 4984: (61-64): CHC: Overflow (resulting value larger than 255) happens here. +// Warning 4984: (61-64): CHC: Overflow (resulting value larger than 255) happens here.\nCounterexample:\nx = 255\n\nTransaction trace:\nC.constructor()\nState: x = 254\nC.inc_pre()\nState: x = 255\nC.inc_pre() diff --git a/test/libsolidity/smtCheckerTests/operators/unary_add_overflows_correctly_struct.sol b/test/libsolidity/smtCheckerTests/operators/unary_add_overflows_correctly_struct.sol index 55a320edc..ebc23359f 100644 --- a/test/libsolidity/smtCheckerTests/operators/unary_add_overflows_correctly_struct.sol +++ b/test/libsolidity/smtCheckerTests/operators/unary_add_overflows_correctly_struct.sol @@ -21,4 +21,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 4984: (112-117): CHC: Overflow (resulting value larger than 255) happens here. +// Warning 4984: (112-117): CHC: Overflow (resulting value larger than 255) happens here.\nCounterexample:\ns = {x: 255}\n\nTransaction trace:\nC.constructor()\nState: s = {x: 254}\nC.inc_pre()\nState: s = {x: 255}\nC.inc_pre() diff --git a/test/libsolidity/smtCheckerTests/out_of_bounds/array_1.sol b/test/libsolidity/smtCheckerTests/out_of_bounds/array_1.sol index 230a9a117..8997abbe6 100644 --- a/test/libsolidity/smtCheckerTests/out_of_bounds/array_1.sol +++ b/test/libsolidity/smtCheckerTests/out_of_bounds/array_1.sol @@ -20,7 +20,5 @@ contract C { // SMTEngine: all // ---- // Warning 4984: (112-115): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here. -// Warning 3944: (181-184): CHC: Underflow (resulting value less than 0) might happen here. -// Warning 6368: (259-263): CHC: Out of bounds access happens here. +// Warning 6368: (259-263): CHC: Out of bounds access happens here.\nCounterexample:\na = [0], l = 1\n = 0\n\nTransaction trace:\nC.constructor()\nState: a = [], l = 0\nC.p()\nState: a = [0], l = 1\nC.r() // Warning 2661: (112-115): BMC: Overflow (resulting value larger than 2**256 - 1) happens here. -// Warning 4144: (181-184): BMC: Underflow (resulting value less than 0) happens here. diff --git a/test/libsolidity/smtCheckerTests/out_of_bounds/array_2d_4.sol b/test/libsolidity/smtCheckerTests/out_of_bounds/array_2d_4.sol index 7bfc6d7a9..ee3cdfd24 100644 --- a/test/libsolidity/smtCheckerTests/out_of_bounds/array_2d_4.sol +++ b/test/libsolidity/smtCheckerTests/out_of_bounds/array_2d_4.sol @@ -14,10 +14,15 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 1218: (228-232): CHC: Error trying to invoke SMT solver. +// Warning 1218: (255-259): CHC: Error trying to invoke SMT solver. +// Warning 1218: (255-262): CHC: Error trying to invoke SMT solver. // Warning 4984: (184-197): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here. -// Warning 6368: (228-232): CHC: Out of bounds access happens here.\nCounterexample:\na = []\ni = 0\nj = 0\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.r() +// Warning 4984: (199-202): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here. +// Warning 6368: (228-232): CHC: Out of bounds access might happen here. // Warning 4984: (228-244): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here. -// Warning 6368: (255-259): CHC: Out of bounds access happens here.\nCounterexample:\na = []\ni = 0\nj = 0\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.r() -// Warning 6368: (255-262): CHC: Out of bounds access happens here.\nCounterexample:\na = []\ni = 0\nj = 0\n\nTransaction trace:\nC.constructor()\nState: a = []\nC.r() +// Warning 4984: (246-249): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here. +// Warning 6368: (255-259): CHC: Out of bounds access might happen here. +// Warning 6368: (255-262): CHC: Out of bounds access might happen here. // Warning 2661: (184-197): BMC: Overflow (resulting value larger than 2**256 - 1) happens here. // Warning 2661: (228-244): BMC: Overflow (resulting value larger than 2**256 - 1) happens here. diff --git a/test/libsolidity/smtCheckerTests/out_of_bounds/fixed_bytes_4.sol b/test/libsolidity/smtCheckerTests/out_of_bounds/fixed_bytes_4.sol index 61df18bd7..83e68b480 100644 --- a/test/libsolidity/smtCheckerTests/out_of_bounds/fixed_bytes_4.sol +++ b/test/libsolidity/smtCheckerTests/out_of_bounds/fixed_bytes_4.sol @@ -1,10 +1,11 @@ contract C { function r(bytes32 x, uint y) public pure { x[0]; // safe access - x[y]; // oob access + // Disabled because of Spacer nondeterminism. + //x[y]; // oob access } } // ==== // SMTEngine: all // ---- -// Warning 6368: (83-87): CHC: Out of bounds access happens here. +// Warning 5667: (36-42): Unused function parameter. Remove or comment out the variable name to silence this warning. diff --git a/test/libsolidity/smtCheckerTests/overflow/signed_guard_sub_overflow.sol b/test/libsolidity/smtCheckerTests/overflow/signed_guard_sub_overflow.sol index 9519a74e9..afaeb5448 100644 --- a/test/libsolidity/smtCheckerTests/overflow/signed_guard_sub_overflow.sol +++ b/test/libsolidity/smtCheckerTests/overflow/signed_guard_sub_overflow.sol @@ -7,4 +7,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 4984: (96-101): CHC: Overflow (resulting value larger than 0x80 * 2**248 - 1) happens here.\nCounterexample:\n\nx = 57896044618658097711785492504343953926634992332820282019728792003956564819967\ny = (- 1)\n = 0\n\nTransaction trace:\nC.constructor()\nC.f(57896044618658097711785492504343953926634992332820282019728792003956564819967, (- 1)) +// Warning 4984: (96-101): CHC: Overflow (resulting value larger than 0x80 * 2**248 - 1) happens here.\nCounterexample:\n\nx = 0\ny = (- 57896044618658097711785492504343953926634992332820282019728792003956564819968)\n = 0\n\nTransaction trace:\nC.constructor()\nC.f(0, (- 57896044618658097711785492504343953926634992332820282019728792003956564819968)) diff --git a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol index 17b8a9226..a2d864b52 100644 --- a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol +++ b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol @@ -12,6 +12,3 @@ contract C { // Warning 8364: (183-189): Assertion checker does not yet implement type type(uint256[] memory) // Warning 8364: (183-192): Assertion checker does not yet implement type type(uint256[] memory[2] memory) // Warning 8364: (173-174): Assertion checker does not yet implement type type(struct C.S storage pointer) -// Warning 8364: (183-189): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (183-192): Assertion checker does not yet implement type type(uint256[] memory[2] memory) -// Warning 8364: (173-174): Assertion checker does not yet implement type type(struct C.S storage pointer) diff --git a/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol b/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol index 17e3b30d8..641b59440 100644 --- a/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol +++ b/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol @@ -15,6 +15,4 @@ contract C { // Warning 2072: (152-156): Unused local variable. // Warning 8364: (123-124): Assertion checker does not yet implement type type(contract C) // Warning 8364: (193-194): Assertion checker does not yet implement type type(contract C) -// Warning 6328: (220-236): CHC: Assertion violation happens here.\nCounterexample:\n\ndata = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 13, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]\na1 = 7719\nb1 = 5\nc1 = 6\na2 = 7719\nb2 = 5\nc2 = 6\n\nTransaction trace:\nC.constructor()\nC.f([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 13, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) -// Warning 8364: (123-124): Assertion checker does not yet implement type type(contract C) -// Warning 8364: (193-194): Assertion checker does not yet implement type type(contract C) +// Warning 6328: (220-236): CHC: Assertion violation happens here.\nCounterexample:\n\na1 = 2437\nb1 = 10\nc1 = 9\na2 = 2437\nb2 = 10\nc2 = 9\n\nTransaction trace:\nC.constructor()\nC.f(data) diff --git a/test/libsolidity/smtCheckerTests/special/event.sol b/test/libsolidity/smtCheckerTests/special/event.sol index a0a6d566b..2788eeecd 100644 --- a/test/libsolidity/smtCheckerTests/special/event.sol +++ b/test/libsolidity/smtCheckerTests/special/event.sol @@ -27,4 +27,4 @@ contract C { // ---- // Warning 6321: (247-251): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable. // Warning 6321: (397-401): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable. -// Warning 6328: (407-416): CHC: Assertion violation happens here.\nCounterexample:\nx = false\n\nTransaction trace:\nC.constructor()\nState: x = true\nC.h()\n C.h_data() -- internal call +// Warning 6328: (407-416): CHC: Assertion violation happens here.\nCounterexample:\nx = false\n\nTransaction trace:\nC.constructor()\nState: x = true\nC.h()\n C.h_data() -- internal call\n C.h_data() -- internal call diff --git a/test/libsolidity/smtCheckerTests/special/msg_value_4.sol b/test/libsolidity/smtCheckerTests/special/msg_value_4.sol index c32c36bb5..f9bfb0173 100644 --- a/test/libsolidity/smtCheckerTests/special/msg_value_4.sol +++ b/test/libsolidity/smtCheckerTests/special/msg_value_4.sol @@ -13,4 +13,4 @@ contract B { // ==== // SMTEngine: all // ---- -// Warning 6328: (154-176): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nB.constructor(){ value: 1 } +// Warning 6328: (154-176): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nB.constructor(){ value: 39 } diff --git a/test/libsolidity/smtCheckerTests/try_catch/try_4.sol b/test/libsolidity/smtCheckerTests/try_catch/try_4.sol index 9c9d0aa27..6988906a2 100644 --- a/test/libsolidity/smtCheckerTests/try_catch/try_4.sol +++ b/test/libsolidity/smtCheckerTests/try_catch/try_4.sol @@ -25,5 +25,7 @@ contract C { // SMTEngine: all // SMTIgnoreCex: yes // ---- -// Warning 6328: (178-192): CHC: Assertion violation happens here. +// Warning 1218: (178-192): CHC: Error trying to invoke SMT solver. +// Warning 6328: (178-192): CHC: Assertion violation might happen here. // Warning 6328: (318-332): CHC: Assertion violation happens here. +// Warning 4661: (178-192): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/try_catch/try_nested_3.sol b/test/libsolidity/smtCheckerTests/try_catch/try_nested_3.sol index bd81c5bc2..bbb65a236 100644 --- a/test/libsolidity/smtCheckerTests/try_catch/try_nested_3.sol +++ b/test/libsolidity/smtCheckerTests/try_catch/try_nested_3.sol @@ -20,4 +20,4 @@ contract C { // ==== // SMTEngine: all // ---- -// Warning 6328: (323-343): CHC: Assertion violation happens here.\nCounterexample:\n\nchoice = 3\n\nTransaction trace:\nC.constructor()\nC.f() +// Warning 6328: (323-343): CHC: Assertion violation happens here.\nCounterexample:\n\nchoice = 1\n\nTransaction trace:\nC.constructor()\nC.f()\n C.g() -- trusted external call diff --git a/test/libsolidity/smtCheckerTests/try_catch/try_new.sol b/test/libsolidity/smtCheckerTests/try_catch/try_new.sol index f20342e71..e7075e076 100644 --- a/test/libsolidity/smtCheckerTests/try_catch/try_new.sol +++ b/test/libsolidity/smtCheckerTests/try_catch/try_new.sol @@ -30,5 +30,3 @@ contract C { // ---- // Warning 4588: (231-245): Assertion checker does not yet implement this type of function call. // Warning 4588: (492-507): Assertion checker does not yet implement this type of function call. -// Warning 4588: (231-245): Assertion checker does not yet implement this type of function call. -// Warning 4588: (492-507): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/typecast/function_type_to_function_type_internal.sol b/test/libsolidity/smtCheckerTests/typecast/function_type_to_function_type_internal.sol index 2234bd831..6596c6f59 100644 --- a/test/libsolidity/smtCheckerTests/typecast/function_type_to_function_type_internal.sol +++ b/test/libsolidity/smtCheckerTests/typecast/function_type_to_function_type_internal.sol @@ -20,7 +20,3 @@ contract C { // Warning 6328: (199-213): CHC: Assertion violation happens here.\nCounterexample:\na = 0, b = 0\n\nTransaction trace:\nC.constructor()\nState: a = 0, b = 0\nC.g()\n C.f(0, 0) -- internal call // Warning 5729: (182-186): BMC does not yet implement this type of function call. // Warning 5729: (190-194): BMC does not yet implement this type of function call. -// Warning 7229: (206-212): Assertion checker does not yet implement the type function (uint256) returns (uint256) for comparisons -// Warning 5729: (182-186): BMC does not yet implement this type of function call. -// Warning 5729: (190-194): BMC does not yet implement this type of function call. -// Warning 7229: (206-212): Assertion checker does not yet implement the type function (uint256) returns (uint256) for comparisons diff --git a/test/libsolidity/smtCheckerTests/typecast/string_to_bytes_push_2.sol b/test/libsolidity/smtCheckerTests/typecast/string_to_bytes_push_2.sol index 6cf53ec7d..b3092f04c 100644 --- a/test/libsolidity/smtCheckerTests/typecast/string_to_bytes_push_2.sol +++ b/test/libsolidity/smtCheckerTests/typecast/string_to_bytes_push_2.sol @@ -10,5 +10,6 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- -// Warning 6328: (140-168): CHC: Assertion violation happens here.\nCounterexample:\nx = [97, 98, 99, 97]\n\nTransaction trace:\nC.constructor()\nState: x = []\nC.s() +// Warning 6328: (140-168): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/types/address_balance.sol b/test/libsolidity/smtCheckerTests/types/address_balance.sol index c9937caac..a24fa32b1 100644 --- a/test/libsolidity/smtCheckerTests/types/address_balance.sol +++ b/test/libsolidity/smtCheckerTests/types/address_balance.sol @@ -7,7 +7,8 @@ contract C } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- // Warning 2072: (63-69): Unused local variable. -// Warning 4984: (72-94): CHC: Overflow (resulting value larger than 2**256 - 1) happens here.\nCounterexample:\n\na = 0\nb = 38\nx = 0\n\nTransaction trace:\nC.constructor()\nC.f(0, 38) -// Warning 6328: (98-127): CHC: Assertion violation happens here.\nCounterexample:\n\na = 21238\nb = 7719\nx = 1000000000000000000038\n\nTransaction trace:\nC.constructor()\nC.f(21238, 7719) +// Warning 4984: (72-94): CHC: Overflow (resulting value larger than 2**256 - 1) happens here. +// Warning 6328: (98-127): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/types/address_call.sol b/test/libsolidity/smtCheckerTests/types/address_call.sol index 021c970a5..568ab91e1 100644 --- a/test/libsolidity/smtCheckerTests/types/address_call.sol +++ b/test/libsolidity/smtCheckerTests/types/address_call.sol @@ -9,8 +9,10 @@ contract C (bool success, bytes memory ret) = a.call(data); assert(success); assert(x == 0); - assert(map[0] == 0); - assert(localMap[0] == 0); + // Disabled because of Spacer nondeterminism. + //assert(map[0] == 0); + // Disabled because of Spacer nondeterminism. + //assert(localMap[0] == 0); } } // ==== @@ -18,5 +20,6 @@ contract C // SMTEngine: all // SMTIgnoreCex: yes // ---- +// Warning 2072: (127-166): Unused local variable. // Warning 2072: (191-207): Unused local variable. // Warning 6328: (227-242): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/types/address_delegatecall.sol b/test/libsolidity/smtCheckerTests/types/address_delegatecall.sol index f0324bc68..b4d707cf3 100644 --- a/test/libsolidity/smtCheckerTests/types/address_delegatecall.sol +++ b/test/libsolidity/smtCheckerTests/types/address_delegatecall.sol @@ -24,4 +24,3 @@ contract C // Warning 6328: (254-268): CHC: Assertion violation happens here. // Warning 6328: (272-291): CHC: Assertion violation happens here. // Warning 6328: (295-319): CHC: Assertion violation happens here. -// Warning 4588: (211-231): Assertion checker does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/types/address_transfer.sol b/test/libsolidity/smtCheckerTests/types/address_transfer.sol index d46557488..1715a8773 100644 --- a/test/libsolidity/smtCheckerTests/types/address_transfer.sol +++ b/test/libsolidity/smtCheckerTests/types/address_transfer.sol @@ -11,5 +11,5 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (162-186): CHC: Assertion violation happens here.\nCounterexample:\n\na = 38\nx = 100\n\nTransaction trace:\nC.constructor()\nC.f(38) +// Warning 6328: (162-186): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0\nx = 100\n\nTransaction trace:\nC.constructor()\nC.f(0) // Warning 1236: (98-113): BMC: Insufficient funds happens here. diff --git a/test/libsolidity/smtCheckerTests/types/address_transfer_3.sol b/test/libsolidity/smtCheckerTests/types/address_transfer_3.sol new file mode 100644 index 000000000..928ac1e8e --- /dev/null +++ b/test/libsolidity/smtCheckerTests/types/address_transfer_3.sol @@ -0,0 +1,15 @@ +contract C +{ + function f(address payable a) public { + require(1000 == address(this).balance); + require(100 == a.balance); + a.transfer(600); + // a == this is not possible because address(this).balance == 1000 + // and a.balance == 100, + // so this should hold in CHC, ignoring the transfer revert. + assert(a.balance == 700); + } +} +// ==== +// SMTEngine: all +// ---- diff --git a/test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol b/test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol index 936f8cd29..3cfaabb23 100644 --- a/test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol +++ b/test/libsolidity/smtCheckerTests/types/address_transfer_insufficient.sol @@ -11,6 +11,6 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (180-204): CHC: Assertion violation happens here.\nCounterexample:\n\na = 7719\nb = 7719\n\nTransaction trace:\nC.constructor()\nC.f(7719, 7719) +// Warning 6328: (180-204): CHC: Assertion violation happens here.\nCounterexample:\n\na = 8855\nb = 8855\n\nTransaction trace:\nC.constructor()\nC.f(8855, 8855) // Warning 1236: (101-116): BMC: Insufficient funds happens here. // Warning 1236: (120-136): BMC: Insufficient funds happens here. diff --git a/test/libsolidity/smtCheckerTests/types/array_aliasing_storage_3.sol b/test/libsolidity/smtCheckerTests/types/array_aliasing_storage_3.sol index f74fad8af..830d756b7 100644 --- a/test/libsolidity/smtCheckerTests/types/array_aliasing_storage_3.sol +++ b/test/libsolidity/smtCheckerTests/types/array_aliasing_storage_3.sol @@ -35,7 +35,11 @@ contract C // SMTIgnoreCex: yes // ---- // Warning 2072: (384-399): Unused local variable. +// Warning 1218: (955-959): CHC: Error trying to invoke SMT solver. +// Warning 1218: (948-965): CHC: Error trying to invoke SMT solver. +// Warning 1218: (976-980): CHC: Error trying to invoke SMT solver. // Warning 6368: (489-493): CHC: Out of bounds access happens here. -// Warning 6368: (955-959): CHC: Out of bounds access happens here. -// Warning 6328: (948-965): CHC: Assertion violation happens here. -// Warning 6368: (976-980): CHC: Out of bounds access happens here. +// Warning 6368: (955-959): CHC: Out of bounds access might happen here. +// Warning 6328: (948-965): CHC: Assertion violation might happen here. +// Warning 6368: (976-980): CHC: Out of bounds access might happen here. +// Warning 4661: (948-965): BMC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/types/array_aliasing_storage_5.sol b/test/libsolidity/smtCheckerTests/types/array_aliasing_storage_5.sol index 2fb091c64..ca692a0e8 100644 --- a/test/libsolidity/smtCheckerTests/types/array_aliasing_storage_5.sol +++ b/test/libsolidity/smtCheckerTests/types/array_aliasing_storage_5.sol @@ -8,7 +8,8 @@ contract C } function g(uint x, uint[] memory c) public { require(x < array2d.length); - f(array2d[0], c); + // Disabled because of Spacer nondeterminism. + //f(array2d[0], c); } function f(uint[] storage a, uint[] memory c) internal { // Accesses are safe but oob is reported because of aliasing. @@ -33,11 +34,5 @@ contract C // SMTEngine: all // SMTIgnoreCex: yes // ---- -// Warning 6368: (329-333): CHC: Out of bounds access happens here. -// Warning 6368: (342-346): CHC: Out of bounds access happens here. -// Warning 6368: (355-359): CHC: Out of bounds access happens here. -// Warning 6368: (367-371): CHC: Out of bounds access happens here. -// Warning 6368: (490-494): CHC: Out of bounds access happens here. -// Warning 6368: (692-696): CHC: Out of bounds access happens here. -// Warning 6328: (685-702): CHC: Assertion violation happens here. -// Warning 6368: (796-800): CHC: Out of bounds access happens here. +// Warning 5667: (125-140): Unused function parameter. Remove or comment out the variable name to silence this warning. +// Warning 2018: (106-254): Function state mutability can be restricted to view diff --git a/test/libsolidity/smtCheckerTests/types/array_dynamic_2.sol b/test/libsolidity/smtCheckerTests/types/array_dynamic_2.sol index 87ef3abcb..de8cc2066 100644 --- a/test/libsolidity/smtCheckerTests/types/array_dynamic_2.sol +++ b/test/libsolidity/smtCheckerTests/types/array_dynamic_2.sol @@ -11,4 +11,4 @@ contract C // SMTEngine: all // ---- // Warning 6368: (98-106): CHC: Out of bounds access happens here.\nCounterexample:\narray = []\nx = 0\ny = 0\nz = 0\nt = 0\n\nTransaction trace:\nC.constructor()\nState: array = []\nC.f(0, 0, 0, 0) -// Warning 6368: (98-109): CHC: Out of bounds access happens here.\nCounterexample:\narray = []\nx = 38\ny = 0\nz = 0\nt = 0\n\nTransaction trace:\nC.constructor()\nState: array = []\nC.f(38, 0, 0, 0) +// Warning 6368: (98-109): CHC: Out of bounds access happens here.\nCounterexample:\narray = []\nx = 0\ny = 0\nz = 0\nt = 0\n\nTransaction trace:\nC.constructor()\nState: array = []\nC.f(0, 0, 0, 0) diff --git a/test/libsolidity/smtCheckerTests/types/array_static_1_fail.sol b/test/libsolidity/smtCheckerTests/types/array_static_1_fail.sol index 21ad979b0..616c19c21 100644 --- a/test/libsolidity/smtCheckerTests/types/array_static_1_fail.sol +++ b/test/libsolidity/smtCheckerTests/types/array_static_1_fail.sol @@ -11,4 +11,4 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (135-157): CHC: Assertion violation happens here.\nCounterexample:\narray = [0, 0, 0, 0, 0, 0, 0, 0, 0, 200]\nx = 9\ny = 9\n\nTransaction trace:\nC.constructor()\nState: array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\nC.f(9, 9) +// Warning 6328: (135-157): CHC: Assertion violation happens here.\nCounterexample:\narray = [200, 0, 0, 0, 0, 0, 0, 0, 0, 0]\nx = 0\ny = 0\n\nTransaction trace:\nC.constructor()\nState: array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\nC.f(0, 0) diff --git a/test/libsolidity/smtCheckerTests/types/array_static_2_fail.sol b/test/libsolidity/smtCheckerTests/types/array_static_2_fail.sol index 9c713eb25..c48f45e11 100644 --- a/test/libsolidity/smtCheckerTests/types/array_static_2_fail.sol +++ b/test/libsolidity/smtCheckerTests/types/array_static_2_fail.sol @@ -12,4 +12,4 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (214-239): CHC: Assertion violation happens here.\nCounterexample:\narray = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]\nx = 19\ny = 8\nz = 19\nt = 8\n\nTransaction trace:\nC.constructor()\nState: array = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]\nC.f(19, 8, 19, 8) +// Warning 6328: (214-239): CHC: Assertion violation happens here.\nCounterexample:\narray = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]\nx = 0\ny = 0\nz = 0\nt = 0\n\nTransaction trace:\nC.constructor()\nState: array = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]\nC.f(0, 0, 0, 0) diff --git a/test/libsolidity/smtCheckerTests/types/array_static_3_fail.sol b/test/libsolidity/smtCheckerTests/types/array_static_3_fail.sol index 8737cec63..c7773a9b4 100644 --- a/test/libsolidity/smtCheckerTests/types/array_static_3_fail.sol +++ b/test/libsolidity/smtCheckerTests/types/array_static_3_fail.sol @@ -13,4 +13,4 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (268-296): CHC: Assertion violation happens here.\nCounterexample:\narray = [[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0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 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 200], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]]\nx = 29\ny = 17\nz = 9\nt = 29\nw = 17\nv = 9\n\nTransaction trace:\nC.constructor()\nState: array = [[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0,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0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]]\nC.f(29, 17, 9, 29, 17, 9) +// Warning 6328: (268-296): CHC: Assertion violation happens here.\nCounterexample:\narray = [[[200, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]]\nC.f(0, 0, 0, 0, 0, 0) diff --git a/test/libsolidity/smtCheckerTests/types/array_static_aliasing_memory_5.sol b/test/libsolidity/smtCheckerTests/types/array_static_aliasing_memory_5.sol index 15b7aed31..eb7ae6a35 100644 --- a/test/libsolidity/smtCheckerTests/types/array_static_aliasing_memory_5.sol +++ b/test/libsolidity/smtCheckerTests/types/array_static_aliasing_memory_5.sol @@ -1,9 +1,6 @@ contract C { function f(uint[2] memory a, uint[2] memory b, uint[2] memory c) public pure { - require(a.length > 0); - require(b.length > 0); - require(c.length > 0); require(c[0] == 42); require(a[0] == 2); b[0] = 1; @@ -19,5 +16,4 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6368: (467-471): CHC: Out of bounds access happens here. -// Warning 6328: (460-477): CHC: Assertion violation happens here. +// Warning 6328: (385-402): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/types/array_static_aliasing_storage_5.sol b/test/libsolidity/smtCheckerTests/types/array_static_aliasing_storage_5.sol index 8841942d7..4592e9526 100644 --- a/test/libsolidity/smtCheckerTests/types/array_static_aliasing_storage_5.sol +++ b/test/libsolidity/smtCheckerTests/types/array_static_aliasing_storage_5.sol @@ -24,8 +24,3 @@ contract C // SMTEngine: all // SMTIgnoreCex: yes // ---- -// Warning 6368: (165-169): CHC: Out of bounds access happens here. -// Warning 6368: (178-182): CHC: Out of bounds access happens here. -// Warning 6368: (190-195): CHC: Out of bounds access happens here. -// Warning 6368: (314-318): CHC: Out of bounds access happens here. -// Warning 6368: (440-445): CHC: Out of bounds access happens here. diff --git a/test/libsolidity/smtCheckerTests/types/array_static_mapping_aliasing_1.sol b/test/libsolidity/smtCheckerTests/types/array_static_mapping_aliasing_1.sol index 61b7a80f2..cde229e4f 100644 --- a/test/libsolidity/smtCheckerTests/types/array_static_mapping_aliasing_1.sol +++ b/test/libsolidity/smtCheckerTests/types/array_static_mapping_aliasing_1.sol @@ -27,7 +27,4 @@ contract C // SMTEngine: all // SMTIgnoreCex: yes // ---- -// Warning 6368: (353-369): CHC: Out of bounds access happens here. -// Warning 6368: (353-372): CHC: Out of bounds access happens here. -// Warning 6368: (463-477): CHC: Out of bounds access happens here. // Warning 6328: (456-487): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/types/array_static_mapping_aliasing_2.sol b/test/libsolidity/smtCheckerTests/types/array_static_mapping_aliasing_2.sol index 1c9b9e23b..8ebd7025d 100644 --- a/test/libsolidity/smtCheckerTests/types/array_static_mapping_aliasing_2.sol +++ b/test/libsolidity/smtCheckerTests/types/array_static_mapping_aliasing_2.sol @@ -30,10 +30,6 @@ contract C // SMTEngine: all // SMTIgnoreCex: yes // ---- -// Warning 6368: (314-328): CHC: Out of bounds access happens here. -// Warning 6368: (367-383): CHC: Out of bounds access happens here. -// Warning 6368: (367-386): CHC: Out of bounds access happens here. -// Warning 6368: (497-511): CHC: Out of bounds access happens here. // Warning 6328: (860-880): CHC: Assertion violation happens here. // Warning 6368: (936-952): CHC: Out of bounds access might happen here. // Warning 6368: (936-955): CHC: Out of bounds access might happen here. diff --git a/test/libsolidity/smtCheckerTests/types/function_type_call.sol b/test/libsolidity/smtCheckerTests/types/function_type_call.sol index b4ecead76..2d0bd0757 100644 --- a/test/libsolidity/smtCheckerTests/types/function_type_call.sol +++ b/test/libsolidity/smtCheckerTests/types/function_type_call.sol @@ -11,4 +11,3 @@ contract C { // SMTEngine: all // ---- // Warning 5729: (89-93): BMC does not yet implement this type of function call. -// Warning 5729: (89-93): BMC does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/types/function_type_external_address.sol b/test/libsolidity/smtCheckerTests/types/function_type_external_address.sol index cb16bebb6..b48e53826 100644 --- a/test/libsolidity/smtCheckerTests/types/function_type_external_address.sol +++ b/test/libsolidity/smtCheckerTests/types/function_type_external_address.sol @@ -8,4 +8,3 @@ contract C { // SMTEngine: all // ---- // Warning 7650: (96-105): Assertion checker does not yet support this expression. -// Warning 7650: (96-105): Assertion checker does not yet support this expression. diff --git a/test/libsolidity/smtCheckerTests/types/function_type_members.sol b/test/libsolidity/smtCheckerTests/types/function_type_members.sol index 3eb2b9814..16a57b852 100644 --- a/test/libsolidity/smtCheckerTests/types/function_type_members.sol +++ b/test/libsolidity/smtCheckerTests/types/function_type_members.sol @@ -8,4 +8,3 @@ contract C { // SMTEngine: all // ---- // Warning 7650: (76-86): Assertion checker does not yet support this expression. -// Warning 7650: (76-86): Assertion checker does not yet support this expression. diff --git a/test/libsolidity/smtCheckerTests/types/function_type_nested.sol b/test/libsolidity/smtCheckerTests/types/function_type_nested.sol index 7791b30c1..00eaf74f7 100644 --- a/test/libsolidity/smtCheckerTests/types/function_type_nested.sol +++ b/test/libsolidity/smtCheckerTests/types/function_type_nested.sol @@ -18,8 +18,4 @@ contract C { // Warning 6031: (223-225): Internal error: Expression undefined for SMT solver. // Warning 8364: (223-225): Assertion checker does not yet implement type function (function (uint256)) // Warning 5729: (91-96): BMC does not yet implement this type of function call. -// Warning 8364: (180-182): Assertion checker does not yet implement type function (function (uint256)) -// Warning 5729: (180-187): BMC does not yet implement this type of function call. -// Warning 6031: (223-225): Internal error: Expression undefined for SMT solver. -// Warning 8364: (223-225): Assertion checker does not yet implement type function (function (uint256)) // Warning 5729: (180-187): BMC does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/types/function_type_nested_return.sol b/test/libsolidity/smtCheckerTests/types/function_type_nested_return.sol index 2259744be..66564e618 100644 --- a/test/libsolidity/smtCheckerTests/types/function_type_nested_return.sol +++ b/test/libsolidity/smtCheckerTests/types/function_type_nested_return.sol @@ -22,9 +22,4 @@ contract C { // Warning 6031: (295-297): Internal error: Expression undefined for SMT solver. // Warning 8364: (295-297): Assertion checker does not yet implement type function (function (uint256)) // Warning 5729: (163-168): BMC does not yet implement this type of function call. -// Warning 8364: (252-254): Assertion checker does not yet implement type function (function (uint256)) -// Warning 1695: (255-256): Assertion checker does not yet support this global variable. -// Warning 5729: (252-259): BMC does not yet implement this type of function call. -// Warning 6031: (295-297): Internal error: Expression undefined for SMT solver. -// Warning 8364: (295-297): Assertion checker does not yet implement type function (function (uint256)) // Warning 5729: (252-259): BMC does not yet implement this type of function call. diff --git a/test/libsolidity/smtCheckerTests/types/mapping_5.sol b/test/libsolidity/smtCheckerTests/types/mapping_5.sol index c22947780..04bec4948 100644 --- a/test/libsolidity/smtCheckerTests/types/mapping_5.sol +++ b/test/libsolidity/smtCheckerTests/types/mapping_5.sol @@ -8,4 +8,4 @@ contract C // ==== // SMTEngine: all // ---- -// Warning 6328: (92-111): CHC: Assertion violation happens here.\nCounterexample:\n\na = 38\nx = 0\n\nTransaction trace:\nC.constructor()\nC.f(38, 0) +// Warning 6328: (92-111): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0\nx = 0\n\nTransaction trace:\nC.constructor()\nC.f(0, 0) diff --git a/test/libsolidity/smtCheckerTests/types/mapping_as_local_var_1.sol b/test/libsolidity/smtCheckerTests/types/mapping_as_local_var_1.sol index f14978b83..c9d1e75d7 100644 --- a/test/libsolidity/smtCheckerTests/types/mapping_as_local_var_1.sol +++ b/test/libsolidity/smtCheckerTests/types/mapping_as_local_var_1.sol @@ -15,6 +15,7 @@ contract c { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- -// Warning 6328: (255-291): CHC: Assertion violation happens here.\nCounterexample:\n\ncond = true\n\nTransaction trace:\nc.constructor()\nc.f(true) -// Warning 6328: (303-339): CHC: Assertion violation happens here.\nCounterexample:\n\ncond = false\n\nTransaction trace:\nc.constructor()\nc.f(false) +// Warning 6328: (255-291): CHC: Assertion violation happens here. +// Warning 6328: (303-339): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/types/no_effect_statements.sol b/test/libsolidity/smtCheckerTests/types/no_effect_statements.sol index bc7cadee0..56864e315 100644 --- a/test/libsolidity/smtCheckerTests/types/no_effect_statements.sol +++ b/test/libsolidity/smtCheckerTests/types/no_effect_statements.sol @@ -19,5 +19,3 @@ contract test { // Warning 6133: (129-136): Statement has no effect. // Warning 8364: (113-117): Assertion checker does not yet implement type type(struct test.s memory[7] memory) // Warning 8364: (129-136): Assertion checker does not yet implement type type(uint256[7] memory) -// Warning 8364: (113-117): Assertion checker does not yet implement type type(struct test.s memory[7] memory) -// Warning 8364: (129-136): Assertion checker does not yet implement type type(uint256[7] memory) diff --git a/test/libsolidity/smtCheckerTests/types/static_array_length_1.sol b/test/libsolidity/smtCheckerTests/types/static_array_length_1.sol new file mode 100644 index 000000000..dd7b8abd5 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/types/static_array_length_1.sol @@ -0,0 +1,12 @@ +contract C { + function f(address[2] memory a) public pure { + assert(a.length == 2); // should hold + assert(a.length < 2); // should fail + assert(a.length > 2); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (102-122): CHC: Assertion violation happens here.\nCounterexample:\n\na = [9, 9]\n\nTransaction trace:\nC.constructor()\nC.f([9, 9]) +// Warning 6328: (141-161): CHC: Assertion violation happens here.\nCounterexample:\n\na = [9, 9]\n\nTransaction trace:\nC.constructor()\nC.f([9, 9]) diff --git a/test/libsolidity/smtCheckerTests/types/static_array_length_2.sol b/test/libsolidity/smtCheckerTests/types/static_array_length_2.sol new file mode 100644 index 000000000..11ba621d2 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/types/static_array_length_2.sol @@ -0,0 +1,12 @@ +contract C { + function f() public pure returns (address[2] memory a) { + assert(a.length == 2); // should hold + assert(a.length < 2); // should fail + assert(a.length > 2); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (113-133): CHC: Assertion violation happens here.\nCounterexample:\n\na = [0, 0]\n\nTransaction trace:\nC.constructor()\nC.f() +// Warning 6328: (152-172): CHC: Assertion violation happens here.\nCounterexample:\n\na = [0, 0]\n\nTransaction trace:\nC.constructor()\nC.f() diff --git a/test/libsolidity/smtCheckerTests/types/static_array_length_3.sol b/test/libsolidity/smtCheckerTests/types/static_array_length_3.sol new file mode 100644 index 000000000..b5f47414c --- /dev/null +++ b/test/libsolidity/smtCheckerTests/types/static_array_length_3.sol @@ -0,0 +1,13 @@ +contract C { + function f() public pure { + address[2] memory a; + assert(a.length == 2); // should hold + assert(a.length < 2); // should fail + assert(a.length > 2); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (106-126): CHC: Assertion violation happens here.\nCounterexample:\n\na = [0, 0]\n\nTransaction trace:\nC.constructor()\nC.f() +// Warning 6328: (145-165): CHC: Assertion violation happens here.\nCounterexample:\n\na = [0, 0]\n\nTransaction trace:\nC.constructor()\nC.f() diff --git a/test/libsolidity/smtCheckerTests/types/static_array_length_4.sol b/test/libsolidity/smtCheckerTests/types/static_array_length_4.sol new file mode 100644 index 000000000..13efd8bb9 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/types/static_array_length_4.sol @@ -0,0 +1,23 @@ +contract C { + uint[2] a; + uint x = f(); + constructor() { + assert(a.length == 2); // should hold + assert(x == 2); // should hold + assert(a.length < 2); // should fail + assert(a.length > 2); // should fail + } + function f() internal view returns (uint) { + assert(a.length == 2); // should hold + assert(a.length < 2); // should fail + assert(a.length > 2); // should fail + return a.length; + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (132-152): CHC: Assertion violation happens here.\nCounterexample:\na = [0, 0], x = 2\n\nTransaction trace:\nC.constructor() +// Warning 6328: (171-191): CHC: Assertion violation happens here.\nCounterexample:\na = [0, 0], x = 2\n\nTransaction trace:\nC.constructor() +// Warning 6328: (298-318): CHC: Assertion violation happens here.\nCounterexample:\na = [0, 0], x = 0\n\nTransaction trace:\nC.constructor() +// Warning 6328: (337-357): CHC: Assertion violation happens here.\nCounterexample:\na = [0, 0], x = 0\n\nTransaction trace:\nC.constructor() diff --git a/test/libsolidity/smtCheckerTests/types/static_array_length_5.sol b/test/libsolidity/smtCheckerTests/types/static_array_length_5.sol new file mode 100644 index 000000000..f632f3bc8 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/types/static_array_length_5.sol @@ -0,0 +1,13 @@ +contract C { + uint[2] a; + function f() public view { + assert(a.length == 2); // should hold + assert(a.length < 2); // should fail + assert(a.length > 2); // should fail + } +} +// ==== +// SMTEngine: all +// ---- +// Warning 6328: (95-115): CHC: Assertion violation happens here.\nCounterexample:\na = [0, 0]\n\nTransaction trace:\nC.constructor()\nState: a = [0, 0]\nC.f() +// Warning 6328: (134-154): CHC: Assertion violation happens here.\nCounterexample:\na = [0, 0]\n\nTransaction trace:\nC.constructor()\nState: a = [0, 0]\nC.f() diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_constructor_recursive_1.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_constructor_recursive_1.sol index 236c89740..71e29bd9e 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_constructor_recursive_1.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_constructor_recursive_1.sol @@ -11,4 +11,3 @@ contract Test { // ---- // Warning 2072: (104-133): Unused local variable. // Warning 8364: (138-180): Assertion checker does not yet implement type struct Test.RecursiveStruct memory -// Warning 8364: (138-180): Assertion checker does not yet implement type struct Test.RecursiveStruct memory diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_constructor_recursive_2.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_constructor_recursive_2.sol index eb1b0ca71..1b6dc3236 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_constructor_recursive_2.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_constructor_recursive_2.sol @@ -16,6 +16,3 @@ contract Test { // Warning 7650: (199-204): Assertion checker does not yet support this expression. // Warning 8364: (199-202): Assertion checker does not yet implement type struct Test.RecursiveStruct memory // Warning 6328: (192-210): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nTest.constructor()\nTest.func() -// Warning 8364: (143-188): Assertion checker does not yet implement type struct Test.RecursiveStruct memory -// Warning 7650: (199-204): Assertion checker does not yet support this expression. -// Warning 8364: (199-202): Assertion checker does not yet implement type struct Test.RecursiveStruct memory diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_1.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_1.sol index 20efd65bf..171eba091 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_1.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_1.sol @@ -25,11 +25,3 @@ contract C { // Warning 8364: (137-139): Assertion checker does not yet implement type struct C.S storage ref // Warning 6328: (91-111): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6328: (115-149): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() -// Warning 7650: (98-102): Assertion checker does not yet support this expression. -// Warning 8364: (98-100): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (106-110): Assertion checker does not yet support this expression. -// Warning 8364: (106-108): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (122-126): Assertion checker does not yet support this expression. -// Warning 8364: (122-124): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (137-141): Assertion checker does not yet support this expression. -// Warning 8364: (137-139): Assertion checker does not yet implement type struct C.S storage ref diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_2.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_2.sol index 4b1e7260a..f0d436c23 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_2.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_2.sol @@ -71,43 +71,3 @@ contract C { // Warning 6328: (153-183): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6368: (269-276): CHC: Out of bounds access happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.g() // Warning 6368: (287-294): CHC: Out of bounds access happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.g() -// Warning 7650: (98-102): Assertion checker does not yet support this expression. -// Warning 8364: (98-100): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (106-110): Assertion checker does not yet support this expression. -// Warning 8364: (106-108): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (122-126): Assertion checker does not yet support this expression. -// Warning 8364: (122-124): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (137-141): Assertion checker does not yet support this expression. -// Warning 8364: (137-139): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (160-169): Assertion checker does not yet support this expression. -// Warning 7650: (160-164): Assertion checker does not yet support this expression. -// Warning 8364: (160-162): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (160-167): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (173-182): Assertion checker does not yet support this expression. -// Warning 7650: (173-177): Assertion checker does not yet support this expression. -// Warning 8364: (173-175): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (173-180): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (213-217): Assertion checker does not yet support this expression. -// Warning 8364: (213-215): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (213-217): Assertion checker does not support recursive structs. -// Warning 7650: (226-230): Assertion checker does not yet support this expression. -// Warning 8364: (226-228): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (226-230): Assertion checker does not support recursive structs. -// Warning 7650: (239-243): Assertion checker does not yet support this expression. -// Warning 8364: (239-241): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (239-250): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (239-243): Assertion checker does not support recursive structs. -// Warning 7650: (254-258): Assertion checker does not yet support this expression. -// Warning 8364: (254-256): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (254-265): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (254-258): Assertion checker does not support recursive structs. -// Warning 7650: (269-278): Assertion checker does not yet support this expression. -// Warning 7650: (269-273): Assertion checker does not yet support this expression. -// Warning 8364: (269-271): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (269-276): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (269-278): Assertion checker does not support recursive structs. -// Warning 7650: (287-296): Assertion checker does not yet support this expression. -// Warning 7650: (287-291): Assertion checker does not yet support this expression. -// Warning 8364: (287-289): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (287-294): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (287-296): Assertion checker does not support recursive structs. diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_3.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_3.sol index 7692912e8..64396abcb 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_3.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_3.sol @@ -141,89 +141,3 @@ contract C { // Warning 6368: (681-693): CHC: Out of bounds access happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.g() // Warning 6368: (704-711): CHC: Out of bounds access happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.g() // Warning 6368: (704-716): CHC: Out of bounds access happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.g() -// Warning 7650: (98-102): Assertion checker does not yet support this expression. -// Warning 8364: (98-100): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (106-110): Assertion checker does not yet support this expression. -// Warning 8364: (106-108): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (122-126): Assertion checker does not yet support this expression. -// Warning 8364: (122-124): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (137-141): Assertion checker does not yet support this expression. -// Warning 8364: (137-139): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (161-165): Assertion checker does not yet support this expression. -// Warning 8364: (161-163): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (189-193): Assertion checker does not yet support this expression. -// Warning 8364: (189-191): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (216-225): Assertion checker does not yet support this expression. -// Warning 7650: (216-220): Assertion checker does not yet support this expression. -// Warning 8364: (216-218): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (216-223): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (229-238): Assertion checker does not yet support this expression. -// Warning 7650: (229-233): Assertion checker does not yet support this expression. -// Warning 8364: (229-231): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (229-236): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (251-260): Assertion checker does not yet support this expression. -// Warning 7650: (251-255): Assertion checker does not yet support this expression. -// Warning 8364: (251-253): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (251-258): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (284-293): Assertion checker does not yet support this expression. -// Warning 7650: (284-288): Assertion checker does not yet support this expression. -// Warning 8364: (284-286): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (284-291): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (316-325): Assertion checker does not yet support this expression. -// Warning 7650: (316-320): Assertion checker does not yet support this expression. -// Warning 8364: (316-318): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (316-323): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (336-345): Assertion checker does not yet support this expression. -// Warning 7650: (336-340): Assertion checker does not yet support this expression. -// Warning 8364: (336-338): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (336-343): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (549-553): Assertion checker does not yet support this expression. -// Warning 8364: (549-551): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (549-553): Assertion checker does not support recursive structs. -// Warning 7650: (562-566): Assertion checker does not yet support this expression. -// Warning 8364: (562-564): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (562-566): Assertion checker does not support recursive structs. -// Warning 7650: (575-579): Assertion checker does not yet support this expression. -// Warning 8364: (575-577): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (575-586): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (575-579): Assertion checker does not support recursive structs. -// Warning 7650: (590-594): Assertion checker does not yet support this expression. -// Warning 8364: (590-592): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (590-601): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (590-594): Assertion checker does not support recursive structs. -// Warning 7650: (605-614): Assertion checker does not yet support this expression. -// Warning 7650: (605-609): Assertion checker does not yet support this expression. -// Warning 8364: (605-607): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (605-612): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (605-614): Assertion checker does not support recursive structs. -// Warning 7650: (623-632): Assertion checker does not yet support this expression. -// Warning 7650: (623-627): Assertion checker does not yet support this expression. -// Warning 8364: (623-625): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (623-630): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (623-632): Assertion checker does not support recursive structs. -// Warning 7650: (641-650): Assertion checker does not yet support this expression. -// Warning 7650: (641-645): Assertion checker does not yet support this expression. -// Warning 8364: (641-643): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (641-648): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (641-657): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (641-650): Assertion checker does not support recursive structs. -// Warning 7650: (661-670): Assertion checker does not yet support this expression. -// Warning 7650: (661-665): Assertion checker does not yet support this expression. -// Warning 8364: (661-663): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (661-668): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (661-677): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (661-670): Assertion checker does not support recursive structs. -// Warning 7650: (681-695): Assertion checker does not yet support this expression. -// Warning 7650: (681-690): Assertion checker does not yet support this expression. -// Warning 7650: (681-685): Assertion checker does not yet support this expression. -// Warning 8364: (681-683): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (681-688): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (681-693): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (681-695): Assertion checker does not support recursive structs. -// Warning 7650: (704-718): Assertion checker does not yet support this expression. -// Warning 7650: (704-713): Assertion checker does not yet support this expression. -// Warning 7650: (704-708): Assertion checker does not yet support this expression. -// Warning 8364: (704-706): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (704-711): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (704-716): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (704-718): Assertion checker does not support recursive structs. diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_4.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_4.sol index 84f893e85..ef60d1ba2 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_4.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_4.sol @@ -55,32 +55,3 @@ contract C { // Warning 6328: (164-200): CHC: Assertion violation happens here. // Warning 6328: (204-240): CHC: Assertion violation happens here. // Warning 6328: (326-358): CHC: Assertion violation happens here. -// Warning 8364: (122-124): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (127-129): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (117-129): Assertion checker does not yet implement type struct C.S storage pointer -// Warning 8364: (153-155): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (158-160): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (148-160): Assertion checker does not yet implement type struct C.S storage pointer -// Warning 7650: (171-175): Assertion checker does not yet support this expression. -// Warning 8364: (171-173): Assertion checker does not yet implement type struct C.S storage pointer -// Warning 7650: (179-183): Assertion checker does not yet support this expression. -// Warning 8364: (179-181): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (187-191): Assertion checker does not yet support this expression. -// Warning 8364: (187-189): Assertion checker does not yet implement type struct C.S storage pointer -// Warning 7650: (195-199): Assertion checker does not yet support this expression. -// Warning 8364: (195-197): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (211-215): Assertion checker does not yet support this expression. -// Warning 8364: (211-213): Assertion checker does not yet implement type struct C.S storage pointer -// Warning 7650: (219-223): Assertion checker does not yet support this expression. -// Warning 8364: (219-221): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (227-231): Assertion checker does not yet support this expression. -// Warning 8364: (227-229): Assertion checker does not yet implement type struct C.S storage pointer -// Warning 7650: (235-239): Assertion checker does not yet support this expression. -// Warning 8364: (235-237): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (244-248): Assertion checker does not yet support this expression. -// Warning 8364: (244-246): Assertion checker does not yet implement type struct C.S storage pointer -// Warning 4375: (244-248): Assertion checker does not support recursive structs. -// Warning 7650: (333-337): Assertion checker does not yet support this expression. -// Warning 8364: (333-335): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (347-351): Assertion checker does not yet support this expression. -// Warning 8364: (347-349): Assertion checker does not yet implement type struct C.S storage ref diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_5.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_5.sol index 9bd76dce2..2d438e6d0 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_5.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_5.sol @@ -27,13 +27,3 @@ contract C { // Warning 7650: (188-195): Assertion checker does not yet support this expression. // Warning 8364: (188-193): Assertion checker does not yet implement type struct C.S storage ref // Warning 6328: (159-203): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() -// Warning 8364: (93-102): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (120-133): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (137-148): Assertion checker does not yet support this expression. -// Warning 8364: (137-146): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (137-155): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (137-148): Assertion checker does not support recursive structs. -// Warning 7650: (166-177): Assertion checker does not yet support this expression. -// Warning 8364: (166-175): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (188-195): Assertion checker does not yet support this expression. -// Warning 8364: (188-193): Assertion checker does not yet implement type struct C.S storage ref diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_6.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_6.sol index dcb84cb76..d6ae281aa 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_6.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_6.sol @@ -60,32 +60,3 @@ contract C { // Warning 6328: (152-176): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6328: (180-214): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6328: (231-248): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() -// Warning 7650: (86-90): Assertion checker does not yet support this expression. -// Warning 8364: (86-88): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (86-90): Assertion checker does not support recursive structs. -// Warning 7650: (101-105): Assertion checker does not yet support this expression. -// Warning 8364: (101-103): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (101-105): Assertion checker does not support recursive structs. -// Warning 7650: (109-113): Assertion checker does not yet support this expression. -// Warning 8364: (109-111): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (109-113): Assertion checker does not support recursive structs. -// Warning 7650: (119-123): Assertion checker does not yet support this expression. -// Warning 8364: (119-121): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (119-123): Assertion checker does not support recursive structs. -// Warning 7650: (134-138): Assertion checker does not yet support this expression. -// Warning 8364: (134-136): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (134-138): Assertion checker does not support recursive structs. -// Warning 7650: (142-146): Assertion checker does not yet support this expression. -// Warning 8364: (142-144): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (142-146): Assertion checker does not support recursive structs. -// Warning 7650: (159-163): Assertion checker does not yet support this expression. -// Warning 8364: (159-161): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (167-171): Assertion checker does not yet support this expression. -// Warning 8364: (167-169): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (187-191): Assertion checker does not yet support this expression. -// Warning 8364: (187-189): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (202-206): Assertion checker does not yet support this expression. -// Warning 8364: (202-204): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (225-227): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (238-242): Assertion checker does not yet support this expression. -// Warning 8364: (238-240): Assertion checker does not yet implement type struct C.S storage ref diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_indirect_1.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_indirect_1.sol index 06155bad2..8305c25f7 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_indirect_1.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_indirect_1.sol @@ -29,11 +29,3 @@ contract C { // Warning 8364: (171-173): Assertion checker does not yet implement type struct C.S storage ref // Warning 6328: (125-145): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6328: (149-183): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() -// Warning 7650: (132-136): Assertion checker does not yet support this expression. -// Warning 8364: (132-134): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (140-144): Assertion checker does not yet support this expression. -// Warning 8364: (140-142): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (156-160): Assertion checker does not yet support this expression. -// Warning 8364: (156-158): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (171-175): Assertion checker does not yet support this expression. -// Warning 8364: (171-173): Assertion checker does not yet implement type struct C.S storage ref diff --git a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_indirect_2.sol b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_indirect_2.sol index 34d89d533..9753466ac 100644 --- a/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_indirect_2.sol +++ b/test/libsolidity/smtCheckerTests/types/struct/struct_recursive_indirect_2.sol @@ -61,35 +61,3 @@ contract C { // Warning 6368: (215-222): CHC: Out of bounds access happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6368: (215-227): CHC: Out of bounds access happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6328: (190-230): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() -// Warning 7650: (120-124): Assertion checker does not yet support this expression. -// Warning 8364: (120-122): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (120-131): Assertion checker does not yet implement type struct C.T storage ref -// Warning 4375: (120-124): Assertion checker does not support recursive structs. -// Warning 7650: (135-139): Assertion checker does not yet support this expression. -// Warning 8364: (135-137): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (135-146): Assertion checker does not yet implement type struct C.T storage ref -// Warning 4375: (135-139): Assertion checker does not support recursive structs. -// Warning 7650: (150-159): Assertion checker does not yet support this expression. -// Warning 7650: (150-154): Assertion checker does not yet support this expression. -// Warning 8364: (150-152): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (150-157): Assertion checker does not yet implement type struct C.T storage ref -// Warning 8364: (150-166): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (150-159): Assertion checker does not support recursive structs. -// Warning 7650: (170-179): Assertion checker does not yet support this expression. -// Warning 7650: (170-174): Assertion checker does not yet support this expression. -// Warning 8364: (170-172): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (170-177): Assertion checker does not yet implement type struct C.T storage ref -// Warning 8364: (170-186): Assertion checker does not yet implement type struct C.S storage ref -// Warning 4375: (170-179): Assertion checker does not support recursive structs. -// Warning 7650: (197-211): Assertion checker does not yet support this expression. -// Warning 7650: (197-206): Assertion checker does not yet support this expression. -// Warning 7650: (197-201): Assertion checker does not yet support this expression. -// Warning 8364: (197-199): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (197-204): Assertion checker does not yet implement type struct C.T storage ref -// Warning 8364: (197-209): Assertion checker does not yet implement type struct C.S storage ref -// Warning 7650: (215-229): Assertion checker does not yet support this expression. -// Warning 7650: (215-224): Assertion checker does not yet support this expression. -// Warning 7650: (215-219): Assertion checker does not yet support this expression. -// Warning 8364: (215-217): Assertion checker does not yet implement type struct C.S storage ref -// Warning 8364: (215-222): Assertion checker does not yet implement type struct C.T storage ref -// Warning 8364: (215-227): Assertion checker does not yet implement type struct C.S storage ref diff --git a/test/libsolidity/smtCheckerTests/types/type_expression_array_2d.sol b/test/libsolidity/smtCheckerTests/types/type_expression_array_2d.sol index 661060047..081be39a4 100644 --- a/test/libsolidity/smtCheckerTests/types/type_expression_array_2d.sol +++ b/test/libsolidity/smtCheckerTests/types/type_expression_array_2d.sol @@ -9,5 +9,3 @@ function f() public pure { int[][]; } // Warning 6133: (41-48): Statement has no effect. // Warning 8364: (41-46): Assertion checker does not yet implement type type(int256[] memory) // Warning 8364: (41-48): Assertion checker does not yet implement type type(int256[] memory[] memory) -// Warning 8364: (41-46): Assertion checker does not yet implement type type(int256[] memory) -// Warning 8364: (41-48): Assertion checker does not yet implement type type(int256[] memory[] memory) diff --git a/test/libsolidity/smtCheckerTests/types/type_expression_array_3d.sol b/test/libsolidity/smtCheckerTests/types/type_expression_array_3d.sol index e37f181ea..1be4a781b 100644 --- a/test/libsolidity/smtCheckerTests/types/type_expression_array_3d.sol +++ b/test/libsolidity/smtCheckerTests/types/type_expression_array_3d.sol @@ -10,6 +10,3 @@ function f() public pure { int[][][]; } // Warning 8364: (41-46): Assertion checker does not yet implement type type(int256[] memory) // Warning 8364: (41-48): Assertion checker does not yet implement type type(int256[] memory[] memory) // Warning 8364: (41-50): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) -// Warning 8364: (41-46): Assertion checker does not yet implement type type(int256[] memory) -// Warning 8364: (41-48): Assertion checker does not yet implement type type(int256[] memory[] memory) -// Warning 8364: (41-50): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) diff --git a/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_2d.sol b/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_2d.sol index 751d2b82a..3087e94aa 100644 --- a/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_2d.sol +++ b/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_2d.sol @@ -10,6 +10,3 @@ function f() public pure { (int[][]); } // Warning 8364: (42-47): Assertion checker does not yet implement type type(int256[] memory) // Warning 8364: (42-49): Assertion checker does not yet implement type type(int256[] memory[] memory) // Warning 8364: (41-50): Assertion checker does not yet implement type type(int256[] memory[] memory) -// Warning 8364: (42-47): Assertion checker does not yet implement type type(int256[] memory) -// Warning 8364: (42-49): Assertion checker does not yet implement type type(int256[] memory[] memory) -// Warning 8364: (41-50): Assertion checker does not yet implement type type(int256[] memory[] memory) diff --git a/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_3d.sol b/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_3d.sol index a1f29dad6..58aab6642 100644 --- a/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_3d.sol +++ b/test/libsolidity/smtCheckerTests/types/type_expression_tuple_array_3d.sol @@ -11,7 +11,3 @@ function f() public pure { (int[][][]); } // Warning 8364: (42-49): Assertion checker does not yet implement type type(int256[] memory[] memory) // Warning 8364: (42-51): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) // Warning 8364: (41-52): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) -// Warning 8364: (42-47): Assertion checker does not yet implement type type(int256[] memory) -// Warning 8364: (42-49): Assertion checker does not yet implement type type(int256[] memory[] memory) -// Warning 8364: (42-51): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) -// Warning 8364: (41-52): Assertion checker does not yet implement type type(int256[] memory[] memory[] memory) diff --git a/test/libsolidity/smtCheckerTests/types/type_meta_unsupported.sol b/test/libsolidity/smtCheckerTests/types/type_meta_unsupported.sol index 778f0181d..bd42eb72d 100644 --- a/test/libsolidity/smtCheckerTests/types/type_meta_unsupported.sol +++ b/test/libsolidity/smtCheckerTests/types/type_meta_unsupported.sol @@ -17,6 +17,3 @@ contract C { // Warning 6328: (59-98): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6328: (102-142): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() // Warning 6328: (146-185): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f() -// Warning 7507: (72-84): Assertion checker does not yet support this expression. -// Warning 7507: (109-129): Assertion checker does not yet support this expression. -// Warning 7507: (153-172): Assertion checker does not yet support this expression. diff --git a/test/libsolidity/smtCheckerTests/verification_target/simple_assert.sol b/test/libsolidity/smtCheckerTests/verification_target/simple_assert.sol index aa1abfff6..1d9476869 100644 --- a/test/libsolidity/smtCheckerTests/verification_target/simple_assert.sol +++ b/test/libsolidity/smtCheckerTests/verification_target/simple_assert.sol @@ -3,5 +3,6 @@ contract C { } // ==== // SMTEngine: all +// SMTIgnoreCex: yes // ---- -// Warning 6328: (50-64): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0\n\nTransaction trace:\nC.constructor()\nC.f(0) +// Warning 6328: (50-64): CHC: Assertion violation happens here. diff --git a/test/libsolutil/CommonIO.cpp b/test/libsolutil/CommonIO.cpp index 0f3cde036..12b99df7b 100644 --- a/test/libsolutil/CommonIO.cpp +++ b/test/libsolutil/CommonIO.cpp @@ -34,6 +34,8 @@ using namespace std; using namespace solidity::test; +#define TEST_CASE_NAME (boost::unit_test::framework::current_test_case().p_name) + namespace solidity::util::test { @@ -41,7 +43,7 @@ BOOST_AUTO_TEST_SUITE(CommonIOTest) BOOST_AUTO_TEST_CASE(readFileAsString_regular_file) { - TemporaryDirectory tempDir("common-io-test-"); + TemporaryDirectory tempDir(TEST_CASE_NAME); createFileWithContent(tempDir.path() / "test.txt", "ABC\ndef\n"); BOOST_TEST(readFileAsString(tempDir.path() / "test.txt") == "ABC\ndef\n"); @@ -49,16 +51,16 @@ BOOST_AUTO_TEST_CASE(readFileAsString_regular_file) BOOST_AUTO_TEST_CASE(readFileAsString_directory) { - TemporaryDirectory tempDir("common-io-test-"); - BOOST_CHECK_THROW(readFileAsString(tempDir.path()), NotAFile); + TemporaryDirectory tempDir(TEST_CASE_NAME); + BOOST_CHECK_THROW(readFileAsString(tempDir), NotAFile); } BOOST_AUTO_TEST_CASE(readFileAsString_symlink) { - TemporaryDirectory tempDir("common-io-test-"); + TemporaryDirectory tempDir(TEST_CASE_NAME); createFileWithContent(tempDir.path() / "test.txt", "ABC\ndef\n"); - if (!createSymlinkIfSupportedByFilesystem("test.txt", tempDir.path() / "symlink.txt")) + if (!createSymlinkIfSupportedByFilesystem("test.txt", tempDir.path() / "symlink.txt", false)) return; BOOST_TEST(readFileAsString(tempDir.path() / "symlink.txt") == "ABC\ndef\n"); diff --git a/test/libyul/Inliner.cpp b/test/libyul/Inliner.cpp index 6fc50ddc6..f80ec433e 100644 --- a/test/libyul/Inliner.cpp +++ b/test/libyul/Inliner.cpp @@ -32,7 +32,6 @@ #include -#include #include using namespace std; diff --git a/test/solc/CommandLineInterface.cpp b/test/solc/CommandLineInterface.cpp index 9c73c66ea..0023e9f57 100644 --- a/test/solc/CommandLineInterface.cpp +++ b/test/solc/CommandLineInterface.cpp @@ -141,18 +141,23 @@ BOOST_AUTO_TEST_CASE(cli_input) createFilesWithParentDirs({tempDir1.path() / "input1.sol"}); createFilesWithParentDirs({tempDir2.path() / "input2.sol"}); + boost::filesystem::path expectedDir1 = "/" / tempDir1.path().relative_path(); + boost::filesystem::path expectedDir2 = "/" / tempDir2.path().relative_path(); + soltestAssert(expectedDir1.is_absolute() || expectedDir1.root_path() == "/", ""); + soltestAssert(expectedDir2.is_absolute() || expectedDir2.root_path() == "/", ""); + vector expectedRemappings = { {"", "a", "b/c/d"}, {"a", "b", "c/d/e/"}, }; map expectedSources = { {"", "\n"}, - {(tempDir1.path() / "input1.sol").generic_string(), ""}, - {(tempDir2.path() / "input2.sol").generic_string(), ""}, + {(expectedDir1 / "input1.sol").generic_string(), ""}, + {(expectedDir2 / "input2.sol").generic_string(), ""}, }; PathSet expectedAllowedPaths = { - boost::filesystem::canonical(tempDir1.path()), - boost::filesystem::canonical(tempDir2.path()), + boost::filesystem::canonical(tempDir1), + boost::filesystem::canonical(tempDir2), "b/c", "c/d/e", }; @@ -181,9 +186,12 @@ BOOST_AUTO_TEST_CASE(cli_ignore_missing_some_files_exist) TemporaryDirectory tempDir2(TEST_CASE_NAME); createFilesWithParentDirs({tempDir1.path() / "input1.sol"}); + boost::filesystem::path expectedDir1 = "/" / tempDir1.path().relative_path(); + soltestAssert(expectedDir1.is_absolute() || expectedDir1.root_path() == "/", ""); + // NOTE: Allowed paths should not be added for skipped files. - map expectedSources = {{(tempDir1.path() / "input1.sol").generic_string(), ""}}; - PathSet expectedAllowedPaths = {boost::filesystem::canonical(tempDir1.path())}; + map expectedSources = {{(expectedDir1 / "input1.sol").generic_string(), ""}}; + PathSet expectedAllowedPaths = {boost::filesystem::canonical(tempDir1)}; OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles({ "solc", @@ -232,6 +240,7 @@ BOOST_AUTO_TEST_CASE(cli_not_a_file) BOOST_AUTO_TEST_CASE(standard_json_base_path) { TemporaryDirectory tempDir(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDir.path().root_path()); OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles({ "solc", @@ -245,7 +254,7 @@ BOOST_AUTO_TEST_CASE(standard_json_base_path) BOOST_TEST(result.options.input.paths.empty()); BOOST_TEST(result.reader.sourceCodes().empty()); BOOST_TEST(result.reader.allowedDirectories().empty()); - BOOST_TEST(result.reader.basePath() == tempDir.path()); + BOOST_TEST(result.reader.basePath() == "/" / tempDir.path().relative_path()); } BOOST_AUTO_TEST_CASE(standard_json_no_input_file) @@ -341,6 +350,529 @@ BOOST_AUTO_TEST_CASE(standard_json_remapping) BOOST_TEST(result.stderrContent == expectedMessage); } +BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_no_base_path) +{ + TemporaryDirectory tempDirCurrent(TEST_CASE_NAME); + TemporaryDirectory tempDirOther(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDirCurrent); + soltestAssert(tempDirCurrent.path().is_absolute(), ""); + soltestAssert(tempDirOther.path().is_absolute(), ""); + + // NOTE: On macOS the path usually contains symlinks which prevents base path from being stripped. + // Use canonical() to resolve symnlinks and get consistent results on all platforms. + boost::filesystem::path currentDirNoSymlinks = boost::filesystem::canonical(tempDirCurrent); + boost::filesystem::path otherDirNoSymlinks = boost::filesystem::canonical(tempDirOther); + + boost::filesystem::path expectedOtherDir = "/" / otherDirNoSymlinks.relative_path(); + soltestAssert(expectedOtherDir.is_absolute() || expectedOtherDir.root_path() == "/", ""); + + vector commandLine = { + "solc", + "contract1.sol", // Relative path + "c/d/contract2.sol", // Relative path with subdirectories + currentDirNoSymlinks.string() + "/contract3.sol", // Absolute path inside working dir + otherDirNoSymlinks.string() + "/contract4.sol", // Absolute path outside of working dir + }; + + CommandLineOptions expectedOptions; + expectedOptions.input.paths = { + "contract1.sol", + "c/d/contract2.sol", + currentDirNoSymlinks / "contract3.sol", + otherDirNoSymlinks / "contract4.sol", + }; + expectedOptions.modelChecker.initialize = true; + + map expectedSources = { + {"contract1.sol", ""}, + {"c/d/contract2.sol", ""}, + {"contract3.sol", ""}, + {expectedOtherDir.generic_string() + "/contract4.sol", ""}, + }; + + FileReader::FileSystemPathSet expectedAllowedDirectories = { + currentDirNoSymlinks / "c/d", + currentDirNoSymlinks, + otherDirNoSymlinks, + }; + + createFilesWithParentDirs(expectedOptions.input.paths); + OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles(commandLine); + + BOOST_TEST(result.stderrContent == ""); + BOOST_TEST(result.stdoutContent == ""); + BOOST_REQUIRE(result.success); + BOOST_TEST(result.options == expectedOptions); + BOOST_TEST(result.reader.sourceCodes() == expectedSources); + BOOST_TEST(result.reader.allowedDirectories() == expectedAllowedDirectories); + BOOST_TEST(result.reader.basePath() == ""); +} + +BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_base_path_same_as_work_dir) +{ + TemporaryDirectory tempDirCurrent(TEST_CASE_NAME); + TemporaryDirectory tempDirOther(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDirCurrent); + soltestAssert(tempDirCurrent.path().is_absolute(), ""); + soltestAssert(tempDirOther.path().is_absolute(), ""); + + // NOTE: On macOS the path usually contains symlinks which prevents base path from being stripped. + // Use canonical() to resolve symnlinks and get consistent results on all platforms. + boost::filesystem::path currentDirNoSymlinks = boost::filesystem::canonical(tempDirCurrent); + boost::filesystem::path otherDirNoSymlinks = boost::filesystem::canonical(tempDirOther); + + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::current_path().relative_path(); + boost::filesystem::path expectedOtherDir = "/" / otherDirNoSymlinks.relative_path(); + soltestAssert(expectedWorkDir.is_absolute() || expectedWorkDir.root_path() == "/", ""); + soltestAssert(expectedOtherDir.is_absolute() || expectedOtherDir.root_path() == "/", ""); + + vector commandLine = { + "solc", + "--base-path=" + currentDirNoSymlinks.string(), + "contract1.sol", // Relative path + "c/d/contract2.sol", // Relative path with subdirectories + currentDirNoSymlinks.string() + "/contract3.sol", // Absolute path inside working dir + otherDirNoSymlinks.string() + "/contract4.sol", // Absolute path outside of working dir + }; + + CommandLineOptions expectedOptions; + expectedOptions.input.paths = { + "contract1.sol", + "c/d/contract2.sol", + currentDirNoSymlinks / "contract3.sol", + otherDirNoSymlinks / "contract4.sol", + }; + expectedOptions.input.basePath = currentDirNoSymlinks; + expectedOptions.modelChecker.initialize = true; + + map expectedSources = { + {"contract1.sol", ""}, + {"c/d/contract2.sol", ""}, + {"contract3.sol", ""}, + {expectedOtherDir.generic_string() + "/contract4.sol", ""}, + }; + + FileReader::FileSystemPathSet expectedAllowedDirectories = { + currentDirNoSymlinks / "c/d", + currentDirNoSymlinks, + otherDirNoSymlinks, + }; + + createFilesWithParentDirs(expectedOptions.input.paths); + OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles(commandLine); + + BOOST_TEST(result.stderrContent == ""); + BOOST_TEST(result.stdoutContent == ""); + BOOST_REQUIRE(result.success); + BOOST_TEST(result.options == expectedOptions); + BOOST_TEST(result.reader.sourceCodes() == expectedSources); + BOOST_TEST(result.reader.allowedDirectories() == expectedAllowedDirectories); + BOOST_TEST(result.reader.basePath() == expectedWorkDir); +} + +BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_base_path_different_from_work_dir) +{ + TemporaryDirectory tempDirCurrent(TEST_CASE_NAME); + TemporaryDirectory tempDirOther(TEST_CASE_NAME); + TemporaryDirectory tempDirBase(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDirCurrent); + soltestAssert(tempDirCurrent.path().is_absolute(), ""); + soltestAssert(tempDirOther.path().is_absolute(), ""); + soltestAssert(tempDirBase.path().is_absolute(), ""); + + // NOTE: On macOS the path usually contains symlinks which prevents base path from being stripped. + // Use canonical() to resolve symnlinks and get consistent results on all platforms. + boost::filesystem::path currentDirNoSymlinks = boost::filesystem::canonical(tempDirCurrent); + boost::filesystem::path otherDirNoSymlinks = boost::filesystem::canonical(tempDirOther); + boost::filesystem::path baseDirNoSymlinks = boost::filesystem::canonical(tempDirBase); + + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::current_path().relative_path(); + boost::filesystem::path expectedCurrentDir = "/" / currentDirNoSymlinks.relative_path(); + boost::filesystem::path expectedOtherDir = "/" / otherDirNoSymlinks.relative_path(); + boost::filesystem::path expectedBaseDir = "/" / baseDirNoSymlinks.relative_path(); + soltestAssert(expectedWorkDir.is_absolute() || expectedWorkDir.root_path() == "/", ""); + soltestAssert(expectedCurrentDir.is_absolute() || expectedCurrentDir.root_path() == "/", ""); + soltestAssert(expectedOtherDir.is_absolute() || expectedOtherDir.root_path() == "/", ""); + soltestAssert(expectedBaseDir.is_absolute() || expectedBaseDir.root_path() == "/", ""); + + vector commandLine = { + "solc", + "--base-path=" + baseDirNoSymlinks.string(), + "contract1.sol", // Relative path + "c/d/contract2.sol", // Relative path with subdirectories + currentDirNoSymlinks.string() + "/contract3.sol", // Absolute path inside working dir + otherDirNoSymlinks.string() + "/contract4.sol", // Absolute path outside of working dir + baseDirNoSymlinks.string() + "/contract5.sol", // Absolute path inside base path + }; + + CommandLineOptions expectedOptions; + expectedOptions.input.paths = { + "contract1.sol", + "c/d/contract2.sol", + currentDirNoSymlinks / "contract3.sol", + otherDirNoSymlinks / "contract4.sol", + baseDirNoSymlinks / "contract5.sol", + }; + expectedOptions.input.basePath = baseDirNoSymlinks; + expectedOptions.modelChecker.initialize = true; + + map expectedSources = { + {expectedWorkDir.generic_string() + "/contract1.sol", ""}, + {expectedWorkDir.generic_string() + "/c/d/contract2.sol", ""}, + {expectedCurrentDir.generic_string() + "/contract3.sol", ""}, + {expectedOtherDir.generic_string() + "/contract4.sol", ""}, + {"contract5.sol", ""}, + }; + + FileReader::FileSystemPathSet expectedAllowedDirectories = { + currentDirNoSymlinks / "c/d", + currentDirNoSymlinks, + otherDirNoSymlinks, + baseDirNoSymlinks, + }; + + createFilesWithParentDirs(expectedOptions.input.paths); + OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles(commandLine); + + BOOST_TEST(result.stderrContent == ""); + BOOST_TEST(result.stdoutContent == ""); + BOOST_REQUIRE(result.success); + BOOST_TEST(result.options == expectedOptions); + BOOST_TEST(result.reader.sourceCodes() == expectedSources); + BOOST_TEST(result.reader.allowedDirectories() == expectedAllowedDirectories); + BOOST_TEST(result.reader.basePath() == expectedBaseDir); +} + +BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_relative_base_path) +{ + TemporaryDirectory tempDirCurrent(TEST_CASE_NAME); + TemporaryDirectory tempDirOther(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDirCurrent); + soltestAssert(tempDirCurrent.path().is_absolute(), ""); + soltestAssert(tempDirOther.path().is_absolute(), ""); + + // NOTE: On macOS the path usually contains symlinks which prevents base path from being stripped. + // Use canonical() to resolve symnlinks and get consistent results on all platforms. + boost::filesystem::path currentDirNoSymlinks = boost::filesystem::canonical(tempDirCurrent); + boost::filesystem::path otherDirNoSymlinks = boost::filesystem::canonical(tempDirOther); + + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::current_path().relative_path(); + boost::filesystem::path expectedOtherDir = "/" / otherDirNoSymlinks.relative_path(); + soltestAssert(expectedWorkDir.is_absolute() || expectedWorkDir.root_path() == "/", ""); + soltestAssert(expectedOtherDir.is_absolute() || expectedOtherDir.root_path() == "/", ""); + + vector commandLine = { + "solc", + "--base-path=base", + "contract1.sol", // Relative path outside of base path + "base/contract2.sol", // Relative path inside base path + currentDirNoSymlinks.string() + "/contract3.sol", // Absolute path inside working dir + currentDirNoSymlinks.string() + "/base/contract4.sol", // Absolute path inside base path + otherDirNoSymlinks.string() + "/contract5.sol", // Absolute path outside of working dir + otherDirNoSymlinks.string() + "/base/contract6.sol", // Absolute path outside of working dir + }; + + CommandLineOptions expectedOptions; + expectedOptions.input.paths = { + "contract1.sol", + "base/contract2.sol", + currentDirNoSymlinks / "contract3.sol", + currentDirNoSymlinks / "base/contract4.sol", + otherDirNoSymlinks / "contract5.sol", + otherDirNoSymlinks / "base/contract6.sol", + }; + expectedOptions.input.basePath = "base"; + expectedOptions.modelChecker.initialize = true; + + map expectedSources = { + {expectedWorkDir.generic_string() + "/contract1.sol", ""}, + {"contract2.sol", ""}, + {expectedWorkDir.generic_string() + "/contract3.sol", ""}, + {"contract4.sol", ""}, + {expectedOtherDir.generic_string() + "/contract5.sol", ""}, + {expectedOtherDir.generic_string() + "/base/contract6.sol", ""}, + }; + + FileReader::FileSystemPathSet expectedAllowedDirectories = { + currentDirNoSymlinks / "base", + currentDirNoSymlinks, + otherDirNoSymlinks, + otherDirNoSymlinks / "base", + }; + + createFilesWithParentDirs(expectedOptions.input.paths); + OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles(commandLine); + + BOOST_TEST(result.stderrContent == ""); + BOOST_TEST(result.stdoutContent == ""); + BOOST_REQUIRE(result.success); + BOOST_TEST(result.options == expectedOptions); + BOOST_TEST(result.reader.sourceCodes() == expectedSources); + BOOST_TEST(result.reader.allowedDirectories() == expectedAllowedDirectories); + BOOST_TEST(result.reader.basePath() == expectedWorkDir / "base"); +} + +BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_normalization_and_weird_names) +{ + TemporaryDirectory tempDir({"x/y/z"}, TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDir.path() / "x/y/z"); + soltestAssert(tempDir.path().is_absolute(), ""); + + string uncPath = "//" + tempDir.path().relative_path().generic_string(); + soltestAssert(FileReader::isUNCPath(uncPath), ""); + + boost::filesystem::path tempDirNoSymlinks = boost::filesystem::canonical(tempDir); + + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::current_path().relative_path(); + soltestAssert(expectedWorkDir.is_absolute() || expectedWorkDir.root_path() == "/", ""); + + vector commandLine = { + "solc", + +#if !defined(_WIN32) + // URLs. We interpret them as local paths. + // Note that : is not allowed in file names on Windows. + "file://c/d/contract1.sol", + "file:///c/d/contract2.sol", + "https://example.com/contract3.sol", +#endif + + // Redundant slashes + "a/b//contract4.sol", + "a/b///contract5.sol", + "a/b////contract6.sol", + + // Dot segments + "./a/b/contract7.sol", + "././a/b/contract8.sol", + "a/./b/contract9.sol", + "a/././b/contract10.sol", + + // Dot dot segments + "../a/b/contract11.sol", + "../../a/b/contract12.sol", + "a/../b/contract13.sol", + "a/b/../../contract14.sol", + tempDirNoSymlinks.string() + "/x/y/z/a/../b/contract15.sol", + tempDirNoSymlinks.string() + "/x/y/z/a/b/../../contract16.sol", + + // Dot dot segments going beyond filesystem root + "/../" + tempDir.path().relative_path().generic_string() + "/contract17.sol", + "/../../" + tempDir.path().relative_path().generic_string() + "/contract18.sol", + +#if !defined(_WIN32) + // Name conflict with source unit name of stdin. + // Note that < and > are not allowed in file names on Windows. + "", + + // UNC paths on UNIX just resolve into normal paths. On Windows this would be an network + // share (and an error unless the share actually exists so I can't test it here). + uncPath + "/contract19.sol", + + // Windows paths on non-Windows systems. + // Note that on Windows we tested them already just by using absolute paths. + "a\\b\\contract20.sol", + "C:\\a\\b\\contract21.sol", +#endif + }; + + CommandLineOptions expectedOptions; + expectedOptions.input.paths = { +#if !defined(_WIN32) + "file://c/d/contract1.sol", + "file:///c/d/contract2.sol", + "https://example.com/contract3.sol", +#endif + + "a/b//contract4.sol", + "a/b///contract5.sol", + "a/b////contract6.sol", + + "./a/b/contract7.sol", + "././a/b/contract8.sol", + "a/./b/contract9.sol", + "a/././b/contract10.sol", + + "../a/b/contract11.sol", + "../../a/b/contract12.sol", + "a/../b/contract13.sol", + "a/b/../../contract14.sol", + tempDirNoSymlinks.string() + "/x/y/z/a/../b/contract15.sol", + tempDirNoSymlinks.string() + "/x/y/z/a/b/../../contract16.sol", + + "/../" + tempDir.path().relative_path().string() + "/contract17.sol", + "/../../" + tempDir.path().relative_path().string() + "/contract18.sol", + +#if !defined(_WIN32) + "", + + uncPath + "/contract19.sol", + + "a\\b\\contract20.sol", + "C:\\a\\b\\contract21.sol", +#endif + }; + expectedOptions.modelChecker.initialize = true; + + map expectedSources = { +#if !defined(_WIN32) + {"file:/c/d/contract1.sol", ""}, + {"file:/c/d/contract2.sol", ""}, + {"https:/example.com/contract3.sol", ""}, +#endif + + {"a/b/contract4.sol", ""}, + {"a/b/contract5.sol", ""}, + {"a/b/contract6.sol", ""}, + + {"a/b/contract7.sol", ""}, + {"a/b/contract8.sol", ""}, + {"a/b/contract9.sol", ""}, + {"a/b/contract10.sol", ""}, + + {expectedWorkDir.parent_path().generic_string() + "/a/b/contract11.sol", ""}, + {expectedWorkDir.parent_path().parent_path().generic_string() + "/a/b/contract12.sol", ""}, + {"b/contract13.sol", ""}, + {"contract14.sol", ""}, + {"b/contract15.sol", ""}, + {"contract16.sol", ""}, + + {"/" + tempDir.path().relative_path().generic_string() + "/contract17.sol", ""}, + {"/" + tempDir.path().relative_path().generic_string() + "/contract18.sol", ""}, + +#if !defined(_WIN32) + {"", ""}, + + {uncPath + "/contract19.sol", ""}, + + {"a\\b\\contract20.sol", ""}, + {"C:\\a\\b\\contract21.sol", ""}, +#endif + }; + + FileReader::FileSystemPathSet expectedAllowedDirectories = { +#if !defined(_WIN32) + tempDirNoSymlinks / "x/y/z/file:/c/d", + tempDirNoSymlinks / "x/y/z/https:/example.com", +#endif + tempDirNoSymlinks / "x/y/z/a/b", + tempDirNoSymlinks / "x/y/z", + tempDirNoSymlinks / "x/y/z/b", + tempDirNoSymlinks / "x/y/a/b", + tempDirNoSymlinks / "x/a/b", + tempDirNoSymlinks, +#if !defined(_WIN32) + boost::filesystem::canonical(uncPath), +#endif + }; + + createFilesWithParentDirs(expectedOptions.input.paths); + + OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles(commandLine); + + BOOST_TEST(result.stderrContent == ""); + BOOST_TEST(result.stdoutContent == ""); + BOOST_REQUIRE(result.success); + BOOST_TEST(result.options == expectedOptions); + BOOST_TEST(result.reader.sourceCodes() == expectedSources); + BOOST_TEST(result.reader.allowedDirectories() == expectedAllowedDirectories); + BOOST_TEST(result.reader.basePath() == expectedOptions.input.basePath); +} + +BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_symlinks) +{ + TemporaryDirectory tempDir({"r/"}, TEST_CASE_NAME); + createFilesWithParentDirs({tempDir.path() / "x/y/z/contract.sol"}); + TemporaryWorkingDirectory tempWorkDir(tempDir.path() / "r"); + + if ( +#if !defined(_WIN32) + !createSymlinkIfSupportedByFilesystem("../x/y", tempDir.path() / "r/sym", true) || +#else + // NOTE: On Windows / works as a separator in a symlink target only if the target is absolute + !createSymlinkIfSupportedByFilesystem("..\\x\\y", tempDir.path() / "r/sym", true) || +#endif + !createSymlinkIfSupportedByFilesystem("contract.sol", tempDir.path() / "x/y/z/contract_symlink.sol", false) + ) + return; + + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::current_path().relative_path(); + soltestAssert(expectedWorkDir.is_absolute() || expectedWorkDir.root_path() == "/", ""); + + vector commandLine = { + "solc", + + "--base-path=../r/sym/z/", + "sym/z/contract.sol", // File accessed directly + same dir symlink as base path + "../x/y/z/contract.sol", // File accessed directly + different dir symlink than base path + "sym/z/contract_symlink.sol", // File accessed via symlink + same dir symlink as base path + "../x/y/z/contract_symlink.sol", // File accessed via symlink + different dir symlink than base path + }; + + CommandLineOptions expectedOptions; + expectedOptions.input.paths = { + "sym/z/contract.sol", + "../x/y/z/contract.sol", + "sym/z/contract_symlink.sol", + "../x/y/z/contract_symlink.sol", + }; + expectedOptions.input.basePath = "../r/sym/z/"; + expectedOptions.modelChecker.initialize = true; + + map expectedSources = { + {"contract.sol", ""}, + {(expectedWorkDir.parent_path() / "x/y/z/contract.sol").generic_string(), ""}, + {"contract_symlink.sol", ""}, + {(expectedWorkDir.parent_path() / "x/y/z/contract_symlink.sol").generic_string(), ""}, + }; + + FileReader::FileSystemPathSet expectedAllowedDirectories = { + boost::filesystem::canonical(tempDir) / "x/y/z", + }; + + OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles(commandLine); + + BOOST_TEST(result.stderrContent == ""); + BOOST_TEST(result.stdoutContent == ""); + BOOST_REQUIRE(result.success); + BOOST_TEST(result.options == expectedOptions); + BOOST_TEST(result.reader.sourceCodes() == expectedSources); + BOOST_TEST(result.reader.allowedDirectories() == expectedAllowedDirectories); + BOOST_TEST(result.reader.basePath() == expectedWorkDir / "sym/z/"); +} + +BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_base_path_and_stdin) +{ + TemporaryDirectory tempDir(TEST_CASE_NAME); + TemporaryWorkingDirectory tempWorkDir(tempDir); + boost::filesystem::create_directories(tempDir.path() / "base"); + + boost::filesystem::path expectedWorkDir = "/" / boost::filesystem::current_path().relative_path(); + + vector commandLine = {"solc", "--base-path=base", "-"}; + + CommandLineOptions expectedOptions; + expectedOptions.input.addStdin = true; + expectedOptions.input.basePath = "base"; + expectedOptions.modelChecker.initialize = true; + + map expectedSources = { + {"", "\n"}, + }; + FileReader::FileSystemPathSet expectedAllowedDirectories = {}; + + createFilesWithParentDirs(expectedOptions.input.paths); + OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles(commandLine); + + BOOST_TEST(result.stderrContent == ""); + BOOST_TEST(result.stdoutContent == ""); + BOOST_REQUIRE(result.success); + BOOST_TEST(result.options == expectedOptions); + BOOST_TEST(result.reader.sourceCodes() == expectedSources); + BOOST_TEST(result.reader.allowedDirectories() == expectedAllowedDirectories); + BOOST_TEST(result.reader.basePath() == expectedWorkDir / "base"); +} + BOOST_AUTO_TEST_SUITE_END() } // namespace solidity::frontend::test diff --git a/test/solc/CommandLineParser.cpp b/test/solc/CommandLineParser.cpp index d13c8a27b..1e3a53162 100644 --- a/test/solc/CommandLineParser.cpp +++ b/test/solc/CommandLineParser.cpp @@ -262,7 +262,6 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options) "--error-recovery", // Ignored in assembly mode "--overwrite", "--evm-version=spuriousDragon", - "--experimental-via-ir", // Ignored in assembly mode "--revert-strings=strip", // Accepted but has no effect in assembly mode "--pretty-json", "--json-indent=1", @@ -357,7 +356,6 @@ BOOST_AUTO_TEST_CASE(standard_json_mode_options) "--output-dir=/tmp/out", // Accepted but has no effect in Standard JSON mode "--overwrite", // Accepted but has no effect in Standard JSON mode "--evm-version=spuriousDragon", // Ignored in Standard JSON mode - "--experimental-via-ir", // Ignored in Standard JSON mode "--revert-strings=strip", // Accepted but has no effect in Standard JSON mode "--pretty-json", "--json-indent=1", @@ -422,6 +420,32 @@ BOOST_AUTO_TEST_CASE(standard_json_mode_options) BOOST_TEST(parsedOptions.value() == expectedOptions); } +BOOST_AUTO_TEST_CASE(experimental_via_ir_invalid_input_modes) +{ + static array const inputModeOptions = { + "--assemble", + "--yul", + "--strict-assembly", + "--standard-json", + "--link", + }; + for (string const& inputModeOption: inputModeOptions) + { + stringstream sout, serr; + vector commandLine = { + "solc", + "--experimental-via-ir", + "file", + inputModeOption, + }; + optional parsedOptions = parseCommandLine(commandLine, sout, serr); + + BOOST_TEST(sout.str() == ""); + BOOST_TEST(serr.str() == "The option --experimental-via-ir is only supported in the compiler mode.\n"); + BOOST_REQUIRE(!parsedOptions.has_value()); + } +} + BOOST_AUTO_TEST_SUITE_END() } // namespace solidity::frontend::test