mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
strengthen support for int.to.str and length reasoning. Issue #589
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
8c99d3c431
commit
c3f498a640
9 changed files with 103 additions and 31 deletions
|
@ -1420,7 +1420,7 @@ ast_manager::~ast_manager() {
|
|||
std::cout << to_sort(a)->get_name() << "\n";
|
||||
}
|
||||
else {
|
||||
std::cout << mk_ll_pp(a, *this, false);
|
||||
std::cout << mk_ll_pp(a, *this, false) << "id: " << a->get_id() << "\n";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1575,6 +1575,26 @@ bool ast_manager::are_equal(expr * a, expr * b) const {
|
|||
return false;
|
||||
}
|
||||
|
||||
void ast_manager::inc_ref(ast * n) {
|
||||
|
||||
if (n && n->get_id() == 362568) {
|
||||
std::cout << "inc-ref " << n->get_ref_count() << "\n";
|
||||
}
|
||||
if (n)
|
||||
n->inc_ref();
|
||||
}
|
||||
|
||||
void ast_manager::dec_ref(ast* n) {
|
||||
if (n && n->get_id() == 362568) {
|
||||
std::cout << "dec-ref " << n->get_ref_count() << "\n";
|
||||
}
|
||||
if (n) {
|
||||
n->dec_ref();
|
||||
if (n->get_ref_count() == 0)
|
||||
delete_node(n);
|
||||
}
|
||||
}
|
||||
|
||||
bool ast_manager::are_distinct(expr* a, expr* b) const {
|
||||
if (is_app(a) && is_app(b)) {
|
||||
app* ap = to_app(a), *bp = to_app(b);
|
||||
|
|
|
@ -1571,18 +1571,9 @@ public:
|
|||
|
||||
void debug_ref_count() { m_debug_ref_count = true; }
|
||||
|
||||
void inc_ref(ast * n) {
|
||||
if (n)
|
||||
n->inc_ref();
|
||||
}
|
||||
void inc_ref(ast * n);
|
||||
|
||||
void dec_ref(ast * n) {
|
||||
if (n) {
|
||||
n->dec_ref();
|
||||
if (n->get_ref_count() == 0)
|
||||
delete_node(n);
|
||||
}
|
||||
}
|
||||
void dec_ref(ast * n);
|
||||
|
||||
template<typename T>
|
||||
void inc_array_ref(unsigned sz, T * const * a) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue