mirror of
https://github.com/Z3Prover/z3
synced 2025-10-04 15:03:57 +00:00
fix #7952 - make auto-selector detect large bit-vectors so it does't use the datalog engine for hopelessly large tables
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0881a71ed2
commit
72c89e1a4e
1 changed files with 18 additions and 2 deletions
|
@ -776,10 +776,26 @@ namespace datalog {
|
||||||
array_util ar;
|
array_util ar;
|
||||||
DL_ENGINE m_engine_type;
|
DL_ENGINE m_engine_type;
|
||||||
|
|
||||||
bool is_large_bv(sort* s) {
|
bool is_large_bv(expr *e) {
|
||||||
|
sort *s = e->get_sort();
|
||||||
|
if (bv.is_bv_sort(s)) {
|
||||||
|
unsigned sz = bv.get_bv_size(s);
|
||||||
|
if (sz > 24)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (is_app(e)) {
|
||||||
|
unsigned sz = 0;
|
||||||
|
for (auto arg : *to_app(e)) {
|
||||||
|
if (bv.is_bv(arg))
|
||||||
|
sz += bv.get_bv_size(arg->get_sort());
|
||||||
|
}
|
||||||
|
if (sz > 24)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
engine_type_proc(ast_manager& m): m(m), a(m), dt(m), bv(m), ar(m), m_engine_type(DATALOG_ENGINE) {}
|
engine_type_proc(ast_manager& m): m(m), a(m), dt(m), bv(m), ar(m), m_engine_type(DATALOG_ENGINE) {}
|
||||||
|
|
||||||
|
@ -795,7 +811,7 @@ namespace datalog {
|
||||||
else if (dt.is_datatype(e->get_sort())) {
|
else if (dt.is_datatype(e->get_sort())) {
|
||||||
m_engine_type = SPACER_ENGINE;
|
m_engine_type = SPACER_ENGINE;
|
||||||
}
|
}
|
||||||
else if (is_large_bv(e->get_sort())) {
|
else if (is_large_bv(e)) {
|
||||||
m_engine_type = SPACER_ENGINE;
|
m_engine_type = SPACER_ENGINE;
|
||||||
}
|
}
|
||||||
else if (!e->get_sort()->get_num_elements().is_finite()) {
|
else if (!e->get_sort()->get_num_elements().is_finite()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue