mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
enable user propagation on tactics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
cbdd7b0696
commit
bfd61fec00
4 changed files with 94 additions and 1 deletions
|
@ -23,6 +23,7 @@ Notes:
|
|||
#include "util/params.h"
|
||||
#include "util/lbool.h"
|
||||
#include "util/statistics.h"
|
||||
#include "tactic/user_propagator_base.h"
|
||||
#include "tactic/goal.h"
|
||||
#include "tactic/tactic_exception.h"
|
||||
|
||||
|
@ -30,7 +31,7 @@ class progress_callback;
|
|||
|
||||
typedef ptr_buffer<goal> goal_buffer;
|
||||
|
||||
class tactic {
|
||||
class tactic : public user_propagator::core {
|
||||
unsigned m_ref_count;
|
||||
public:
|
||||
tactic():m_ref_count(0) {}
|
||||
|
@ -76,6 +77,14 @@ public:
|
|||
|
||||
static void checkpoint(ast_manager& m);
|
||||
|
||||
void user_propagate_init(
|
||||
void* ctx,
|
||||
user_propagator::push_eh_t& push_eh,
|
||||
user_propagator::pop_eh_t& pop_eh,
|
||||
user_propagator::fresh_eh_t& fresh_eh) override {
|
||||
throw default_exception("tactic does not support user propagation");
|
||||
}
|
||||
|
||||
protected:
|
||||
friend class nary_tactical;
|
||||
friend class binary_tactical;
|
||||
|
|
|
@ -164,6 +164,34 @@ public:
|
|||
return translate_core<and_then_tactical>(m);
|
||||
}
|
||||
|
||||
void user_propagate_init(
|
||||
void* ctx,
|
||||
user_propagator::push_eh_t& push_eh,
|
||||
user_propagator::pop_eh_t& pop_eh,
|
||||
user_propagator::fresh_eh_t& fresh_eh) override {
|
||||
m_t2->user_propagate_init(ctx, push_eh, pop_eh, fresh_eh);
|
||||
}
|
||||
|
||||
void user_propagate_register_fixed(user_propagator::fixed_eh_t& fixed_eh) override {
|
||||
m_t2->user_propagate_register_fixed(fixed_eh);
|
||||
}
|
||||
|
||||
void user_propagate_register_final(user_propagator::final_eh_t& final_eh) override {
|
||||
m_t2->user_propagate_register_final(final_eh);
|
||||
}
|
||||
|
||||
void user_propagate_register_eq(user_propagator::eq_eh_t& eq_eh) override {
|
||||
m_t2->user_propagate_register_eq(eq_eh);
|
||||
}
|
||||
|
||||
void user_propagate_register_diseq(user_propagator::eq_eh_t& diseq_eh) override {
|
||||
m_t2->user_propagate_register_diseq(diseq_eh);
|
||||
}
|
||||
|
||||
unsigned user_propagate_register(expr* e) override {
|
||||
return m_t2->user_propagate_register(e);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
tactic * and_then(tactic * t1, tactic * t2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue