Skip to content

Conversation

@leonardoalt
Copy link

@leonardoalt leonardoalt commented Jan 25, 2021

Waiting for #10844 to finish in order to update the Ubuntu and emscripten hashes here.
For now only t_archlinux and t_osx should pass.

Comment on lines -46 to +52
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
Copy link
Collaborator

@cameel cameel Jan 25, 2021

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 :)

Copy link
Author

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

@leonardoalt leonardoalt force-pushed the smt_z3_4-8-10 branch 4 times, most recently from da08fa4 to 23f4da9 Compare January 25, 2021 17:39
@leonardoalt
Copy link
Author

@cameel can you confirm that the hashes updated here are the same as the ones given in #10844 ? If you approve this PR, we can merge this and the other two pending. I'll update the osx_install_dependencies script in a different PR

cameel
cameel previously approved these changes Jan 25, 2021
Copy link
Collaborator

@cameel cameel left a 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))
Copy link
Contributor

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 :(

Copy link
Contributor

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...

Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

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

Added a comment

@leonardoalt
Copy link
Author

@cameel @bshastry can you reapprove

@leonardoalt leonardoalt merged commit 22ad64a into develop Jan 26, 2021
@leonardoalt leonardoalt deleted the smt_z3_4-8-10 branch January 26, 2021 10:37

// 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
Copy link
Contributor

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... ;)

Copy link
Author

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

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