mirror of
https://github.com/Z3Prover/z3
synced 2025-11-11 16:42:04 +00:00
merge with master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
c513f3ca09
883 changed files with 13979 additions and 16480 deletions
|
|
@ -203,14 +203,19 @@ namespace smt {
|
|||
struct scoped_mk_model {
|
||||
context & m_ctx;
|
||||
scoped_mk_model(context & ctx):m_ctx(ctx) {
|
||||
m_ctx.m_proto_model = 0;
|
||||
m_ctx.m_model = 0;
|
||||
m_ctx.m_proto_model = nullptr;
|
||||
m_ctx.m_model = nullptr;
|
||||
}
|
||||
~scoped_mk_model() {
|
||||
if (m_ctx.m_proto_model.get() != 0) {
|
||||
if (m_ctx.m_proto_model.get() != nullptr) {
|
||||
m_ctx.m_model = m_ctx.m_proto_model->mk_model();
|
||||
m_ctx.add_rec_funs_to_model();
|
||||
m_ctx.m_proto_model = 0; // proto_model is not needed anymore.
|
||||
try {
|
||||
m_ctx.add_rec_funs_to_model();
|
||||
}
|
||||
catch (...) {
|
||||
// no op
|
||||
}
|
||||
m_ctx.m_proto_model = nullptr; // proto_model is not needed anymore.
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -257,6 +262,8 @@ namespace smt {
|
|||
return m_params;
|
||||
}
|
||||
|
||||
void updt_params(params_ref const& p);
|
||||
|
||||
bool get_cancel_flag();
|
||||
|
||||
region & get_region() {
|
||||
|
|
@ -510,12 +517,12 @@ namespace smt {
|
|||
|
||||
enode_vector::const_iterator begin_enodes_of(func_decl const * decl) const {
|
||||
unsigned id = decl->get_decl_id();
|
||||
return id < m_decl2enodes.size() ? m_decl2enodes[id].begin() : 0;
|
||||
return id < m_decl2enodes.size() ? m_decl2enodes[id].begin() : nullptr;
|
||||
}
|
||||
|
||||
enode_vector::const_iterator end_enodes_of(func_decl const * decl) const {
|
||||
unsigned id = decl->get_decl_id();
|
||||
return id < m_decl2enodes.size() ? m_decl2enodes[id].end() : 0;
|
||||
return id < m_decl2enodes.size() ? m_decl2enodes[id].end() : nullptr;
|
||||
}
|
||||
|
||||
ptr_vector<enode>::const_iterator begin_enodes() const {
|
||||
|
|
@ -748,7 +755,7 @@ namespace smt {
|
|||
friend class mk_bool_var_trail;
|
||||
class mk_bool_var_trail : public trail<context> {
|
||||
public:
|
||||
virtual void undo(context & ctx) { ctx.undo_mk_bool_var(); }
|
||||
void undo(context & ctx) override { ctx.undo_mk_bool_var(); }
|
||||
};
|
||||
mk_bool_var_trail m_mk_bool_var_trail;
|
||||
|
||||
|
|
@ -757,7 +764,7 @@ namespace smt {
|
|||
friend class mk_enode_trail;
|
||||
class mk_enode_trail : public trail<context> {
|
||||
public:
|
||||
virtual void undo(context & ctx) { ctx.undo_mk_enode(); }
|
||||
void undo(context & ctx) override { ctx.undo_mk_enode(); }
|
||||
};
|
||||
|
||||
mk_enode_trail m_mk_enode_trail;
|
||||
|
|
@ -824,17 +831,17 @@ namespace smt {
|
|||
|
||||
void internalize(expr * n, bool gate_ctx, unsigned generation);
|
||||
|
||||
clause * mk_clause(unsigned num_lits, literal * lits, justification * j, clause_kind k = CLS_AUX, clause_del_eh * del_eh = 0);
|
||||
clause * mk_clause(unsigned num_lits, literal * lits, justification * j, clause_kind k = CLS_AUX, clause_del_eh * del_eh = nullptr);
|
||||
|
||||
void mk_clause(literal l1, literal l2, justification * j);
|
||||
|
||||
void mk_clause(literal l1, literal l2, literal l3, justification * j);
|
||||
|
||||
void mk_th_axiom(theory_id tid, unsigned num_lits, literal * lits, unsigned num_params = 0, parameter * params = 0);
|
||||
void mk_th_axiom(theory_id tid, unsigned num_lits, literal * lits, unsigned num_params = 0, parameter * params = nullptr);
|
||||
|
||||
void mk_th_axiom(theory_id tid, literal l1, literal l2, unsigned num_params = 0, parameter * params = 0);
|
||||
void mk_th_axiom(theory_id tid, literal l1, literal l2, unsigned num_params = 0, parameter * params = nullptr);
|
||||
|
||||
void mk_th_axiom(theory_id tid, literal l1, literal l2, literal l3, unsigned num_params = 0, parameter * params = 0);
|
||||
void mk_th_axiom(theory_id tid, literal l1, literal l2, literal l3, unsigned num_params = 0, parameter * params = nullptr);
|
||||
|
||||
/*
|
||||
* Provide a hint to the core solver that the specified literals form a "theory case split".
|
||||
|
|
@ -899,7 +906,7 @@ namespace smt {
|
|||
void trace_assign(literal l, b_justification j, bool decision) const;
|
||||
|
||||
public:
|
||||
void assign(literal l, b_justification j, bool decision = false) {
|
||||
void assign(literal l, const b_justification & j, bool decision = false) {
|
||||
SASSERT(l != false_literal);
|
||||
SASSERT(l != null_literal);
|
||||
switch (get_assignment(l)) {
|
||||
|
|
@ -1000,9 +1007,9 @@ namespace smt {
|
|||
|
||||
void assign_quantifier(quantifier * q);
|
||||
|
||||
void set_conflict(b_justification js, literal not_l);
|
||||
void set_conflict(const b_justification & js, literal not_l);
|
||||
|
||||
void set_conflict(b_justification js) {
|
||||
void set_conflict(const b_justification & js) {
|
||||
set_conflict(js, null_literal);
|
||||
}
|
||||
|
||||
|
|
@ -1237,24 +1244,24 @@ namespace smt {
|
|||
|
||||
void display_asserted_formulas(std::ostream & out) const;
|
||||
|
||||
void display_literal(std::ostream & out, literal l) const;
|
||||
std::ostream& display_literal(std::ostream & out, literal l) const;
|
||||
|
||||
void display_detailed_literal(std::ostream & out, literal l) const { l.display(out, m_manager, m_bool_var2expr.c_ptr()); }
|
||||
std::ostream& display_detailed_literal(std::ostream & out, literal l) const { l.display(out, m_manager, m_bool_var2expr.c_ptr()); return out; }
|
||||
|
||||
void display_literal_info(std::ostream & out, literal l) const;
|
||||
|
||||
void display_literals(std::ostream & out, unsigned num_lits, literal const * lits) const;
|
||||
std::ostream& display_literals(std::ostream & out, unsigned num_lits, literal const * lits) const;
|
||||
|
||||
void display_literals(std::ostream & out, literal_vector const& lits) const {
|
||||
display_literals(out, lits.size(), lits.c_ptr());
|
||||
std::ostream& display_literals(std::ostream & out, literal_vector const& lits) const {
|
||||
return display_literals(out, lits.size(), lits.c_ptr());
|
||||
}
|
||||
|
||||
void display_literal_verbose(std::ostream & out, literal lit) const;
|
||||
std::ostream& display_literal_verbose(std::ostream & out, literal lit) const;
|
||||
|
||||
void display_literals_verbose(std::ostream & out, unsigned num_lits, literal const * lits) const;
|
||||
|
||||
void display_literals_verbose(std::ostream & out, literal_vector const& lits) const {
|
||||
display_literals_verbose(out, lits.size(), lits.c_ptr());
|
||||
std::ostream& display_literals_verbose(std::ostream & out, unsigned num_lits, literal const * lits) const;
|
||||
|
||||
std::ostream& display_literals_verbose(std::ostream & out, literal_vector const& lits) const {
|
||||
return display_literals_verbose(out, lits.size(), lits.c_ptr());
|
||||
}
|
||||
|
||||
void display_watch_list(std::ostream & out, literal l) const;
|
||||
|
|
@ -1389,7 +1396,7 @@ namespace smt {
|
|||
void flush();
|
||||
config_mode get_config_mode(bool use_static_features) const;
|
||||
virtual void setup_context(bool use_static_features);
|
||||
void setup_components(void);
|
||||
void setup_components();
|
||||
void pop_to_base_lvl();
|
||||
void pop_to_search_lvl();
|
||||
#ifdef Z3DEBUG
|
||||
|
|
@ -1462,7 +1469,7 @@ namespace smt {
|
|||
If l == 0, then the logic of this context is used in the new context.
|
||||
If p == 0, then this->m_params is used
|
||||
*/
|
||||
context * mk_fresh(symbol const * l = 0, smt_params * p = 0);
|
||||
context * mk_fresh(symbol const * l = nullptr, smt_params * p = nullptr);
|
||||
|
||||
static void copy(context& src, context& dst);
|
||||
|
||||
|
|
@ -1484,7 +1491,7 @@ namespace smt {
|
|||
|
||||
void pop(unsigned num_scopes);
|
||||
|
||||
lbool check(unsigned num_assumptions = 0, expr * const * assumptions = 0, bool reset_cancel = true, bool already_did_theory_assumptions = false);
|
||||
lbool check(unsigned num_assumptions = 0, expr * const * assumptions = nullptr, bool reset_cancel = true, bool already_did_theory_assumptions = false);
|
||||
|
||||
lbool get_consequences(expr_ref_vector const& assumptions, expr_ref_vector const& vars, expr_ref_vector& conseq, expr_ref_vector& unfixed);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue