mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
chasing bug in the Java bindings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
0ec6e2f218
commit
54e452a1af
3 changed files with 54 additions and 12 deletions
|
@ -232,8 +232,11 @@ struct z3_replayer::imp {
|
|||
}
|
||||
|
||||
void read_ptr() {
|
||||
if (!(('0' <= curr() && curr() <= '9') || ('A' <= curr() && curr() <= 'F') || ('a' <= curr() && curr() <= 'f')))
|
||||
if (!(('0' <= curr() && curr() <= '9') || ('A' <= curr() && curr() <= 'F') || ('a' <= curr() && curr() <= 'f'))) {
|
||||
TRACE("invalid_ptr", tout << "curr: " << curr() << "\n";);
|
||||
throw z3_replayer_exception("invalid ptr");
|
||||
}
|
||||
unsigned pos = 0;
|
||||
m_ptr = 0;
|
||||
while (true) {
|
||||
char c = curr();
|
||||
|
@ -246,10 +249,13 @@ struct z3_replayer::imp {
|
|||
else if ('A' <= c && c <= 'F') {
|
||||
m_ptr = m_ptr * 16 + 10 + (c - 'A');
|
||||
}
|
||||
else if (pos == 1 && (c == 'x' || c == 'X')) {
|
||||
// support for 0x.... notation
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
next();
|
||||
next(); pos++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ namespace smt {
|
|||
// Moreover, if model construction is enabled, then rational numbers may be needed
|
||||
// to compute the actual value of epsilon even if the input does not have rational numbers.
|
||||
// Example: (x < 1) and (x > 0)
|
||||
if (m_params.m_proof_mode != PGM_DISABLED) {
|
||||
if (m_manager.proof_mode() != PGM_DISABLED) {
|
||||
m_context.register_plugin(alloc(smt::theory_mi_arith_w_proofs, m_manager, m_params));
|
||||
}
|
||||
else if (!m_params.m_arith_auto_config_simplex && is_dense(st)) {
|
||||
|
@ -343,7 +343,7 @@ namespace smt {
|
|||
tout << "RELEVANCY: " << m_params.m_relevancy_lvl << "\n";
|
||||
tout << "ARITH_EQ_BOUNDS: " << m_params.m_arith_eq_bounds << "\n";);
|
||||
|
||||
if (m_params.m_proof_mode != PGM_DISABLED) {
|
||||
if (m_manager.proof_mode() != PGM_DISABLED) {
|
||||
m_context.register_plugin(alloc(smt::theory_mi_arith_w_proofs, m_manager, m_params));
|
||||
}
|
||||
else if (!m_params.m_arith_auto_config_simplex && is_dense(st)) {
|
||||
|
@ -394,7 +394,7 @@ namespace smt {
|
|||
m_params.m_lemma_gc_half = true;
|
||||
m_params.m_restart_strategy = RS_GEOMETRIC;
|
||||
|
||||
if (m_params.m_proof_mode != PGM_DISABLED) {
|
||||
if (m_manager.proof_mode() != PGM_DISABLED) {
|
||||
m_context.register_plugin(alloc(smt::theory_mi_arith_w_proofs, m_manager, m_params));
|
||||
}
|
||||
else if (st.m_arith_k_sum < rational(INT_MAX / 8))
|
||||
|
@ -409,7 +409,7 @@ namespace smt {
|
|||
m_params.m_restart_strategy = RS_GEOMETRIC;
|
||||
m_params.m_restart_factor = 1.5;
|
||||
m_params.m_restart_adaptive = false;
|
||||
if (m_params.m_proof_mode != PGM_DISABLED) {
|
||||
if (m_manager.proof_mode() != PGM_DISABLED) {
|
||||
m_context.register_plugin(alloc(smt::theory_mi_arith_w_proofs, m_manager, m_params));
|
||||
}
|
||||
// else if (st.m_arith_k_sum < rational(INT_MAX / 8))
|
||||
|
@ -683,7 +683,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
void setup::setup_i_arith() {
|
||||
if (m_params.m_proof_mode != PGM_DISABLED) {
|
||||
if (m_manager.proof_mode() != PGM_DISABLED) {
|
||||
m_context.register_plugin(alloc(smt::theory_mi_arith_w_proofs, m_manager, m_params));
|
||||
}
|
||||
else {
|
||||
|
@ -692,7 +692,7 @@ namespace smt {
|
|||
}
|
||||
|
||||
void setup::setup_mi_arith() {
|
||||
if (m_params.m_proof_mode != PGM_DISABLED) {
|
||||
if (m_manager.proof_mode() != PGM_DISABLED) {
|
||||
m_context.register_plugin(alloc(smt::theory_mi_arith_w_proofs, m_manager, m_params));
|
||||
}
|
||||
else {
|
||||
|
@ -734,7 +734,7 @@ namespace smt {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
if (m_params.m_proof_mode != PGM_DISABLED) {
|
||||
if (m_manager.proof_mode() != PGM_DISABLED) {
|
||||
m_context.register_plugin(alloc(smt::theory_mi_arith_w_proofs, m_manager, m_params));
|
||||
}
|
||||
// else if (m_params.m_arith_fixnum) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue