3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-10 13:10:50 +00:00

Made quantifier-related parts of smt::model_finder and smt::model_checker interruptable.

Fixes #178
This commit is contained in:
Christoph M. Wintersteiger 2015-07-29 16:55:45 +01:00
parent 0e886cfe5e
commit b9e273800c
6 changed files with 54 additions and 4 deletions

View file

@ -50,6 +50,8 @@ Revision History:
#include"func_decl_dependencies.h"
#include"simplifier.h"
#include"proto_model.h"
#include"cooperate.h"
#include"tactic_exception.h"
namespace smt {
class context;
@ -83,6 +85,7 @@ namespace smt {
scoped_ptr<simple_macro_solver> m_sm_solver;
scoped_ptr<hint_solver> m_hint_solver;
scoped_ptr<non_auf_macro_solver> m_nm_solver;
bool m_cancel;
struct scope {
unsigned m_quantifiers_lim;
@ -102,6 +105,12 @@ namespace smt {
void process_auf(ptr_vector<quantifier> const & qs, proto_model * m);
instantiation_set const * get_uvar_inst_set(quantifier * q, unsigned i) const;
void checkpoint() {
cooperate("model_finder");
if (m_cancel)
throw tactic_exception(TACTIC_CANCELED_MSG);
}
public:
model_finder(ast_manager & m, simplifier & s);
~model_finder();
@ -119,6 +128,8 @@ namespace smt {
bool restrict_sks_to_inst_set(context * aux_ctx, quantifier * q, expr_ref_vector const & sks);
void restart_eh();
void set_cancel(bool f);
};
};