mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
fixes to consequence generation and cancellation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0e9758a211
commit
c5dd441947
9 changed files with 58 additions and 56 deletions
|
@ -70,22 +70,6 @@ namespace api {
|
|||
//
|
||||
// ------------------------
|
||||
|
||||
context::set_interruptable::set_interruptable(context & ctx, event_handler & i):
|
||||
m_ctx(ctx) {
|
||||
#pragma omp critical (set_interruptable)
|
||||
{
|
||||
SASSERT(m_ctx.m_interruptable == 0);
|
||||
m_ctx.m_interruptable = &i;
|
||||
}
|
||||
}
|
||||
|
||||
context::set_interruptable::~set_interruptable() {
|
||||
#pragma omp critical (set_interruptable)
|
||||
{
|
||||
m_ctx.m_interruptable = 0;
|
||||
}
|
||||
}
|
||||
|
||||
context::context(context_params * p, bool user_ref_count):
|
||||
m_params(p != 0 ? *p : context_params()),
|
||||
m_user_ref_count(user_ref_count),
|
||||
|
@ -105,11 +89,10 @@ namespace api {
|
|||
m_print_mode = Z3_PRINT_SMTLIB_FULL;
|
||||
m_searching = false;
|
||||
|
||||
m_interruptable = 0;
|
||||
|
||||
m_smtlib_parser = 0;
|
||||
m_smtlib_parser_has_decls = false;
|
||||
|
||||
|
||||
m_interruptable = 0;
|
||||
m_error_handler = &default_error_handler;
|
||||
|
||||
m_basic_fid = m().get_basic_family_id();
|
||||
|
@ -139,6 +122,22 @@ namespace api {
|
|||
}
|
||||
}
|
||||
|
||||
context::set_interruptable::set_interruptable(context & ctx, event_handler & i):
|
||||
m_ctx(ctx) {
|
||||
#pragma omp critical (set_interruptable)
|
||||
{
|
||||
SASSERT(m_ctx.m_interruptable == 0);
|
||||
m_ctx.m_interruptable = &i;
|
||||
}
|
||||
}
|
||||
|
||||
context::set_interruptable::~set_interruptable() {
|
||||
#pragma omp critical (set_interruptable)
|
||||
{
|
||||
m_ctx.m_interruptable = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void context::interrupt() {
|
||||
#pragma omp critical (set_interruptable)
|
||||
{
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace api {
|
|||
|
||||
event_handler * m_interruptable; // Reference to an object that can be interrupted by Z3_interrupt
|
||||
|
||||
public:
|
||||
public:
|
||||
// Scoped obj for setting m_interruptable
|
||||
class set_interruptable {
|
||||
context & m_ctx;
|
||||
|
|
|
@ -515,7 +515,7 @@ struct z3_replayer::imp {
|
|||
if (idx >= m_cmds.size())
|
||||
throw z3_replayer_exception("invalid command");
|
||||
try {
|
||||
TRACE("z3_replayer_cmd", tout << m_cmds_names[idx] << "\n";);
|
||||
TRACE("z3_replayer_cmd", tout << idx << ":" << m_cmds_names[idx] << "\n";);
|
||||
m_cmds[idx](m_owner);
|
||||
}
|
||||
catch (z3_error & ex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue