mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 11:25:51 +00:00
Simplified asserted_formulas. From now on, we should use tactics for qe, der, solve, etc.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
4237ac0dbf
commit
026c81ba29
15 changed files with 20 additions and 975 deletions
|
@ -26,7 +26,6 @@ Revision History:
|
|||
#include"macro_manager.h"
|
||||
#include"macro_finder.h"
|
||||
#include"defined_names.h"
|
||||
#include"solver_plugin.h"
|
||||
#include"maximise_ac_sharing.h"
|
||||
#include"bit2int.h"
|
||||
#include"statistics.h"
|
||||
|
@ -39,7 +38,7 @@ class asserted_formulas {
|
|||
ast_manager & m_manager;
|
||||
front_end_params & m_params;
|
||||
simplifier m_pre_simplifier;
|
||||
subst_simplifier m_simplifier;
|
||||
simplifier m_simplifier;
|
||||
basic_simplifier_plugin * m_bsimp;
|
||||
bv_simplifier_plugin * m_bvsimp;
|
||||
defined_names m_defined_names;
|
||||
|
@ -48,19 +47,9 @@ class asserted_formulas {
|
|||
proof_ref_vector m_asserted_formula_prs; // proofs for the asserted formulas.
|
||||
unsigned m_asserted_qhead;
|
||||
|
||||
expr_map m_subst;
|
||||
ptr_vector<app> m_vars; // domain of m_subst
|
||||
unsigned m_vars_qhead;
|
||||
|
||||
expr_mark m_forbidden;
|
||||
ptr_vector<app> m_forbidden_vars;
|
||||
|
||||
macro_manager m_macro_manager;
|
||||
scoped_ptr<macro_finder> m_macro_finder;
|
||||
|
||||
typedef plugin_manager<solver_plugin> solver_plugins;
|
||||
solver_plugins m_solver_plugins;
|
||||
|
||||
bit2int m_bit2int;
|
||||
|
||||
maximise_bv_sharing m_bv_sharing;
|
||||
|
@ -70,50 +59,33 @@ class asserted_formulas {
|
|||
|
||||
struct scope {
|
||||
unsigned m_asserted_formulas_lim;
|
||||
unsigned m_vars_lim;
|
||||
unsigned m_forbidden_vars_lim;
|
||||
bool m_inconsistent_old;
|
||||
};
|
||||
svector<scope> m_scopes;
|
||||
volatile bool m_cancel_flag;
|
||||
|
||||
void setup_simplifier_plugins(simplifier & s, basic_simplifier_plugin * & bsimp, arith_simplifier_plugin * & asimp, bv_simplifier_plugin * & bvsimp);
|
||||
bool trivial_solve(expr * lhs, expr * rhs, app_ref & var, expr_ref & subst, proof_ref& pr);
|
||||
bool is_pos_literal(expr * n);
|
||||
bool is_neg_literal(expr * n);
|
||||
bool solve_ite_definition_core(expr * lhs1, expr * rhs1, expr * lhs2, expr * rhs2, expr * cond, app_ref & var, expr_ref & subst);
|
||||
bool solve_ite_definition(expr * arg1, expr * arg2, expr * arg3, app_ref & var, expr_ref & subst);
|
||||
bool solve_core(expr * n, app_ref & var, expr_ref & subst, proof_ref& pr);
|
||||
bool solve_core();
|
||||
void solve();
|
||||
void reduce_asserted_formulas();
|
||||
void swap_asserted_formulas(expr_ref_vector & new_exprs, proof_ref_vector & new_prs);
|
||||
void find_macros_core();
|
||||
void find_macros();
|
||||
void expand_macros();
|
||||
void apply_demodulators();
|
||||
void apply_quasi_macros();
|
||||
void nnf_cnf();
|
||||
void infer_patterns();
|
||||
void eliminate_term_ite();
|
||||
void reduce_and_solve();
|
||||
void flush_cache() { m_pre_simplifier.reset(); m_simplifier.reset(); }
|
||||
void restore_subst(unsigned old_size);
|
||||
void restore_forbidden_vars(unsigned old_size);
|
||||
void set_eliminate_and(bool flag);
|
||||
void propagate_values();
|
||||
void propagate_booleans();
|
||||
bool pull_cheap_ite_trees();
|
||||
bool pull_nested_quantifiers();
|
||||
void push_assertion(expr * e, proof * pr, expr_ref_vector & result, proof_ref_vector & result_prs);
|
||||
void context_simplifier();
|
||||
void strong_context_simplifier();
|
||||
void eliminate_and();
|
||||
void refine_inj_axiom();
|
||||
bool cheap_quant_fourier_motzkin();
|
||||
bool quant_elim();
|
||||
bool apply_der_core();
|
||||
void apply_der();
|
||||
void apply_distribute_forall();
|
||||
bool apply_bit2int();
|
||||
void lift_ite();
|
||||
|
@ -174,20 +146,6 @@ public:
|
|||
// auxiliary function used to create a logic context based on a model.
|
||||
void insert_macro(func_decl * f, quantifier * m, proof * pr) { m_macro_manager.insert(f, m, pr); }
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Eliminated vars
|
||||
//
|
||||
// -----------------------------------
|
||||
ptr_vector<app>::const_iterator begin_subst_vars() const { return m_vars.begin(); }
|
||||
ptr_vector<app>::const_iterator end_subst_vars() const { return m_vars.end(); }
|
||||
ptr_vector<app>::const_iterator begin_subst_vars_last_level() const {
|
||||
unsigned sidx = m_scopes.empty() ? 0 : m_scopes.back().m_vars_lim;
|
||||
return m_vars.begin() + sidx;
|
||||
}
|
||||
expr * get_subst(app * var) { expr * def = 0; proof * pr; m_subst.get(var, def, pr); return def; }
|
||||
bool is_subst(app * var) const { return m_subst.contains(var); }
|
||||
void get_ordered_subst_vars(ptr_vector<app> & ordered_vars);
|
||||
};
|
||||
|
||||
#endif /* _ASSERTED_FORMULAS_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue