3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-31 23:34:55 +00:00

Merge branch 'master' of https://github.com/z3prover/z3 into polysat

This commit is contained in:
Nikolaj Bjorner 2021-08-30 10:00:58 -07:00
commit 39f50d46cc
82 changed files with 1049 additions and 599 deletions

View file

@ -30,7 +30,6 @@ z3_add_component(smt
smt_farkas_util.cpp
smt_for_each_relevant_expr.cpp
smt_implied_equalities.cpp
smt_induction.cpp
smt_internalizer.cpp
smt_justification.cpp
smt_kernel.cpp

View file

@ -137,6 +137,8 @@ namespace smt {
for (unsigned i = 0; i < src_af.get_num_formulas(); ++i) {
expr_ref fml(dst_m);
proof_ref pr(dst_m);
if (src_m.is_true(src_af.get_formula(i)))
continue;
proof* pr_src = src_af.get_formula_proof(i);
fml = tr(src_af.get_formula(i));
if (pr_src) {
@ -159,6 +161,8 @@ namespace smt {
}
expr_ref fml0(src_m), fml1(dst_m);
src_ctx.literal2expr(lit, fml0);
if (src_m.is_true(fml0))
continue;
fml1 = tr(fml0.get());
dst_ctx.assert_expr(fml1);
}
@ -1667,16 +1671,6 @@ namespace smt {
!m_th_diseq_propagation_queue.empty();
}
/**
\brief retrieve facilities for creating induction lemmas.
*/
induction& context::get_induction() {
if (!m_induction) {
m_induction = alloc(induction, *this, get_manager());
}
return *m_induction;
}
/**
\brief unit propagation.
Cancelation is not safe during propagation at base level because
@ -2886,7 +2880,7 @@ namespace smt {
solver::push_eh_t& push_eh,
solver::pop_eh_t& pop_eh,
solver::fresh_eh_t& fresh_eh) {
setup_context(m_fparams.m_auto_config);
setup_context(false);
m_user_propagator = alloc(user_propagator, *this);
m_user_propagator->add(ctx, push_eh, pop_eh, fresh_eh);
for (unsigned i = m_scopes.size(); i-- > 0; )

View file

@ -33,7 +33,6 @@ Revision History:
#include "smt/smt_statistics.h"
#include "smt/smt_conflict_resolution.h"
#include "smt/smt_relevancy.h"
#include "smt/smt_induction.h"
#include "smt/smt_case_split_queue.h"
#include "smt/smt_almost_cg_table.h"
#include "smt/smt_failure.h"
@ -184,7 +183,6 @@ namespace smt {
unsigned m_simp_qhead { 0 };
int m_simp_counter { 0 }; //!< can become negative
scoped_ptr<case_split_queue> m_case_split_queue;
scoped_ptr<induction> m_induction;
double m_bvar_inc { 1.0 };
bool m_phase_cache_on { true };
unsigned m_phase_counter { 0 }; //!< auxiliary variable used to decide when to turn on/off phase caching
@ -1323,7 +1321,6 @@ namespace smt {
public:
bool can_propagate() const;
induction& get_induction();
// Retrieve arithmetic values.
bool get_arith_lo(expr* e, rational& lo, bool& strict);

View file

@ -423,8 +423,14 @@ namespace smt {
m_value2expr.reset();
TRACE("model_checker", tout << "MODEL_CHECKER INVOKED\n";
tout << "model:\n"; model_pp(tout, *m_curr_model););
tout << "model:\n"; model_pp(tout, *m_curr_model););
for (quantifier* q : *m_qm)
if (m.is_lambda_def(q)) {
md->add_lambda_defs();
break;
}
md->compress();
TRACE("model_checker", tout << "MODEL_CHECKER INVOKED\n";

View file

@ -454,6 +454,11 @@ namespace smt {
expr * args[] = { bv_val_a->get_arg(0), bv_val_a->get_arg(1), bv_val_a->get_arg(2) };
cc_args = m_bv_util.mk_concat(3, args);
c = m.mk_eq(wrapped, cc_args);
// NB code review: #5454 exposes a bug in fpa_solver that
// could be latent here as well. It needs also the equality
// n == bv_val_e to be asserted such that whenever something is assigned th
// bit-vector value cc_args it is equated with n
// I don't see another way this constraint would be enforced.
assert_cnstr(c);
assert_cnstr(mk_side_conditions());
}

View file

@ -18,6 +18,7 @@ Revision History:
--*/
#pragma once
#include "util/scoped_ptr_vector.h"
#include "smt/smt_theory.h"
#include "smt/smt_context.h"
#include "ast/ast_pp.h"

View file

@ -3191,10 +3191,8 @@ void theory_seq::relevant_eh(app* n) {
if (m_util.str.is_replace_all(n) ||
m_util.str.is_replace_re(n) ||
m_util.str.is_replace_re_all(n) ||
// m_util.str.is_from_code(n) ||
// m_util.str.is_to_code(n) ||
m_util.str.is_is_digit(n)) {
m_util.str.is_replace_re_all(n)
) {
add_unhandled_expr(n);
}
}