mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
na
This commit is contained in:
parent
54f38d004b
commit
e459cf4cc1
|
@ -171,6 +171,32 @@ enode_vector induction_lemmas::induction_positions(enode* n) {
|
||||||
n->unset_mark2();
|
n->unset_mark2();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Collecting induction positions relative to parent.
|
||||||
|
induction_lemmas::induction_positions_t induction_lemmas::induction_positions2(enode* n) {
|
||||||
|
induction_positions_t result;
|
||||||
|
enode_vector todo;
|
||||||
|
todo.push_back(n);
|
||||||
|
n->set_mark();
|
||||||
|
for (unsigned i = 0; i < todo.size(); ++i) {
|
||||||
|
enode* n = todo[i];
|
||||||
|
unsigned idx = 0;
|
||||||
|
for (enode* a : smt::enode::args(n)) {
|
||||||
|
if (viable_induction_term(n, a)) {
|
||||||
|
result.push_back(induction_position_t(n, idx));
|
||||||
|
}
|
||||||
|
if (!a->is_marked()) {
|
||||||
|
a->set_mark();
|
||||||
|
todo.push_back(a);
|
||||||
|
}
|
||||||
|
++idx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (enode* n : todo)
|
||||||
|
n->unset_mark();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
extract substitutions for x into accessor values of the same sort.
|
extract substitutions for x into accessor values of the same sort.
|
||||||
|
|
|
@ -60,12 +60,15 @@ namespace smt {
|
||||||
typedef svector<std::pair<expr*,expr*>> expr_pair_vector;
|
typedef svector<std::pair<expr*,expr*>> expr_pair_vector;
|
||||||
typedef std::pair<expr_ref_vector, expr_ref> cond_subst_t;
|
typedef std::pair<expr_ref_vector, expr_ref> cond_subst_t;
|
||||||
typedef vector<cond_subst_t> cond_substs_t;
|
typedef vector<cond_subst_t> cond_substs_t;
|
||||||
|
typedef std::pair<enode*, unsigned> induction_position_t;
|
||||||
|
typedef svector<induction_position_t> induction_positions_t;
|
||||||
|
|
||||||
bool viable_induction_sort(sort* s);
|
bool viable_induction_sort(sort* s);
|
||||||
bool viable_induction_parent(enode* p, enode* n);
|
bool viable_induction_parent(enode* p, enode* n);
|
||||||
bool viable_induction_children(enode* n);
|
bool viable_induction_children(enode* n);
|
||||||
bool viable_induction_term(enode* p , enode* n);
|
bool viable_induction_term(enode* p , enode* n);
|
||||||
enode_vector induction_positions(enode* n);
|
enode_vector induction_positions(enode* n);
|
||||||
|
induction_positions_t induction_positions2(enode* n);
|
||||||
void mk_hypothesis_substs(unsigned depth, expr* x, cond_substs_t& subst);
|
void mk_hypothesis_substs(unsigned depth, expr* x, cond_substs_t& subst);
|
||||||
void mk_hypothesis_substs_rec(unsigned depth, sort* s, expr* y, expr_ref_vector& conds, cond_substs_t& subst);
|
void mk_hypothesis_substs_rec(unsigned depth, sort* s, expr* y, expr_ref_vector& conds, cond_substs_t& subst);
|
||||||
void mk_hypothesis_lemma(expr_ref_vector const& conds, expr_pair_vector const& subst, literal alpha);
|
void mk_hypothesis_lemma(expr_ref_vector const& conds, expr_pair_vector const& subst, literal alpha);
|
||||||
|
|
Loading…
Reference in a new issue