【发布时间】:2020-11-25 08:11:03
【问题描述】:
我正在尝试使用 SMTLIB 格式来表达 Z3 中的集合成员资格:
(declare-const a (Set Int))
;; the next two lines parse correctly in CVC4, but not Z3:
(assert (= a (as emptyset (Set Int))))
(assert (member 12 a))
;; these work in both solvers
(assert (= a (union a a)))
(assert (subset a a))
(assert (= a (intersection a a)))
(check-sat)
函数 emptyset 和 member 在 CVC4 中似乎可以按预期进行解析,但在 Z3 中却没有。
通过检查 API(例如,这里:https://z3prover.github.io/api/html/group__capi.html),Z3 确实以编程方式支持空集和成员资格,但是如何用 SMTLIB 语法表达这些?
【问题讨论】: