You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I compiled it with g++ test.cc -lz3 -L./z3/ -I./z3/include -o test, and I got the following when I execute the ./test:
zeroext : ((_ zero_extend 32) zz)
and_test : null
I got a null expression as z3 reported. However, when I replaced the line expr and_test = zeroext & const_test1; with expr and_test = zeroext & 0x8000000;, I got the expected outputs:
The two expressions zeroext and const_test1 have different bit-widths, zeroext has bit-width 48, while onst_test1 has width 32.
This is a type error that the C++ interface silently ignores. I have updated z3++.h to include error checking at places I saw them missing. Your program will now "crash" with an exception
Argument #x08000000 at position 1 has sort (_ BitVec 32) it does does not match declaration (declare-fun bvand ((_ BitVec 48) (_ BitVec 48)) (_ BitVec 48))
Hi,
Please consider the following source file
test.cc
which uses z3 APIs,I compiled it with
g++ test.cc -lz3 -L./z3/ -I./z3/include -o test
, and I got the following when I execute the./test
:I got a
null
expression as z3 reported. However, when I replaced the lineexpr and_test = zeroext & const_test1;
withexpr and_test = zeroext & 0x8000000;
, I got the expected outputs:The z3 version I used is
Z3 version 4.8.14 - 64 bit
.Is it a possible issue in z3, or did I miss anything here? Thank you very much for your help.
Best,
Haoxin
The text was updated successfully, but these errors were encountered: