Skip to content

Commit 344ec2a

Browse files
committed
Enable and use the automatic limit for array-as-uninterpreted-function
Previously, the command line permitted setting uninterpreted functions to "never" or "always", where "never" actually was the default. The "automatic" mode could not be enabled in any way. Furthermore the limit should apply across all dimensions of an array, not just the top-level size. Fixes: #2018
1 parent 32bf48e commit 344ec2a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/solvers/flattening/boolbv.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -679,14 +679,12 @@ bool boolbvt::is_unbounded_array(const typet &type) const
679679
if(unbounded_array==unbounded_arrayt::U_ALL)
680680
return true;
681681

682-
const exprt &size=to_array_type(type).size();
683-
684-
mp_integer s;
685-
if(to_integer(size, s))
682+
const std::size_t size = boolbv_width(type);
683+
if(size == 0)
686684
return true;
687685

688686
if(unbounded_array==unbounded_arrayt::U_AUTO)
689-
if(s>MAX_FLATTENED_ARRAY_SIZE)
687+
if(size > MAX_FLATTENED_ARRAY_SIZE)
690688
return true;
691689

692690
return false;

src/solvers/flattening/boolbv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class boolbvt:public arrayst
3535
const namespacet &_ns,
3636
propt &_prop):
3737
arrayst(_ns, _prop),
38-
unbounded_array(unbounded_arrayt::U_NONE),
38+
unbounded_array(unbounded_arrayt::U_AUTO),
3939
boolbv_width(_ns),
4040
bv_utils(_prop),
4141
functions(*this),

0 commit comments

Comments
 (0)