你能告诉我如何在 z3 SMT-LIB 2.0 基准测试中命名断言吗?我更喜欢使用 SMT-LIB 的标准语法,但由于 z3 似乎不理解它,我只是在寻找一个使用 z3 的语法。需要获得带有标签的未饱和核心。
这是我测试的基准测试示例:
(set-option enable-cores)
(set-logic AUFLIA)
(declare-fun x () Int)
(declare-fun y () Int)
(declare-fun z () Int)
(assert (! (<= 0 x) :named hyp1))
(assert (! (<= 0 y) :named hyp2))
(assert (! (<= 0 z) :named hyp3))
(assert (! (< x y) :named hyp4))
(assert (! (and (<= 0 y) (<= y x)) :named hyp5))
(assert (! (not (= x z)) :named goal))
(check-sat)
(get-unsat-core)
由于矛盾(x < y 和 y <= x),我期待 unsat 核心 {hyp4, hyp5},但 z3 返回:
(error "ERROR: line 10 column 31: could not locate id hyp1.")
(error "ERROR: line 11 column 31: could not locate id hyp2.")
(error "ERROR: line 12 column 31: could not locate id hyp3.")
(error "ERROR: line 13 column 30: could not locate id hyp4.")
(error "ERROR: line 16 column 36: could not locate id hyp5.")
(error "ERROR: line 18 column 35: could not locate id goal.")
sat
()
我知道 z3 不理解这种命名方式,但我在 z3 文档中找不到另一种方式。
请问你能帮帮我吗?