File tree 2 files changed +19
-5
lines changed 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,21 @@ string_insertion_builtin_functiont::string_insertion_builtin_functiont(
215
215
const std::vector<exprt> &fun_args,
216
216
array_poolt &array_pool)
217
217
{
218
- PRECONDITION (fun_args.size () > 3 );
218
+ PRECONDITION (fun_args.size () > 4 );
219
+ const auto arg1 = expr_checked_cast<struct_exprt>(fun_args[2 ]);
220
+ input1 = array_pool.find (arg1.op1 (), arg1.op0 ());
221
+ const auto arg2 = expr_checked_cast<struct_exprt>(fun_args[4 ]);
222
+ input2 = array_pool.find (arg2.op1 (), arg2.op0 ());
223
+ result = array_pool.find (fun_args[1 ], fun_args[0 ]);
224
+ args.push_back (fun_args[3 ]);
225
+ args.insert (args.end (), fun_args.begin () + 5 , fun_args.end ());
226
+ }
227
+
228
+ string_concatenation_builtin_functiont::string_concatenation_builtin_functiont (
229
+ const std::vector<exprt> &fun_args,
230
+ array_poolt &array_pool)
231
+ {
232
+ PRECONDITION (fun_args.size () >= 4 && fun_args.size () <= 6 );
219
233
const auto arg1 = expr_checked_cast<struct_exprt>(fun_args[2 ]);
220
234
input1 = array_pool.find (arg1.op1 (), arg1.op0 ());
221
235
const auto arg2 = expr_checked_cast<struct_exprt>(fun_args[3 ]);
Original file line number Diff line number Diff line change @@ -246,6 +246,9 @@ class string_insertion_builtin_functiont : public string_builtin_functiont
246
246
247
247
optionalt<exprt>
248
248
eval (const std::function<exprt(const exprt &)> &get_value) const override ;
249
+
250
+ protected:
251
+ string_insertion_builtin_functiont () = default ;
249
252
};
250
253
251
254
class string_concatenation_builtin_functiont final
@@ -254,10 +257,7 @@ class string_concatenation_builtin_functiont final
254
257
public:
255
258
string_concatenation_builtin_functiont (
256
259
const std::vector<exprt> &fun_args,
257
- array_poolt &array_pool)
258
- : string_insertion_builtin_functiont(fun_args, array_pool)
259
- {
260
- }
260
+ array_poolt &array_pool);
261
261
262
262
std::vector<mp_integer> eval (
263
263
const std::vector<mp_integer> &input1_value,
You can’t perform that action at this time.
0 commit comments