mirror of
https://github.com/Z3Prover/z3
synced 2025-08-14 14:55:25 +00:00
debugging model generation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
56562a725d
commit
f41d23bc0f
4 changed files with 21 additions and 13 deletions
|
@ -29,6 +29,8 @@ Notes:
|
|||
#include "scoped_ctrl_c.h"
|
||||
#include "scoped_timer.h"
|
||||
#include "parametric_cmd.h"
|
||||
#include "opt_params.hpp"
|
||||
#include "model_smt2_pp.h"
|
||||
|
||||
class opt_context {
|
||||
cmd_context& ctx;
|
||||
|
@ -291,10 +293,22 @@ public:
|
|||
}
|
||||
}
|
||||
switch(r) {
|
||||
case l_true:
|
||||
case l_true: {
|
||||
ctx.regular_stream() << "sat\n";
|
||||
opt.display_assignment(ctx.regular_stream());
|
||||
opt_params optp(p);
|
||||
if (optp.print_model()) {
|
||||
model_ref mdl;
|
||||
opt.get_model(mdl);
|
||||
if (mdl) {
|
||||
ctx.regular_stream() << "(model " << std::endl;
|
||||
model_smt2_pp(ctx.regular_stream(), ctx, *(mdl.get()), 2);
|
||||
// m->display(ctx.regular_stream());
|
||||
ctx.regular_stream() << ")" << std::endl;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case l_false:
|
||||
ctx.regular_stream() << "unsat\n";
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue