We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa2b500 commit 258f38aCopy full SHA for 258f38a
src/solvers/refinement/string_refinement_util.cpp
@@ -223,6 +223,17 @@ optionalt<std::vector<mp_integer>> eval_string(
223
const array_string_exprt &a,
224
const std::function<exprt(const exprt&)> &get_value)
225
{
226
+ if(a.id() == ID_if)
227
+ {
228
+ const if_exprt &ite = to_if_expr(a);
229
+ const exprt cond = get_value(ite.cond());
230
+ if(!cond.is_constant())
231
+ return {};
232
+ return cond.is_true()
233
+ ? eval_string(to_array_string_expr(ite.true_case()), get_value)
234
+ : eval_string(to_array_string_expr(ite.false_case()), get_value);
235
+ }
236
+
237
const auto size = numeric_cast<std::size_t>(get_value(a.length()));
238
const exprt content = get_value(a.content());
239
const auto &array = expr_try_dynamic_cast<array_exprt>(content);
0 commit comments