mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
Merge branch 'unstable' of https://github.com/Z3Prover/z3 into unstable
This commit is contained in:
commit
81eecafa66
12 changed files with 124 additions and 37 deletions
|
@ -252,6 +252,7 @@ void asserted_formulas::reduce() {
|
|||
TRACE("before_reduce", display(tout););
|
||||
CASSERT("well_sorted", check_well_sorted());
|
||||
|
||||
|
||||
#define INVOKE(COND, FUNC) if (COND) { FUNC; IF_VERBOSE(10000, verbose_stream() << "total size: " << get_total_size() << "\n";); } TRACE("reduce_step_ll", ast_mark visited; display_ll(tout, visited);); TRACE("reduce_step", display(tout << #FUNC << " ");); CASSERT("well_sorted",check_well_sorted()); if (inconsistent() || canceled()) { TRACE("after_reduce", display(tout);); TRACE("after_reduce_ll", ast_mark visited; display_ll(tout, visited);); return; }
|
||||
|
||||
set_eliminate_and(false); // do not eliminate and before nnf.
|
||||
|
|
|
@ -115,8 +115,7 @@ namespace smt {
|
|||
break;
|
||||
case eq_justification::CONGRUENCE: {
|
||||
TRACE("conflict_detail", tout << "#" << lhs->get_owner_id() << " = " << rhs->get_owner_id() << " congruence\n";);
|
||||
if (!lhs->is_eq())
|
||||
TRACE("dyn_ack_target", tout << "dyn_ack_target2: " << lhs->get_owner_id() << " " << rhs->get_owner_id() << "\n";);
|
||||
CTRACE("dyn_ack_target", !lhs->is_eq(), tout << "dyn_ack_target2: " << lhs->get_owner_id() << " " << rhs->get_owner_id() << "\n";);
|
||||
m_dyn_ack_manager.used_cg_eh(lhs->get_owner(), rhs->get_owner());
|
||||
unsigned num_args = lhs->get_num_args();
|
||||
SASSERT(num_args == rhs->get_num_args());
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace smt {
|
|||
// }
|
||||
TRACE("setup", tout << "configuring logical context, logic: " << m_logic << "\n";);
|
||||
m_already_configured = true;
|
||||
|
||||
switch (cm) {
|
||||
case CFG_BASIC: setup_unknown(); break;
|
||||
case CFG_LOGIC: setup_default(); break;
|
||||
|
@ -550,6 +551,7 @@ namespace smt {
|
|||
m_params.m_bv_cc = false;
|
||||
m_params.m_bb_ext_gates = true;
|
||||
m_params.m_nnf_cnf = false;
|
||||
m_params.m_propagate_booleans = true;
|
||||
m_context.register_plugin(alloc(smt::theory_bv, m_manager, m_params, m_params));
|
||||
m_context.register_plugin(alloc(smt::theory_array, m_manager, m_params));
|
||||
}
|
||||
|
|
|
@ -161,9 +161,11 @@ public:
|
|||
|
||||
struct scoped_init_ctx {
|
||||
smt_tactic & m_owner;
|
||||
smt_params m_params; // smt-setup overwrites parameters depending on the current assertions.
|
||||
|
||||
scoped_init_ctx(smt_tactic & o, ast_manager & m):m_owner(o) {
|
||||
smt::kernel * new_ctx = alloc(smt::kernel, m, o.fparams());
|
||||
m_params = o.fparams();
|
||||
smt::kernel * new_ctx = alloc(smt::kernel, m, m_params);
|
||||
TRACE("smt_tactic", tout << "logic: " << o.m_logic << "\n";);
|
||||
new_ctx->set_logic(o.m_logic);
|
||||
if (o.m_callback) {
|
||||
|
@ -199,7 +201,8 @@ public:
|
|||
<< " PREPROCESS: " << fparams().m_preprocess << "\n";
|
||||
tout << "RELEVANCY: " << fparams().m_relevancy_lvl << "\n";
|
||||
tout << "fail-if-inconclusive: " << m_fail_if_inconclusive << "\n";
|
||||
tout << "params_ref: " << m_params_ref << "\n";);
|
||||
tout << "params_ref: " << m_params_ref << "\n";
|
||||
tout << "nnf: " << fparams().m_nnf_cnf << "\n";);
|
||||
TRACE("smt_tactic_detail", in->display(tout););
|
||||
TRACE("smt_tactic_memory", tout << "wasted_size: " << m.get_allocator().get_wasted_size() << "\n";);
|
||||
scoped_init_ctx init(*this, m);
|
||||
|
@ -239,7 +242,6 @@ public:
|
|||
else
|
||||
r = m_ctx->check(assumptions.size(), assumptions.c_ptr());
|
||||
m_ctx->collect_statistics(m_stats);
|
||||
|
||||
switch (r) {
|
||||
case l_true: {
|
||||
if (m_fail_if_inconclusive && !in->sat_preserved())
|
||||
|
|
|
@ -235,13 +235,14 @@ namespace smt {
|
|||
}
|
||||
|
||||
app* mk_bv_constant(uint64 val, sort* s) {
|
||||
return b().mk_numeral(rational(val,rational::ui64()),64);
|
||||
return b().mk_numeral(rational(val, rational::ui64()), 64);
|
||||
}
|
||||
|
||||
app* max_value(sort* s) {
|
||||
uint64 sz;
|
||||
VERIFY(u().try_get_size(s, sz));
|
||||
return mk_bv_constant(sz, s);
|
||||
SASSERT(sz > 0);
|
||||
return mk_bv_constant(sz-1, s);
|
||||
}
|
||||
|
||||
void mk_lt(app* x, app* y) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue