我正在尝试使用 SMTLIB 接口为 Z3 定义集合理论(并集、交集等)。不幸的是,我当前的定义将 z3 挂起以进行微不足道的查询,所以我想我缺少一些简单的选项/标志。
这是永久链接: http ://rise4fun.com/Z3/JomY
(声明排序集) (declare-fun emp() 设置) (declare-fun add (Set Int) Set) (宣趣杯(套套)套) (declare-fun cap (Set Set) Set) (declare-fun dif (Set Set) Set) (declare-fun sub (Set Set) Bool) (declare-fun mem (Int Set) Bool) (assert (forall ((x Int)) (not (mem x emp)))) (assert (forall ((x Int) (s1 Set) (s2 Set)) (= (mem x (cup s1 s2)) (或 (mem x s1) (mem x s2))))) (assert (forall ((x Int) (s1 Set) (s2 Set)) (= (mem x (cap s1 s2)) (和 (mem x s1) (mem x s2))))) (assert (forall ((x Int) (s1 Set) (s2 Set)) (= (mem x (dif s1 s2)) (and (mem x s1) (not (mem x s2)))))) (assert (forall ((x Int) (s Set) (y Int)) (= (mem x (add sy)) (或 (mem xs) (= xy))))) (declare-fun z3v8 () Bool) (断言(不是 z3v8)) (检查周六)
关于我缺少什么的任何提示?
此外,据我所知,集合操作没有标准的 SMT-LIB2 编码,例如Z3.mk_set_{add,del,empty,...}
(这就是我试图通过量词获得该功能的原因。)对吗?还是有其他路线?
谢谢!
兰吉特。