mirror of
https://github.com/Z3Prover/z3
synced 2025-08-23 19:47:52 +00:00
add diagnostics option to new arithmetic solver
This commit is contained in:
parent
839b7101ae
commit
8d4e7fac6b
4 changed files with 24 additions and 1 deletions
|
@ -15,6 +15,8 @@ Author:
|
|||
|
||||
--*/
|
||||
|
||||
#include "util/cancel_eh.h"
|
||||
#include "util/scoped_timer.h"
|
||||
#include "ast/ast_util.h"
|
||||
#include "ast/scoped_proof.h"
|
||||
#include "sat/smt/euf_solver.h"
|
||||
|
@ -242,4 +244,21 @@ namespace arith {
|
|||
|
||||
return m.mk_app(symbol(name), args.size(), args.data(), m.mk_proof_sort());
|
||||
}
|
||||
|
||||
bool solver::validate_conflict() {
|
||||
scoped_ptr<::solver> vs = mk_smt2_solver(m, ctx.s().params(), symbol::null);
|
||||
for (auto lit : m_core)
|
||||
vs->assert_expr(ctx.literal2expr(lit));
|
||||
|
||||
for (auto [a, b] : m_eqs)
|
||||
vs->assert_expr(m.mk_eq(a->get_expr(), b->get_expr()));
|
||||
|
||||
cancel_eh<reslimit> eh(m.limit());
|
||||
scoped_timer timer(1000, &eh);
|
||||
bool result = l_true != vs->check_sat();
|
||||
CTRACE("arith", !result, vs->display(tout));
|
||||
CTRACE("arith", !result, s().display(tout));
|
||||
SASSERT(result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue