是否可以选择将位向量漂亮地打印为有符号小数?
如何在 Z3 中将位向量漂亮地打印为有符号小数?
How can you pretty-print bit vectors as signed decimals in Z3?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何在 Z3 中将位向量漂亮地打印为有符号小数?
How can you pretty-print bit vectors as signed decimals in Z3?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您可以使用命令
(set-option :pp-bv-literals false)
强制Z3以基于十进制的格式显示位向量文字。实际上,它将使用 SMT 2.0 格式显示它们:(_ bv)
。考虑以下示例:Z3 将打印
Z3 不支持有符号小数。我们可以添加一个选项,如果
n 的最高有效位为
是 1。这足以满足您的目的吗?(bvneg (_ bv)
,则将位向量n
显示为(bvneg (_ bv)
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
n
as(bvneg (_ bv<decimal> <size>)
if the most significant bit ofn
is 1. Is this enough for your purposes?