Z3无效的功能应用程序,args缺失

时间:2017-09-19 02:01:51

标签: z3

这是我第一次使用Z3并且我试图找到给定表单的所有坐标真值分配,它一直在抛出:

Z3(5, 10): ERROR: invalid function application, arguments missing

(echo "((p => q) v (q => p)) ^ ~((p => q) ^ (q => p)))")
(declare-const p Bool)
(declare-const q Bool)
(assert (and(or(=> p q)(=> q p)) (not(and(=> p q) (=> q p)))
(check-sat)
(get-model)
(assert (or (=> p q)(=> qp)))
(assert (not(and(=> p q) (=> q p)))
(check-sat)
(get-model)

1 个答案:

答案 0 :(得分:1)

你需要更多正确的括号。

(echo "((p => q) v (q => p)) ^ ~((p => q) ^ (q => p)))")
(declare-const p Bool)
(declare-const q Bool)
(assert (and(or(=> p q)(=> q p)) (not(and(=> p q) (=> q p)))))
(check-sat)

(get-model)
(assert (or (=> p q)(=> q p)))
(assert (not(and(=> p q) (=> q p))))
(check-sat)
(get-model)