mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
cycle through domain size before giving up
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
21b27cd2d1
commit
c54929e59f
|
@ -184,18 +184,16 @@ public:
|
||||||
sort_size const* sz = s_info?&s_info->get_num_elements():0;
|
sort_size const* sz = s_info?&s_info->get_num_elements():0;
|
||||||
bool has_max = false;
|
bool has_max = false;
|
||||||
Number max_size;
|
Number max_size;
|
||||||
if (sz && sz->is_finite()) {
|
if (sz && sz->is_finite() && sz->size() < UINT_MAX) {
|
||||||
if (sz->size() < UINT_MAX) {
|
unsigned usz = static_cast<unsigned>(sz->size());
|
||||||
unsigned usz = static_cast<unsigned>(sz->size());
|
max_size = Number(usz);
|
||||||
max_size = Number(usz);
|
has_max = true;
|
||||||
has_max = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Number & next = set->m_next;
|
Number & next = set->m_next;
|
||||||
while (!is_new) {
|
while (!is_new) {
|
||||||
result = mk_value(next, s, is_new);
|
result = mk_value(next, s, is_new);
|
||||||
next++;
|
next++;
|
||||||
if (has_max && next >= max_size) {
|
if (has_max && next > max_size + set->m_next) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue