mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
bug fixes to new core, elim_predicates and elim_unconstrained
This commit is contained in:
parent
b9a87e493b
commit
42076a3c13
10 changed files with 42 additions and 30 deletions
|
@ -67,7 +67,7 @@ namespace euf {
|
|||
m_qmodel = mdl;
|
||||
}
|
||||
|
||||
void solver::update_model(model_ref& mdl) {
|
||||
void solver::update_model(model_ref& mdl, bool validate) {
|
||||
TRACE("model", tout << "create model\n";);
|
||||
if (m_qmodel) {
|
||||
mdl = m_qmodel;
|
||||
|
@ -87,7 +87,8 @@ namespace euf {
|
|||
for (auto* mb : m_solvers)
|
||||
mb->finalize_model(*mdl);
|
||||
TRACE("model", tout << "created model " << *mdl << "\n";);
|
||||
validate_model(*mdl);
|
||||
if (validate)
|
||||
validate_model(*mdl);
|
||||
}
|
||||
|
||||
bool solver::include_func_interp(func_decl* f) {
|
||||
|
|
|
@ -478,8 +478,13 @@ namespace euf {
|
|||
m_ackerman->cg_conflict_eh(a, b);
|
||||
switch (s().value(lit)) {
|
||||
case l_true:
|
||||
if (n->merge_tf() && !m.is_value(n->get_root()->get_expr()))
|
||||
m_egraph.merge(n, ante, to_ptr(lit));
|
||||
if (!n->merge_tf())
|
||||
break;
|
||||
if (m.is_value(n->get_root()->get_expr()))
|
||||
break;
|
||||
if (!ante)
|
||||
ante = mk_true();
|
||||
m_egraph.merge(n, ante, to_ptr(lit));
|
||||
break;
|
||||
case l_undef:
|
||||
case l_false:
|
||||
|
|
|
@ -495,7 +495,7 @@ namespace euf {
|
|||
|
||||
// model construction
|
||||
void save_model(model_ref& mdl);
|
||||
void update_model(model_ref& mdl);
|
||||
void update_model(model_ref& mdl, bool validate);
|
||||
obj_map<expr, enode*> const& values2root();
|
||||
void model_updated(model_ref& mdl);
|
||||
expr* node2value(enode* n) const;
|
||||
|
|
|
@ -635,7 +635,7 @@ namespace q {
|
|||
if (m_model)
|
||||
return;
|
||||
m_model = alloc(model, m);
|
||||
ctx.update_model(m_model);
|
||||
ctx.update_model(m_model, false);
|
||||
}
|
||||
|
||||
void mbqi::init_solver() {
|
||||
|
|
|
@ -987,7 +987,7 @@ struct goal2sat::imp : public sat::sat_internalizer {
|
|||
void update_model(model_ref& mdl) {
|
||||
auto* ext = dynamic_cast<euf::solver*>(m_solver.get_extension());
|
||||
if (ext)
|
||||
ext->update_model(mdl);
|
||||
ext->update_model(mdl, true);
|
||||
}
|
||||
|
||||
void user_push() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue