【发布时间】:2012-04-18 06:07:50
【问题描述】:
我正在尝试在 z3 的 smt-lib 2 语法中编码 QBF。运行 z3 会导致警告
警告:找不到量词的模式(量词 id:k!14)
并且可满足性结果为“未知”。
代码如下:
(declare-fun R (Bool Bool Bool Bool) Bool)
(assert
(forall ((x2 Bool) (x3 Bool))
(exists ((y Bool))
(forall ((x1 Bool))
(R x1 x2 x3 y)
)
)
)
)
(check-sat)
我通过重写代码来消除警告
(set-option :auto-config false)
(set-option :mbqi false)
(declare-fun R (Bool Bool Bool Bool) Bool)
(declare-fun x1 () Bool)
(declare-fun x2 () Bool)
(declare-fun x3 () Bool)
(declare-fun y () Bool)
(assert
(forall ((x2 Bool) (x3 Bool))
(!
(exists ((y Bool))
(!
(forall ((x1 Bool))
(!
(R x1 x2 x3 y)
:pattern((R x1 x2 x3 y)))
)
:pattern((R x1 x2 x3 y)))
)
:pattern((R x1 x2 x3 y)))
)
)
(check-sat)
但是,卫星查询的结果仍然“未知”。
我猜我需要得到正确的模式?如何为嵌套量词指定它们?不过,带有量词的更简单示例似乎在没有模式注释的情况下也能工作。
很遗憾,What is the reason behind the warning message in Z3: "failed to find a pattern for quantifier (quantifier id: k!18) " 的答案和 z3 指南对我没有太大帮助。
【问题讨论】:
标签: z3