-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Update smtCheckerTests for z3 4.8.10 #10845
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
Conversation
6058954 to
b023a08
Compare
| wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.9/z3-4.8.9-x64-osx-10.14.6.zip | ||
| unzip z3-4.8.9-x64-osx-10.14.6.zip | ||
| rm -f z3-4.8.9-x64-osx-10.14.6.zip | ||
| cp z3-4.8.9-x64-osx-10.14.6/bin/libz3.a /usr/local/lib | ||
| cp z3-4.8.9-x64-osx-10.14.6/bin/z3 /usr/local/bin | ||
| cp z3-4.8.9-x64-osx-10.14.6/include/* /usr/local/include | ||
| rm -rf z3-4.8.9-x64-osx-10.14.6 | ||
| wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.10/z3-4.8.10-x64-osx-10.15.7.zip | ||
| unzip z3-4.8.10-x64-osx-10.15.7.zip | ||
| rm -f z3-4.8.10-x64-osx-10.15.7.zip | ||
| cp z3-4.8.10-x64-osx-10.15.7/bin/libz3.a /usr/local/lib | ||
| cp z3-4.8.10-x64-osx-10.15.7/bin/z3 /usr/local/bin | ||
| cp z3-4.8.10-x64-osx-10.15.7/include/* /usr/local/include | ||
| rm -rf z3-4.8.10-x64-osx-10.15.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could really use a a variable or two :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, I'll do that when I get the tests to pass
da08fa4 to
23f4da9
Compare
cameel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They look the same and are assigned to the right images with correct versions.
| // let result := addmod(x, y, z) | ||
| // if 0 { } | ||
| // if and(and(lt(x, 1000), lt(y, 1000)), lt(z, 1000)) { if 1 { sstore(0, 9) } } | ||
| // if and(and(lt(x, 1000), lt(y, 1000)), lt(z, 1000)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bad and should not happen :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the encoding, result = wrap(x + y) % z while the condition below is (x + y) % z. With the restrictions in this line, z3 should be able to determine that the condition is 1.
On the other hand, if we switch to an LP solver, it will probably not understand it anyway...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should at least add a comment in this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment
23f4da9 to
5d51626
Compare
test/libyul/yulOptimizerTests/reasoningBasedSimplifier/addmod.yul
Outdated
Show resolved
Hide resolved
5d51626 to
40221a9
Compare
|
|
||
| // addmod is equal to mod of sum for small numbers | ||
| if and(and(lt(x, 1000), lt(y, 1000)), lt(z, 1000)) { | ||
| // z3 <4.8.10 was able to infer that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which was the only reason for this test file... ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea.. well, we can keep it for reference
Waiting for #10844 to finish in order to update the Ubuntu and emscripten hashes here.
For now only
t_archlinuxandt_osxshould pass.