Skip to content

Commit c9ca311

Browse files
committed
Enable 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. This reverts #6232, but now includes additional changes to the array theory to handle nested struct members no different from members of a top-level struct. Fixes: #2018
1 parent 8d6f87b commit c9ca311

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/solvers/flattening/arrays.cpp

+1-10
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,6 @@ void arrayst::collect_arrays(const exprt &a)
195195
}
196196
else if(a.id()==ID_member)
197197
{
198-
const auto &struct_op = to_member_expr(a).struct_op();
199-
200-
DATA_INVARIANT(
201-
struct_op.id() == ID_symbol || struct_op.id() == ID_nondet_symbol,
202-
"unexpected array expression: member with '" + struct_op.id_string() +
203-
"'");
204198
}
205199
else if(a.id()==ID_constant ||
206200
a.id()==ID_array ||
@@ -494,10 +488,7 @@ void arrayst::add_array_constraints(
494488
expr.id()==ID_string_constant)
495489
{
496490
}
497-
else if(
498-
expr.id() == ID_member &&
499-
(to_member_expr(expr).struct_op().id() == ID_symbol ||
500-
to_member_expr(expr).struct_op().id() == ID_nondet_symbol))
491+
else if(expr.id() == ID_member)
501492
{
502493
}
503494
else if(expr.id()==ID_byte_update_little_endian ||

src/solvers/flattening/boolbv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class boolbvt:public arrayst
4949
message_handlert &message_handler,
5050
bool get_array_constraints = false)
5151
: arrayst(_ns, _prop, message_handler, get_array_constraints),
52-
unbounded_array(unbounded_arrayt::U_NONE),
52+
unbounded_array(unbounded_arrayt::U_AUTO),
5353
bv_width(_ns),
5454
bv_utils(_prop),
5555
functions(*this),

0 commit comments

Comments
 (0)