簡體   English   中英

從.smt2文件使用Z3獲取UNSAT Core

[英]Get UNSAT Core using Z3 from .smt2 file


我需要從z3獲得unsat核心。 .smt2文件的內容是:
(set-option :produce-unsat-cores true) (set-logic QF_AUFBV ) (declare-fun a () (Array (_ BitVec 32) (_ BitVec 8) ) ) ; Constraints (! (assert (bvslt (concat (select a (_ bv3 32) ) (concat (select a (_ bv2 32) ) (concat (select a (_ bv1 32) ) (select a (_ bv0 32) ) ) ) ) (_ bv10 32) ) ) :named ?U0) (! (assert (bvslt (_ bv10 32) (concat (select a (_ bv3 32) ) (concat (select a (_ bv2 32) ) (concat (select a (_ bv1 32) ) (select a (_ bv0 32) ) ) ) ) ) ) :named ?U1) (check-sat) (get-unsat-core) (exit)

運行z3時,我得到以下輸出:
unsupported ; ! unsupported ; ! sat (error "line 11 column 15: unsat core is not available")
我是z3的新手,無法理解這里發生的事情(我確定表達式是不滿意的)。
謝謝。

你用! 不正確。 感嘆號用於命名公式(不是斷言)。 請參閱教程中的 3.9.8節。

這應該解決它: (assert (! (bvslt ...) :named ?U0))

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM