void goal::update(unsigned i, expr * f, proof * pr, expr_dependency * d) { SASSERT(proofs_enabled() == (pr != 0 && !m().is_undef_proof(pr))); if (m_inconsistent) return; if (proofs_enabled()) { expr_ref out_f(m()); proof_ref out_pr(m()); slow_process(true, f, pr, d, out_f, out_pr); if (!m_inconsistent) { if (m().is_false(out_f)) { push_back(out_f, out_pr, d); } else { m().set(m_forms, i, out_f); m().set(m_proofs, i, out_pr); if (unsat_core_enabled()) m().set(m_dependencies, i, d); } } } else { quick_process(true, f, d); if (!m_inconsistent) { if (m().is_false(f)) { push_back(f, 0, d); } else { m().set(m_forms, i, f); if (unsat_core_enabled()) m().set(m_dependencies, i, d); } } } }
void assertion_set::update(unsigned i, expr * f, proof * pr) { SASSERT(m().proofs_enabled() == (pr != 0 && !m().is_undef_proof(pr))); if (m_inconsistent) return; if (m().proofs_enabled()) { expr_ref out_f(m()); proof_ref out_pr(m()); slow_process(true, f, pr, out_f, out_pr); if (!m_inconsistent) { if (m().is_false(out_f)) { push_back(out_f, out_pr); } else { m().set(m_forms, i, out_f); m().set(m_proofs, i, out_pr); } } } else { quick_process(true, f); if (!m_inconsistent) { if (m().is_false(f)) push_back(f, 0); else m().set(m_forms, i, f); } } }
void goal::assert_expr(expr * f, proof * pr, expr_dependency * d) { SASSERT(proofs_enabled() == (pr != 0 && !m().is_undef_proof(pr))); if (m_inconsistent) return; if (proofs_enabled()) slow_process(f, pr, d); else quick_process(false, f, d); }
void assertion_set::assert_expr(expr * f, proof * pr) { SASSERT(m().proofs_enabled() == (pr != 0 && !m().is_undef_proof(pr))); if (m_inconsistent) return; if (m().proofs_enabled()) slow_process(f, pr); else quick_process(false, f); }
void assertion_stack::assert_expr(expr * f, proof * pr, expr_dependency * d) { SASSERT(proofs_enabled() == (pr != 0 && !m().is_undef_proof(pr))); if (m_inconsistent) return; expr_ref new_f(m()); proof_ref new_pr(m()); expr_dependency_ref new_d(m()); expand(f, pr, d, new_f, new_pr, new_d); if (proofs_enabled()) slow_process(f, pr, d); else quick_process(false, f, d); }
int quick_save() { int ok = 0; quick_fp = fopen(quick_file, "wb"); if (quick_fp != NULL) { process_save((void*) quick_version, COUNT(quick_version)); ok = quick_process(process_save); fclose(quick_fp); quick_fp = NULL; } return ok; }
int quick_load() { int ok = 0; quick_fp = fopen(quick_file, "rb"); if (quick_fp != NULL) { // check quicksave version is compatible process_load(quick_control, COUNT(quick_control)); if (strcmp(quick_control, quick_version) != 0) { fclose(quick_fp); quick_fp = NULL; return 0; } stop_sounds(); start_timer(timer_0, 5); // briefly display a black screen as a visual cue draw_rect(&screen_rect, 0); screen_updates_suspended = 0; request_screen_update(); screen_updates_suspended = 1; word old_rem_min = rem_min; word old_rem_tick = rem_tick; ok = quick_process(process_load); fclose(quick_fp); quick_fp = NULL; restore_room_after_quick_load(); do_wait(timer_0); screen_updates_suspended = 0; request_screen_update(); #ifdef USE_QUICKLOAD_PENALTY // Subtract one minute from the remaining time (if it is above 5 minutes) if (options.enable_quicksave_penalty) { int ticks_elapsed = 720 * (rem_min - old_rem_min) + (rem_tick - old_rem_tick); // don't restore time at all if the elapsed time is between 0 and 1 minutes if (ticks_elapsed > 0 && ticks_elapsed < 720) { rem_min = old_rem_min; rem_tick = old_rem_tick; } else { if (rem_min == 6) rem_tick = 719; // crop to "5 minutes" exactly, if hitting the threshold in <1 minute if (rem_min > 5) --rem_min; } } #endif } return ok; }
void assertion_stack::update(unsigned i, expr * f, proof * pr, expr_dependency * d) { SASSERT(i >= m_form_qhead); SASSERT(proofs_enabled() == (pr != 0 && !m().is_undef_proof(pr))); if (m_inconsistent) return; if (proofs_enabled()) { expr_ref out_f(m()); proof_ref out_pr(m()); slow_process(true, f, pr, d, out_f, out_pr); if (!m_inconsistent) { if (m().is_false(out_f)) { push_back(out_f, out_pr, d); } else { m().inc_ref(out_f); m().dec_ref(m_forms[i]); m_forms[i] = out_f; m().inc_ref(out_pr); m().dec_ref(m_proofs[i]); m_proofs[i] = out_pr; if (unsat_core_enabled()) { m().inc_ref(d); m().dec_ref(m_deps[i]); m_deps[i] = d; } } } } else { quick_process(true, f, d); if (!m_inconsistent) { if (m().is_false(f)) { push_back(f, 0, d); } else { m().inc_ref(f); m().dec_ref(m_forms[i]); m_forms[i] = f; if (unsat_core_enabled()) { m().inc_ref(d); m().dec_ref(m_deps[i]); m_deps[i] = d; } } } } }