Skip to content

Commit 71983b3

Browse files
Remove mention of size in eval_string
The length field is not actually used and maybe incorrect since constraints are not necessarily added.
1 parent 4cca831 commit 71983b3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/solvers/refinement/string_builtin_function.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,12 @@ optionalt<std::vector<mp_integer>> eval_string(
9696
: eval_string(to_array_string_expr(ite.false_case()), get_value);
9797
}
9898

99-
const auto size = numeric_cast<std::size_t>(get_value(a.length()));
10099
const exprt content = get_value(a.content());
101100
const auto &array = expr_try_dynamic_cast<array_exprt>(content);
102-
if(!size || !array)
101+
if(!array)
103102
return {};
104103

105104
const auto &ops = array->operands();
106-
INVARIANT(*size == ops.size(), "operands size should match string size");
107-
108105
std::vector<mp_integer> result;
109106
const mp_integer unknown('?');
110107
const auto &insert = std::back_inserter(result);

0 commit comments

Comments
 (0)