为什么Z3';s`get value`返回表达式而不是具体值?

为什么Z3';s`get value`返回表达式而不是具体值?,z3,Z3,get value调用返回一个表达式而不是具体值#b01: sat (((trans_local true true (_ bv2 2)) (ite #b10 #b01 (ite #b00 (ite #b10 #b11 #b01) (ite #b01 (ite #b10 #b10 #b00) #b01))))) simplify的结果也是一样的(而且可能应该如此)。如何使用get value获得正确的结果 以下是查询: (set-logic UFBV) (set-option

get value
调用返回一个表达式而不是具体值
#b01

  sat
  (((trans_local true true (_ bv2 2)) (ite #b10 #b01 (ite #b00 (ite #b10 #b11 #b01) (ite #b01 (ite #b10 #b10 #b00) #b01)))))
simplify
的结果也是一样的(而且可能应该如此)。如何使用
get value
获得正确的结果

以下是查询:

  (set-logic UFBV)
  (set-option :produce-models true)

  (define-fun trans_local ((x!1 (_ BitVec 2)) (x!2 Bool) (x!3 Bool)) (_ BitVec 2)
  (ite (= x!1 #b10)
   (ite x!2 #b01 #b00)
   (ite (= x!1 #b00)
    (ite (and x!2 x!3) 
     #b11 
     (ite (and (not x!2) x!3)
      #b10
      (ite (and (not x!2) (not x!3)) #b00 #b01)))
    (ite (= x!1 #b01) (ite (and x!2 x!3) #b10 (ite (and (not x!2) x!3) #b10 #b00)) #b01)))
  )

  (check-sat)

  (get-value ((trans_local true true (_ bv2 2))))

你的表情分类不好。在Z3中,
define fun
本质上是一个宏。Z3.2不检查宏应用程序是否正确排序。因此,您没有收到任何错误消息。这一问题已经解决,该问题将在下一个版本z34.0中提供。 也就是说,您可以通过修复
get value
语句中的排序错误来获得预期的结果。我猜,你打算写:

  (get-value ((trans_local (_ bv1 2) true true)))

哦,天哪,星期五晚上!我的错误。。谢谢