mirror of
https://github.com/Z3Prover/z3
synced 2025-04-26 10:35:33 +00:00
Merge branch 'master' of https://github.com/Z3Prover/z3
This commit is contained in:
commit
f30fb7639e
6 changed files with 43 additions and 19 deletions
|
@ -170,8 +170,8 @@ struct purify_arith_proc {
|
|||
}
|
||||
std::pair<expr*, expr*> pair;
|
||||
if (!m_sin_cos.find(to_app(theta), pair)) {
|
||||
pair.first = m().mk_fresh_const(0, m_util.mk_real());
|
||||
pair.second = m().mk_fresh_const(0, m_util.mk_real());
|
||||
pair.first = m().mk_fresh_const(0, u().mk_real());
|
||||
pair.second = m().mk_fresh_const(0, u().mk_real());
|
||||
m_sin_cos.insert(to_app(theta), pair);
|
||||
m_pinned.push_back(pair.first);
|
||||
m_pinned.push_back(pair.second);
|
||||
|
@ -681,6 +681,8 @@ struct purify_arith_proc {
|
|||
}
|
||||
};
|
||||
|
||||
expr * mk_real_zero() { return u().mk_numeral(rational(0), false); }
|
||||
|
||||
struct rw : public rewriter_tpl<rw_cfg> {
|
||||
rw_cfg m_cfg;
|
||||
rw(purify_arith_proc & o):
|
||||
|
@ -781,13 +783,15 @@ struct purify_arith_proc {
|
|||
mc = concat(mc.get(), emc);
|
||||
obj_map<app, std::pair<expr*,expr*> >::iterator it = m_sin_cos.begin(), end = m_sin_cos.end();
|
||||
for (; it != end; ++it) {
|
||||
emc->insert(it->m_key->get_decl(), m_util.mk_asin(it->m_value.first));
|
||||
emc->insert(it->m_key->get_decl(),
|
||||
m().mk_ite(u().mk_ge(it->m_value.first, mk_real_zero()), u().mk_acos(it->m_value.second),
|
||||
u().mk_add(u().mk_acos(u().mk_uminus(it->m_value.second)), u().mk_pi())));
|
||||
}
|
||||
|
||||
}
|
||||
// given values for x, y find value for theta
|
||||
// x, y are rational
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
class purify_arith_tactic : public tactic {
|
||||
|
|
|
@ -40,12 +40,12 @@ tactic * mk_ufbv_preprocessor_tactic(ast_manager & m, params_ref const & p) {
|
|||
no_elim_and.set_bool("elim_and", false);
|
||||
|
||||
return and_then(
|
||||
mk_trace_tactic("ufbv_pre"),
|
||||
mk_trace_tactic("ufbv_pre"),
|
||||
and_then(mk_simplify_tactic(m, p),
|
||||
mk_propagate_values_tactic(m, p),
|
||||
and_then(using_params(mk_macro_finder_tactic(m, no_elim_and), no_elim_and),
|
||||
mk_simplify_tactic(m, p)),
|
||||
and_then(mk_snf_tactic(m, p), mk_simplify_tactic(m, p)),
|
||||
mk_simplify_tactic(m, p)),
|
||||
and_then(mk_snf_tactic(m, p), mk_simplify_tactic(m, p)),
|
||||
mk_elim_and_tactic(m, p),
|
||||
mk_solve_eqs_tactic(m, p),
|
||||
and_then(mk_der_fp_tactic(m, p), mk_simplify_tactic(m, p)),
|
||||
|
@ -56,7 +56,7 @@ tactic * mk_ufbv_preprocessor_tactic(ast_manager & m, params_ref const & p) {
|
|||
and_then(mk_quasi_macros_tactic(m, p), mk_simplify_tactic(m, p)),
|
||||
and_then(mk_der_fp_tactic(m, p), mk_simplify_tactic(m, p)),
|
||||
mk_simplify_tactic(m, p)),
|
||||
mk_trace_tactic("ufbv_post"));
|
||||
mk_trace_tactic("ufbv_post"));
|
||||
}
|
||||
|
||||
tactic * mk_ufbv_tactic(ast_manager & m, params_ref const & p) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue