考虑以下 SMT-LIB 代码:
(set-option :auto_config false)
(set-option :smt.mbqi false)
; (set-option :smt.case_split 3)
(set-option :smt.qi.profile true)
(declare-const x Int)
(declare-fun trigF (Int Int Int) Bool)
(declare-fun trigF$ (Int Int Int) Bool)
(declare-fun trigG (Int) Bool)
(declare-fun trigG$ (Int) Bool)
; Essentially noise
(declare-const y Int)
(assert (!
(not (= x y))
:named foo
))
; Essentially noise
(assert (forall ((x Int) (y Int) (z Int)) (!
(= (trigF$ x y z) (trigF x y z))
:pattern ((trigF x y z))
:qid |limited-F|
)))
; Essentially noise
(assert (forall ((x Int)) (!
(= (trigG$ x) (trigG x))
:pattern ((trigG x))
:qid |limited-G|
)))
; This assumption is relevant
(assert (forall ((a Int) (b Int) (c Int)) (!
(and
(trigG a)
(trigF a b c))
:pattern ((trigF a b c))
:qid |bar|
)))
试图断言公理bar
成立,即
(push)
(assert (not (forall ((a Int) (b Int) (c Int))
(and
(trigG a)
(trigF a b c)))))
(check-sat)
(pop)
失败(Z3 4.3.2 - 构建哈希码 47ac5c06333b):
unknown
[quantifier_instances] limited-G : 1 : 0 : 1
问题 1:为什么 Z3 只实例化limited-G
但不limited-F
实例化bar
(这将证明断言)?
问题 2:评论任何(无用的)断言foo
,limited-F
或limited-G
允许 Z3 证明断言 - 为什么会这样?(取决于注释的内容,仅bar
或bar
和limited-F
被实例化。)
如果它与观察到的行为有关:我想设置smt.case_split
为3
(我的配置遵循 MSR 的Boogie工具省略的配置),但 Z3 给了我WARNING: auto configuration (option AUTO_CONFIG) must be disabled to use option CASE_SPLIT=3, 4 or 5
,尽管(set-option :auto_config false)
.