3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-04 06:53:58 +00:00

fix #7404, relates to #7400.

This commit is contained in:
Nikolaj Bjorner 2024-09-27 11:36:10 +01:00
parent d047b86439
commit 01cf0427b4
6 changed files with 55 additions and 10 deletions

View file

@ -30,6 +30,7 @@ class binary_tactical : public tactic {
protected:
tactic_ref m_t1;
tactic_ref m_t2;
bool m_clean = true;
public:
@ -61,8 +62,11 @@ public:
}
void cleanup() override {
if (m_clean)
return;
m_t1->cleanup();
m_t2->cleanup();
m_clean = true;
}
void reset() override {
@ -103,7 +107,8 @@ public:
char const* name() const override { return "and_then"; }
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
m_clean = false;
bool proofs_enabled = in->proofs_enabled();
bool cores_enabled = in->unsat_core_enabled();
@ -872,6 +877,7 @@ tactic * par_and_then(unsigned num, tactic * const * ts) {
class unary_tactical : public tactic {
protected:
tactic_ref m_t;
bool m_clean = true;
public:
@ -880,11 +886,12 @@ public:
SASSERT(t);
}
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
m_clean = false;
m_t->operator()(in, result);
}
void cleanup(void) override { m_t->cleanup(); }
void cleanup(void) override { if (!m_clean) m_t->cleanup(); m_clean = true; }
void collect_statistics(statistics & st) const override { m_t->collect_statistics(st); }
void reset_statistics() override { m_t->reset_statistics(); }
void updt_params(params_ref const & p) override { m_t->updt_params(p); }
@ -1158,6 +1165,7 @@ public:
char const* name() const override { return "cond"; }
void operator()(goal_ref const & in, goal_ref_buffer & result) override {
m_clean = false;
if (m_p->operator()(*(in.get())).is_true())
m_t1->operator()(in, result);
else