Z3 QBVF问题
继之前的讨论之后:Z3:提取存在模型值
有什么区别之间:
(declare-fun sx ((_ BitVec 16)) (_ BitVec 16))
(assert (forall ((y (_ BitVec 16))) (bvuge y (sx y))))
至于
(declare-fun sx ((_ BitVec 16)) (_ BitVec 16))
(declare-fun y () (_ BitVec 16))
(assert (bvuge y (sx y)))
Z3呢?也就是说,我仍然会自动获得后者的 QBVF 求解器吗?
另外,经过实验,我发现如果我发出:
(eval (sx #x8000))
在 (check-sat)
调用之后,它工作正常(这很棒)。 那就更好了
(eval (sx (get-value (y))))
如果我还可以说:唉,对于该查询,Z3 抱怨它是一个无效的函数应用程序
, 。有没有办法以这种方式使用eval
函数?
谢谢!
Following up to the previous discussion: Z3: Extracting existential model-values
Is there a difference between:
(declare-fun sx ((_ BitVec 16)) (_ BitVec 16))
(assert (forall ((y (_ BitVec 16))) (bvuge y (sx y))))
And
(declare-fun sx ((_ BitVec 16)) (_ BitVec 16))
(declare-fun y () (_ BitVec 16))
(assert (bvuge y (sx y)))
As far as Z3 is concerned? That is, will I still get the QBVF solver for the latter automatically?
Also, upon experimentation I found that if I issue:
(eval (sx #x8000))
After a (check-sat)
call, it works fine (which is great). What would be better is if I could also say:
(eval (sx (get-value (y))))
Alas, for that query Z3 complains that it's an invalid function application
. Is there a way to use the eval
function in that manner?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
脚本
和
并不等效。第二个实际上可以满足
关于eval命令,您可以引用任何未解释的常量和函数符号。因此,您可以编写:
命令
(eval (sx y))
对于第一个脚本不起作用,因为y
是通用变量。The scripts
and
are not equivalent. The second is actually equisatisfiable to
Regarding the
eval
command, you can reference any uninterpreted constant and function symbol. Thus, you can write:The command
(eval (sx y))
will not work for the first script becausey
is a universal variable.