mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
local changes to pdr_generalizer
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
ce9a098f16
7 changed files with 39 additions and 23 deletions
|
@ -419,17 +419,21 @@ namespace api {
|
|||
extern "C" {
|
||||
|
||||
Z3_context Z3_API Z3_mk_context(Z3_config c) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_mk_context(c);
|
||||
memory::initialize(UINT_MAX);
|
||||
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<context_params*>(c), false));
|
||||
RETURN_Z3(r);
|
||||
Z3_CATCH_RETURN_NO_HANDLE(0);
|
||||
}
|
||||
|
||||
Z3_context Z3_API Z3_mk_context_rc(Z3_config c) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_mk_context_rc(c);
|
||||
memory::initialize(UINT_MAX);
|
||||
Z3_context r = reinterpret_cast<Z3_context>(alloc(api::context, reinterpret_cast<context_params*>(c), true));
|
||||
RETURN_Z3(r);
|
||||
Z3_CATCH_RETURN_NO_HANDLE(0);
|
||||
}
|
||||
|
||||
void Z3_API Z3_del_context(Z3_context c) {
|
||||
|
|
|
@ -26,6 +26,7 @@ Revision History:
|
|||
#define Z3_CATCH_CORE(CODE) } catch (z3_exception & ex) { mk_c(c)->handle_exception(ex); CODE }
|
||||
#define Z3_CATCH Z3_CATCH_CORE(return;)
|
||||
#define Z3_CATCH_RETURN(VAL) Z3_CATCH_CORE(return VAL;)
|
||||
#define Z3_CATCH_RETURN_NO_HANDLE(VAL) } catch (z3_exception &) { return VAL; }
|
||||
|
||||
#define CHECK_REF_COUNT(a) (reinterpret_cast<ast const*>(a)->get_ref_count() > 0)
|
||||
#define VALIDATE(a) SASSERT(!a || CHECK_REF_COUNT(a))
|
||||
|
|
|
@ -3053,10 +3053,10 @@ public class Context extends IDisposable
|
|||
// OK.
|
||||
}
|
||||
m_ctx = 0;
|
||||
} else
|
||||
/* re-queue the finalizer */
|
||||
/* BUG: DRQ's need to be taken over too! */
|
||||
new Context(m_ctx, m_refCount);
|
||||
}
|
||||
/*
|
||||
else
|
||||
CMW: re-queue the finalizer? */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -537,7 +537,7 @@ class smt_printer {
|
|||
}
|
||||
|
||||
void print_bound(symbol const& name) {
|
||||
if (name.is_numerical() || '?' != name.bare_str()[0]) {
|
||||
if (!is_smt2 && (name.is_numerical() || '?' != name.bare_str()[0])) {
|
||||
m_out << "?";
|
||||
}
|
||||
m_out << name;
|
||||
|
@ -642,7 +642,9 @@ class smt_printer {
|
|||
m_out << m_var_names[m_num_var_names - idx - 1];
|
||||
}
|
||||
else {
|
||||
m_out << "?" << idx;
|
||||
if (!m_is_smt2) {
|
||||
m_out << "?" << idx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -270,8 +270,8 @@ namespace pdr {
|
|||
vector<term_loc_t> & terms1 = it->m_value;
|
||||
vector<term_loc_t> terms2;
|
||||
if (r >= rational(2) && m_ub.find(r, terms2)) {
|
||||
bool done = false;
|
||||
for (unsigned i = 0; !done && i < terms1.size(); ++i) {
|
||||
for (unsigned i = 0; i < terms1.size(); ++i) {
|
||||
bool done = false;
|
||||
for (unsigned j = 0; !done && j < terms2.size(); ++j) {
|
||||
expr* t1 = terms1[i].first;
|
||||
expr* t2 = terms2[j].first;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue