Z3 : Questions About Z3 int2bv?

百般思念 提交于 2019-11-28 05:46:19

问题


I'm a little confused with the Z3 (smt2 format ) operation int2bv . I wrote a such smt2 expression :

(declare-const t1 Int)
(assert (= ((_ int2bv 2) t1) #b11))
(check-sat)
(get-model)

when I solve it with Z3 ,it got:

sat
(model 
  (define-fun t1 () Int
    0)
)

Is that correct? Shouldn't t1 be 3? I thought the int2bv operation just transform the int value to the equivalent bitvector value. But it seems not!

Thanks!


回答1:


The int2bv function is essentially handled as uninterpreted (as stated in the documentation), so the semantics are not precise. There have previously been a few questions about those conversion functions, they might be helpful here too:

Z3: an exception with int2bv

Check overflow with Z3

bv-enable-int2bv-propagation option



来源:https://stackoverflow.com/questions/27914582/z3-questions-about-z3-int2bv

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!