Reputation: 10204
z3 -smt2 <filename>
only outputs 'sat' or 'unsat'. I would like that Z3 outputs the model if the constraint is satisfied, or the unsat core if unsatisfied. Which options of Z3 should I use?
Upvotes: 0
Views: 458
Reputation: 8393
There are no command line options for this as in SMTLIB2 they are separate commands, (get-model)
and (get-unsat-core)
, both only defined when (check-sat)
returns sat or unsat respectively.
The options model
and unsat-core
have to be enabled irrespective of whether those or other commands are used, just to make the solver tracks the right information, otherwise the (get-model)
and (get-unsat-core)
commands may fail later.
Upvotes: 2