3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-04 06:53:58 +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:
Nikolaj Bjorner 2025-09-30 15:58:48 -07:00
parent 0881a71ed2
commit 72c89e1a4e

View file

@ -776,10 +776,26 @@ namespace datalog {
array_util ar;
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;
}
public:
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())) {
m_engine_type = SPACER_ENGINE;
}
else if (is_large_bv(e->get_sort())) {
else if (is_large_bv(e)) {
m_engine_type = SPACER_ENGINE;
}
else if (!e->get_sort()->get_num_elements().is_finite()) {