mirror of
https://github.com/Z3Prover/z3
synced 2025-08-30 15:00:08 +00:00
follow logic annotation/enable diff logic when configured
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
18b491eee0
commit
c1580fb85a
11 changed files with 71 additions and 30 deletions
|
@ -301,7 +301,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
void setup::setup_QF_IDL() {
|
||||
TRACE("setup", tout << "setup_QF_IDL(st)\n";);
|
||||
TRACE("setup", tout << "setup_QF_IDL()\n";);
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
|
@ -351,16 +351,15 @@ namespace smt {
|
|||
else if (!m_params.m_arith_auto_config_simplex && is_dense(st)) {
|
||||
TRACE("setup", tout << "using dense diff logic...\n";);
|
||||
m_params.m_phase_selection = PS_CACHING_CONSERVATIVE;
|
||||
#if 0
|
||||
m_context.register_plugin(alloc(smt::theory_idl, m_manager, m_params));
|
||||
#else
|
||||
if (st.m_arith_k_sum < rational(INT_MAX / 8))
|
||||
m_context.register_plugin(alloc(smt::theory_dense_si, m_manager, m_params));
|
||||
else
|
||||
m_context.register_plugin(alloc(smt::theory_dense_i, m_manager, m_params));
|
||||
#endif
|
||||
|
||||
}
|
||||
else if (!m_params.m_arith_auto_config_simplex && !is_dense(st)) {
|
||||
m_context.register_plugin(alloc(smt::theory_idl, m_manager, m_params));
|
||||
}
|
||||
else {
|
||||
// if (st.m_arith_k_sum < rational(INT_MAX / 8)) {
|
||||
// TRACE("setup", tout << "using small integer simplex...\n";);
|
||||
|
@ -379,6 +378,7 @@ namespace smt {
|
|||
m_params.m_arith_reflect = false;
|
||||
m_params.m_nnf_cnf = false;
|
||||
m_params.m_arith_eq_bounds = true;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_phase_selection = PS_ALWAYS_FALSE;
|
||||
m_params.m_restart_strategy = RS_GEOMETRIC;
|
||||
m_params.m_restart_factor = 1.5;
|
||||
|
|
|
@ -81,8 +81,10 @@ template<typename Ext>
|
|||
bool theory_diff_logic<Ext>::internalize_term(app * term) {
|
||||
bool result = null_theory_var != mk_term(term);
|
||||
CTRACE("arith", !result, tout << "Did not internalize " << mk_pp(term, get_manager()) << "\n";);
|
||||
TRACE("non_diff_logic", tout << "Terms may not be internalized\n";);
|
||||
found_non_diff_logic_expr(term);
|
||||
if (!result) {
|
||||
TRACE("non_diff_logic", tout << "Terms may not be internalized\n";);
|
||||
found_non_diff_logic_expr(term);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -273,6 +275,8 @@ bool theory_diff_logic<Ext>::internalize_atom(app * n, bool gate_ctx) {
|
|||
template<typename Ext>
|
||||
void theory_diff_logic<Ext>::internalize_eq_eh(app * atom, bool_var v) {
|
||||
context & ctx = get_context();
|
||||
ast_manager& m = get_manager();
|
||||
TRACE("arith", tout << mk_pp(atom, m) << "\n";);
|
||||
app * lhs = to_app(atom->get_arg(0));
|
||||
app * rhs = to_app(atom->get_arg(1));
|
||||
app * s;
|
||||
|
@ -1070,13 +1074,13 @@ inf_eps_rational<inf_rational> theory_diff_logic<Ext>::maximize(theory_var v, ex
|
|||
ast_manager& m = get_manager();
|
||||
objective_term const& objective = m_objectives[v];
|
||||
|
||||
IF_VERBOSE(1,
|
||||
for (unsigned i = 0; i < objective.size(); ++i) {
|
||||
verbose_stream() << "Coefficient " << objective[i].second
|
||||
<< " of theory_var " << objective[i].first << "\n";
|
||||
}
|
||||
verbose_stream() << "Free coefficient " << m_objective_consts[v] << "\n";);
|
||||
|
||||
TRACE("arith",
|
||||
for (unsigned i = 0; i < objective.size(); ++i) {
|
||||
tout << "Coefficient " << objective[i].second
|
||||
<< " of theory_var " << objective[i].first << "\n";
|
||||
}
|
||||
tout << "Free coefficient " << m_objective_consts[v] << "\n";
|
||||
);
|
||||
unsigned num_nodes = m_graph.get_num_nodes();
|
||||
unsigned num_edges = m_graph.get_num_edges();
|
||||
vector<dl_edge<GExt> > const& es = m_graph.get_all_edges();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue