mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
enable logic parameter update to configure SMTLIB logic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7f51ecab37
commit
67397bf71e
16 changed files with 30 additions and 30 deletions
|
@ -38,7 +38,7 @@ void smt_params::updt_local_params(params_ref const & _p) {
|
|||
m_rlimit = p.rlimit();
|
||||
m_max_conflicts = p.max_conflicts();
|
||||
m_core_validate = p.core_validate();
|
||||
m_logic = _p.get_str("logic", m_logic.c_str());
|
||||
m_logic = _p.get_sym("logic", m_logic);
|
||||
model_params mp(_p);
|
||||
m_model_compact = mp.compact();
|
||||
if (_p.get_bool("arith.greatest_error_pivot", false))
|
||||
|
|
|
@ -160,7 +160,7 @@ struct smt_params : public preprocessor_params,
|
|||
//
|
||||
// -----------------------------------
|
||||
bool m_smtlib_dump_lemmas;
|
||||
std::string m_logic;
|
||||
symbol m_logic;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
|
@ -260,7 +260,7 @@ struct smt_params : public preprocessor_params,
|
|||
m_old_clause_relevancy(6),
|
||||
m_inv_clause_decay(1),
|
||||
m_smtlib_dump_lemmas(false),
|
||||
m_logic("AUFLIA"),
|
||||
m_logic(symbol::null),
|
||||
m_profile_res_sub(false),
|
||||
m_display_bool_var2expr(false),
|
||||
m_display_ll_bool_var2expr(false),
|
||||
|
|
|
@ -1218,18 +1218,18 @@ namespace smt {
|
|||
|
||||
void display_hot_bool_vars(std::ostream & out) const;
|
||||
|
||||
void display_lemma_as_smt_problem(std::ostream & out, unsigned num_antecedents, literal const * antecedents, literal consequent = false_literal, const char * logic = "AUFLIRA") const;
|
||||
void display_lemma_as_smt_problem(std::ostream & out, unsigned num_antecedents, literal const * antecedents, literal consequent = false_literal, symbol const& logic = symbol::null) const;
|
||||
|
||||
void display_lemma_as_smt_problem(unsigned num_antecedents, literal const * antecedents, literal consequent = false_literal, const char * logic = "AUFLIRA") const;
|
||||
void display_lemma_as_smt_problem(unsigned num_antecedents, literal const * antecedents, literal consequent = false_literal, symbol const& logic = symbol::null) const;
|
||||
void display_lemma_as_smt_problem(std::ostream & out, unsigned num_antecedents, literal const * antecedents,
|
||||
unsigned num_antecedent_eqs, enode_pair const * antecedent_eqs,
|
||||
literal consequent = false_literal, const char * logic = "AUFLIRA") const;
|
||||
literal consequent = false_literal, symbol const& logic = symbol::null) const;
|
||||
|
||||
void display_lemma_as_smt_problem(unsigned num_antecedents, literal const * antecedents,
|
||||
unsigned num_antecedent_eqs, enode_pair const * antecedent_eqs,
|
||||
literal consequent = false_literal, const char * logic = "AUFLIRA") const;
|
||||
literal consequent = false_literal, symbol const& logic = symbol::null) const;
|
||||
|
||||
void display_assignment_as_smtlib2(std::ostream& out, const char * logic = "AUFLIRA") const;
|
||||
void display_assignment_as_smtlib2(std::ostream& out, symbol const& logic = symbol::null) const;
|
||||
|
||||
void display_normalized_enodes(std::ostream & out) const;
|
||||
|
||||
|
@ -1367,7 +1367,7 @@ namespace smt {
|
|||
|
||||
app * mk_eq_atom(expr * lhs, expr * rhs);
|
||||
|
||||
bool set_logic(symbol logic) { return m_setup.set_logic(logic); }
|
||||
bool set_logic(symbol const& logic) { return m_setup.set_logic(logic); }
|
||||
|
||||
void register_plugin(simplifier_plugin * s);
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace smt {
|
|||
}
|
||||
}
|
||||
|
||||
void context::display_assignment_as_smtlib2(std::ostream& out, char const* logic) const {
|
||||
void context::display_assignment_as_smtlib2(std::ostream& out, symbol const& logic) const {
|
||||
ast_smt_pp pp(m_manager);
|
||||
pp.set_benchmark_name("lemma");
|
||||
pp.set_status("unknown");
|
||||
|
@ -421,7 +421,7 @@ namespace smt {
|
|||
st.display_internal(out);
|
||||
}
|
||||
|
||||
void context::display_lemma_as_smt_problem(std::ostream & out, unsigned num_antecedents, literal const * antecedents, literal consequent, const char * logic) const {
|
||||
void context::display_lemma_as_smt_problem(std::ostream & out, unsigned num_antecedents, literal const * antecedents, literal consequent, symbol const& logic) const {
|
||||
ast_smt_pp pp(m_manager);
|
||||
pp.set_benchmark_name("lemma");
|
||||
pp.set_status("unsat");
|
||||
|
@ -441,7 +441,7 @@ namespace smt {
|
|||
|
||||
#define BUFFER_SZ 128
|
||||
|
||||
void context::display_lemma_as_smt_problem(unsigned num_antecedents, literal const * antecedents, literal consequent, const char * logic) const {
|
||||
void context::display_lemma_as_smt_problem(unsigned num_antecedents, literal const * antecedents, literal consequent, symbol const& logic) const {
|
||||
char buffer[BUFFER_SZ];
|
||||
#ifdef _WINDOWS
|
||||
sprintf_s(buffer, BUFFER_SZ, "lemma_%d.smt2", g_lemma_id);
|
||||
|
@ -456,7 +456,7 @@ namespace smt {
|
|||
|
||||
void context::display_lemma_as_smt_problem(std::ostream & out, unsigned num_antecedents, literal const * antecedents,
|
||||
unsigned num_eq_antecedents, enode_pair const * eq_antecedents,
|
||||
literal consequent, const char * logic) const {
|
||||
literal consequent, symbol const& logic) const {
|
||||
ast_smt_pp pp(m_manager);
|
||||
pp.set_benchmark_name("lemma");
|
||||
pp.set_status("unsat");
|
||||
|
@ -480,7 +480,7 @@ namespace smt {
|
|||
|
||||
void context::display_lemma_as_smt_problem(unsigned num_antecedents, literal const * antecedents,
|
||||
unsigned num_eq_antecedents, enode_pair const * eq_antecedents,
|
||||
literal consequent, const char * logic) const {
|
||||
literal consequent, symbol const& logic) const {
|
||||
char buffer[BUFFER_SZ];
|
||||
#ifdef _WINDOWS
|
||||
sprintf_s(buffer, BUFFER_SZ, "lemma_%d.smt2", g_lemma_id);
|
||||
|
|
|
@ -1433,7 +1433,7 @@ namespace smt {
|
|||
literal_buffer tmp;
|
||||
neg_literals(num_lits, lits, tmp);
|
||||
SASSERT(tmp.size() == num_lits);
|
||||
display_lemma_as_smt_problem(tmp.size(), tmp.c_ptr(), false_literal, m_fparams.m_logic.c_str());
|
||||
display_lemma_as_smt_problem(tmp.size(), tmp.c_ptr(), false_literal, m_fparams.m_logic);
|
||||
}
|
||||
mk_clause(num_lits, lits, js);
|
||||
}
|
||||
|
|
|
@ -2872,7 +2872,7 @@ namespace smt {
|
|||
if (dump_lemmas()) {
|
||||
TRACE("arith", ante.display(tout) << " --> "; ctx.display_detailed_literal(tout, l); tout << "\n";);
|
||||
ctx.display_lemma_as_smt_problem(ante.lits().size(), ante.lits().c_ptr(),
|
||||
ante.eqs().size(), ante.eqs().c_ptr(), l, 0);
|
||||
ante.eqs().size(), ante.eqs().c_ptr(), l);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2881,7 +2881,7 @@ namespace smt {
|
|||
context & ctx = get_context();
|
||||
if (dump_lemmas()) {
|
||||
ctx.display_lemma_as_smt_problem(ante.lits().size(), ante.lits().c_ptr(),
|
||||
ante.eqs().size(), ante.eqs().c_ptr(), l, 0);
|
||||
ante.eqs().size(), ante.eqs().c_ptr(), l);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ namespace smt {
|
|||
ctx.set_conflict(ctx.mk_justification(theory_conflict_justification(get_id(), r, antecedents.size(), antecedents.c_ptr())));
|
||||
|
||||
if (dump_lemmas()) {
|
||||
ctx.display_lemma_as_smt_problem(antecedents.size(), antecedents.c_ptr(), false_literal, "");
|
||||
ctx.display_lemma_as_smt_problem(antecedents.size(), antecedents.c_ptr(), false_literal);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -632,7 +632,7 @@ void theory_diff_logic<Ext>::new_edge(dl_var src, dl_var dst, unsigned num_edges
|
|||
}
|
||||
ctx.mk_clause(lits.size(), lits.c_ptr(), js, CLS_AUX_LEMMA, 0);
|
||||
if (dump_lemmas()) {
|
||||
char const * logic = m_is_lia ? "QF_LIA" : "QF_LRA";
|
||||
symbol logic(m_is_lia ? "QF_LIA" : "QF_LRA");
|
||||
ctx.display_lemma_as_smt_problem(lits.size(), lits.c_ptr(), false_literal, logic);
|
||||
}
|
||||
|
||||
|
@ -678,7 +678,7 @@ void theory_diff_logic<Ext>::set_neg_cycle_conflict() {
|
|||
);
|
||||
|
||||
if (dump_lemmas()) {
|
||||
char const * logic = m_is_lia ? "QF_LIA" : "QF_LRA";
|
||||
symbol logic(m_is_lia ? "QF_LIA" : "QF_LRA");
|
||||
ctx.display_lemma_as_smt_problem(lits.size(), lits.c_ptr(), false_literal, logic);
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ namespace smt {
|
|||
);
|
||||
|
||||
if (m_params.m_arith_dump_lemmas) {
|
||||
char const * logic = m_lra ? (m_lia?"QF_LIRA":"QF_LRA") : "QF_LIA";
|
||||
symbol logic(m_lra ? (m_lia?"QF_LIRA":"QF_LRA") : "QF_LIA");
|
||||
ctx.display_lemma_as_smt_problem(lits.size(), lits.c_ptr(), false_literal, logic);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue