File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 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(
215215 const std::vector<exprt> &fun_args,
216216 array_poolt &array_pool)
217217{
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 );
219233 const auto arg1 = expr_checked_cast<struct_exprt>(fun_args[2 ]);
220234 input1 = array_pool.find (arg1.op1 (), arg1.op0 ());
221235 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
246246
247247 optionalt<exprt>
248248 eval (const std::function<exprt(const exprt &)> &get_value) const override ;
249+
250+ protected:
251+ string_insertion_builtin_functiont () = default ;
249252};
250253
251254class string_concatenation_builtin_functiont final
@@ -254,10 +257,7 @@ class string_concatenation_builtin_functiont final
254257public:
255258 string_concatenation_builtin_functiont (
256259 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);
261261
262262 std::vector<mp_integer> eval (
263263 const std::vector<mp_integer> &input1_value,
You can’t perform that action at this time.
0 commit comments