3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-02 08:10:43 +00:00

reorganizing the code

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-25 11:28:03 -07:00
parent 9c057b87d1
commit f57d4b1b19
34 changed files with 602 additions and 181 deletions

View file

@ -250,31 +250,36 @@ namespace qe {
proof_converter_ref & pc,
expr_dependency_ref& core)
{
checkpoint();
reset();
ptr_vector<expr> fmls;
goal->get_formulas(fmls);
m_fml = m.mk_and(fmls.size(), fmls.c_ptr());
TRACE("qe", tout << "input: " << mk_pp(m_fml,m) << "\n";);
simplify_rewriter_star rw(m);
expr_ref tmp(m);
rw(m_fml, tmp);
m_fml = tmp;
TRACE("qe", tout << "reduced: " << mk_pp(m_fml,m) << "\n";);
skolemize_existential_prefix();
extract_alt_form(m_fml);
model_ref model;
expr_ref res = qt(0, m.mk_true(), model);
goal->inc_depth();
if (m.is_false(res)) {
goal->assert_expr(res);
try {
checkpoint();
reset();
ptr_vector<expr> fmls;
goal->get_formulas(fmls);
m_fml = m.mk_and(fmls.size(), fmls.c_ptr());
TRACE("qe", tout << "input: " << mk_pp(m_fml,m) << "\n";);
simplify_rewriter_star rw(m);
expr_ref tmp(m);
rw(m_fml, tmp);
m_fml = tmp;
TRACE("qe", tout << "reduced: " << mk_pp(m_fml,m) << "\n";);
skolemize_existential_prefix();
extract_alt_form(m_fml);
model_ref model;
expr_ref res = qt(0, m.mk_true(), model);
goal->inc_depth();
if (m.is_false(res)) {
goal->assert_expr(res);
}
else {
goal->reset();
// equi-satisfiable. What to do with model?
mc = model2model_converter(&*model);
}
result.push_back(goal.get());
}
else {
goal->reset();
// equi-satisfiable. What to do with model?
mc = model2model_converter(&*model);
catch (rewriter_exception & ex) {
throw tactic_exception(ex.msg());
}
result.push_back(goal.get());
}
virtual void collect_statistics(statistics & st) const {