(get-unsat-core) returns empty in Z3

后端 未结 1 1323
庸人自扰
庸人自扰 2020-12-16 20:25

I am using Z3 to extract the unsat-core of an unsatisfiable formula. I am using Z3@Rise interface (web based) to write the following code,

(set-logic QF_LIA)         


        
相关标签:
1条回答
  • 2020-12-16 20:40

    You need to add name labels to your assertions so get-unsat-core has labels to use in the unsat core output. Write your assertions like this:

    (assert (! one :named a1))
    (assert (! two :named a2))
    (assert (! three :named a3))
    (assert (! four :named a4))
    (assert (! five :named a5))
    (assert (! six :named a6))
    (assert (! secondpartA :named spA))
    (assert (! secondpartB :named spB))
    

    and get-unsat-core will print an unsat core.

    Documentation for this syntax can be found in the SMTLIB tutorial (PDF file).

    0 讨论(0)
提交回复
热议问题