mirror of
https://github.com/Z3Prover/z3
synced 2025-08-11 05:30:51 +00:00
Add option to use old_hyp_reducer
This commit is contained in:
parent
f0f75d5254
commit
85c58e344c
4 changed files with 53 additions and 32 deletions
|
@ -19,6 +19,7 @@ Notes:
|
|||
#include"muz/spacer/spacer_itp_solver.h"
|
||||
#include"ast/ast.h"
|
||||
#include"muz/spacer/spacer_util.h"
|
||||
#include"muz/base/proof_utils.h"
|
||||
#include"muz/spacer/spacer_farkas_learner.h"
|
||||
#include"ast/rewriter/expr_replacer.h"
|
||||
#include"muz/spacer/spacer_unsat_core_learner.h"
|
||||
|
@ -277,39 +278,56 @@ void itp_solver::get_itp_core (expr_ref_vector &core)
|
|||
}
|
||||
else
|
||||
{
|
||||
proof_ref res(get_proof(),m);
|
||||
|
||||
// new code
|
||||
// preprocess proof in order to get a proof which is better suited for unsat-core-extraction
|
||||
proof_ref pr(get_proof(), m);
|
||||
|
||||
if (m_print_farkas_stats)
|
||||
if (m_old_hyp_reducer)
|
||||
{
|
||||
iuc_proof iuc_before(m, pr.get(), B);
|
||||
verbose_stream() << "Stats before transformation:";
|
||||
iuc_before.print_farkas_stats();
|
||||
// preprocess proof in order to get a proof which is better suited for unsat-core-extraction
|
||||
if (m_print_farkas_stats)
|
||||
{
|
||||
iuc_proof iuc_before(m, res.get(), B);
|
||||
verbose_stream() << "\nStats before transformation:";
|
||||
iuc_before.print_farkas_stats();
|
||||
}
|
||||
|
||||
proof_utils::reduce_hypotheses(res);
|
||||
proof_utils::permute_unit_resolution(res);
|
||||
|
||||
if (m_print_farkas_stats)
|
||||
{
|
||||
iuc_proof iuc_after(m, res.get(), B);
|
||||
verbose_stream() << "Stats after transformation:";
|
||||
iuc_after.print_farkas_stats();
|
||||
}
|
||||
}
|
||||
|
||||
theory_axiom_reducer ta_reducer(m);
|
||||
proof_ref pr_without_theory_lemmas = ta_reducer.reduce(pr.get());
|
||||
|
||||
if (m_print_farkas_stats)
|
||||
else
|
||||
{
|
||||
iuc_proof iuc_mid(m, pr_without_theory_lemmas.get(), B);
|
||||
verbose_stream() << "Stats after first transformation:";
|
||||
iuc_mid.print_farkas_stats();
|
||||
// preprocess proof in order to get a proof which is better suited for unsat-core-extraction
|
||||
if (m_print_farkas_stats)
|
||||
{
|
||||
iuc_proof iuc_before(m, res.get(), B);
|
||||
verbose_stream() << "\nStats before transformation:";
|
||||
iuc_before.print_farkas_stats();
|
||||
}
|
||||
|
||||
theory_axiom_reducer ta_reducer(m);
|
||||
proof_ref pr_without_theory_lemmas = ta_reducer.reduce(res.get());
|
||||
|
||||
hypothesis_reducer hyp_reducer(m);
|
||||
proof_ref pr_with_less_hypothesis = hyp_reducer.reduce(pr_without_theory_lemmas);
|
||||
|
||||
if (m_print_farkas_stats)
|
||||
{
|
||||
iuc_proof iuc_after(m, pr_with_less_hypothesis.get(), B);
|
||||
verbose_stream() << "Stats after transformation:";
|
||||
iuc_after.print_farkas_stats();
|
||||
}
|
||||
res = pr_with_less_hypothesis;
|
||||
}
|
||||
|
||||
hypothesis_reducer hyp_reducer(m);
|
||||
proof_ref pr_with_less_hypothesis = hyp_reducer.reduce(pr_without_theory_lemmas);
|
||||
|
||||
if (m_print_farkas_stats)
|
||||
{
|
||||
iuc_proof iuc_after(m, pr_with_less_hypothesis.get(), B);
|
||||
verbose_stream() << "Stats after second transformation:";
|
||||
iuc_after.print_farkas_stats();
|
||||
}
|
||||
|
||||
|
||||
// construct proof object with contains partition information
|
||||
iuc_proof iuc_pr(m, pr_with_less_hypothesis, B);
|
||||
iuc_proof iuc_pr(m, res, B);
|
||||
|
||||
// configure learner
|
||||
unsat_core_learner learner(m, iuc_pr, m_print_farkas_stats, m_iuc_debug_proof);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue