How can you pretty-print bit vectors as signed decimals in Z3?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the command
(set-option :pp-bv-literals false)to force Z3 to display the bit-vector literals in a decimal based format. Actually, it will display them using the SMT 2.0 format:(_ bv<decimal> <size>). Consider the following example:Z3 will print
Z3 has no support for signed decimals. We can add an option to display a bit-vector
nas(bvneg (_ bv<decimal> <size>)if the most significant bit ofnis 1. Is this enough for your purposes?