Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Z3 如何统一SMT-LIB中的变量_Z3_Smt_Quantifiers_Unification - Fatal编程技术网

Z3 如何统一SMT-LIB中的变量

Z3 如何统一SMT-LIB中的变量,z3,smt,quantifiers,unification,Z3,Smt,Quantifiers,Unification,我试图在SMT-LIB中执行此操作,在包含以下表达式的脚本上运行z3-smt2 script.smt2: (set-logic AUFLIA) (declare-fun a () Int) (declare-fun b () Int) (declare-fun c () Int) (declare-fun d () Int) (declare-fun e () Int) (declare-fun f () Int) (declare-fun x () Int) (declare-fun c (

我试图在SMT-LIB中执行此操作,在包含以下表达式的脚本上运行
z3-smt2 script.smt2

(set-logic AUFLIA)

(declare-fun a () Int)
(declare-fun b () Int)
(declare-fun c () Int)
(declare-fun d () Int)
(declare-fun e () Int)
(declare-fun f () Int)
(declare-fun x () Int)
(declare-fun c () Int)

(declare-fun addition (Int Int) Int)

(assert (= x c))
(assert (= c (addition a b)))
(assert (= f (addition d e)))

(check-sat)
我想得到这些变量的统一。例如,我希望能够通过分配
x=f
a=d
b=e
来统一变量

甚至可以在
z3
SMT-LIB
中执行此操作吗


或者我应该使用其他语言来实现这一点(也许给出一个建议,这就是您所想的吗?

如果Z3明确支持您描述的功能,我会有点惊讶。您是在Z3的上下文中搜索变量消除还是最小模型?另外,一种(麻烦的)方法可能是在添加显式等式(如
x=f
)的同时重复查询Z3,并记录使用了最多等式且仍然可以满足的查询。是的,我认为没有明确的方法来做到这一点。您可以执行
(获取模型)
,获取具有不同整数赋值的变量不能等价,而具有相同整数赋值的变量可以相互替换。