Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update SMTChecker tests with Z3 4.11.2 #13740

Merged
merged 6 commits into from
Nov 24, 2022
Merged

update SMTChecker tests with Z3 4.11.2 #13740

merged 6 commits into from
Nov 24, 2022

Conversation

leonardoalt
Copy link
Member

No description provided.

"1988", "2066", "2833", "3356",
"3893", "3996", "4010", "4458", "4802",
"4902", "5272", "5622", "5798", "7128", "7400",
"4902", "5272", "5622", "5798", "5840", "7128", "7400",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 error IDs were SMT errors when the solver couldn't prove something, which surprisingly doesn't happen anymore with the new z3! It's a nice development. We should anyway add some more complex tests that cause that in a future PR.

m_modelCheckerSettings.solvers = smtutil::SMTSolverChoice::All();
else if (choice == "none")
auto const& choice = m_reader.stringSetting("SMTSolvers", "z3");
if (choice == "none")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed to reflect the new behavior of "z3 is default now".

ekpyron
ekpyron previously approved these changes Nov 23, 2022
Copy link
Member

@ekpyron ekpyron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine if tests pass.

ekpyron
ekpyron previously approved these changes Nov 23, 2022
Copy link
Member

@ekpyron ekpyron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still fine, if tests pass this time.

@@ -5,8 +5,8 @@ Warning: Return value of low-level calls not used.
| ^^^^^^^^^^^

Info: Contract invariant(s) for model_checker_invariants_all/input.sol:test:
((x <= 0) || true)
(!(x >= 1) || true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why this change? (x <= 0) and !(x >= 1) are equal, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, invariant and counterexample outputs are very nondeterministic, so the solver will choose an answer at its own discretion. As long as the results are correct you may get anything

@leonardoalt leonardoalt merged commit a00e6c6 into develop Nov 24, 2022
@leonardoalt leonardoalt deleted the z3_4_11_2_tests branch November 24, 2022 13:25
@@ -34,7 +34,7 @@ else
BUILD_DIR="$1"
fi

# solbuildpackpusher/solidity-buildpack-deps:emscripten-13
# solbuildpackpusher/solidity-buildpack-deps:emscripten-14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a bug here. The hash below has not been updated. Looks like the nightly build in solc-bin has been failing since Friday due to this:

-- Found Z3: /emsdk/upstream/emscripten/cache/sysroot/usr/lib/cmake/z3/Z3Config.cmake (found version "4.11.0.0") 
CMake Error at CMakeLists.txt:84 (message):
  SMTChecker tests require Z3 4.11.2 for all tests to pass.

  Build with -DSTRICT_Z3_VERSION=OFF if you want to use a different version.
  You can also use -DUSE_Z3=OFF to build without Z3.  In both cases use
  --no-smt when running tests.


-- Configuring incomplete, errors occurred!

Pinging @r0qs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True! Made a PR #13757

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, forgot about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants