3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

use regien to allocate and delete interval dependencies

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-08-09 11:00:01 -07:00
parent ae7e7333a6
commit 22e2ad6824
3 changed files with 53 additions and 57 deletions

View file

@ -19,7 +19,7 @@
--*/
#pragma once
#include "util/dependency.h"
#include "util/small_object_allocator.h"
#include "util/region.h"
#include "math/lp/nla_common.h"
#include "math/lp/lar_solver.h"
#include "math/interval/interval.h"
@ -40,7 +40,7 @@ class intervals : common {
struct ci_dependency_config {
typedef ci_value_manager value_manager;
typedef small_object_allocator allocator;
typedef region allocator;
static const bool ref_count = false;
typedef lp::constraint_index value;
};
@ -135,13 +135,13 @@ class intervals : common {
}
};
small_object_allocator m_alloc;
ci_value_manager m_val_manager;
region m_alloc;
ci_value_manager m_val_manager;
mutable unsynch_mpq_manager m_num_manager;
mutable ci_dependency_manager m_dep_manager;
im_config m_config;
mutable interval_manager<im_config> m_imanager;
region m_region;
region m_region;
public:
typedef interval_manager<im_config>::interval interval;
@ -153,7 +153,7 @@ private:
public:
intervals(core* c, reslimit& lim) :
common(c),
m_alloc("intervals"),
m_alloc(),
m_dep_manager(m_val_manager, m_alloc),
m_config(m_num_manager, m_dep_manager),
m_imanager(lim, im_config(m_num_manager, m_dep_manager))
@ -319,6 +319,6 @@ public:
return true;
return false;
}
void reset() { m_alloc.reset(); }
}; // end of intervals
} // end of namespace nla