【问题标题】:z3 incorrectly saying UNSATz3 错误地说 UNSAT
【发布时间】:2016-07-24 03:19:07
【问题描述】:

对于以下问题,解决方案存在,但 z3 显示为 UNSAT。

(set-logic QF_UFNRA)
(declare-fun a () Real)
(declare-fun b () Real)
(declare-fun c () Real)
(declare-fun d () Real)
(declare-fun e () Real)
(declare-fun f () Real)
(declare-fun g () Real)
(declare-fun h () Real)
(assert (and (<= a 1.0) (> a 0.0)))
(assert (and (<= b 1.0) (> b 0.0)))
(assert (and (<= c 1.0) (> c 0.0)))
(assert (and (<= d 1.0) (> d 0.0)))
(assert (and (<= e 1.0) (>= e 0.0)))
(assert (and (<= f 1.0) (>= f 0.0)))
(assert (and (<= g 1.0) (>= g 0.0)))
(assert (and (<= h 1.0) (>= h 0.0)))
(assert (= (* (+ a b) (+ a c)) a))
(assert (= (* (+ a b) (+ b d)) b))
(assert (= (* (+ a c) (+ c d)) c))
(assert (= (* (+ b d) (+ c d)) d))
(assert (= (+ a b c d e f g h) 1.0))
(check-sat)

有效解决方案:

a = 1/12, b = 1/4, c = 1/6, d = 1/2, e = f = g = h = 0 

我不明白为什么 z3 说 unsat。

z3 版本是 z3-4.3.0-x64。

【问题讨论】:

    标签: z3 smt


    【解决方案1】:

    我不知道rise4fun (http://rise4fun.com/z3) 上的z3 版本是什么。我刚刚测试了它,它说的是SAT。它返回您提供的模型。

    【讨论】:

    • 来自github的最新版本也给出了正确答案。我猜这个错误是从 4.​​3.0 版本开始修复的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-10
    • 2022-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多