@@ -142,129 +142,3 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert(
142142 return add_axioms_for_insert (fresh_symbol, res, s1, s2, offset, array_pool);
143143 }
144144}
145-
146- // / add axioms corresponding to the StringBuilder.insert(I) java function
147- // / \deprecated should convert the value to string and call insert
148- // / \param fresh_symbol: generator of fresh symbols
149- // / \param f: function application with three arguments: a string, an
150- // / integer offset, and an integer
151- // / \param array_pool: pool of arrays representing strings
152- // / \param ns: namespace
153- // / \return an expression
154- DEPRECATED (SINCE(2017 , 10 , 5 , " convert the value to string and call insert" ))
155- std::pair<exprt, string_constraintst> add_axioms_for_insert_int(
156- symbol_generatort &fresh_symbol,
157- const function_application_exprt &f,
158- array_poolt &array_pool,
159- const namespacet &ns)
160- {
161- PRECONDITION (f.arguments ().size () == 5 );
162- const array_string_exprt s1 = get_string_expr (array_pool, f.arguments ()[2 ]);
163- const array_string_exprt res =
164- array_pool.find (f.arguments ()[1 ], f.arguments ()[0 ]);
165- const exprt &offset = f.arguments ()[3 ];
166- const typet &index_type = s1.length_type ();
167- const typet &char_type = s1.content ().type ().subtype ();
168- const array_string_exprt s2 = array_pool.fresh_string (index_type, char_type);
169- return combine_results (
170- add_axioms_for_string_of_int (s2, f.arguments ()[4 ], 0 , ns, array_pool),
171- add_axioms_for_insert (fresh_symbol, res, s1, s2, offset, array_pool));
172- }
173-
174- // / add axioms corresponding to the StringBuilder.insert(Z) java function
175- // / \deprecated should convert the value to string and call insert
176- // / \param fresh_symbol: generator of fresh symbols
177- // / \param f: function application with three arguments: a string, an
178- // / integer offset, and a Boolean
179- // / \param array_pool: pool of arrays representing strings
180- // / \return a new string expression
181- DEPRECATED (SINCE(2017 , 10 , 5 , " convert the value to string and call insert" ))
182- std::pair<exprt, string_constraintst> add_axioms_for_insert_bool(
183- symbol_generatort &fresh_symbol,
184- const function_application_exprt &f,
185- array_poolt &array_pool)
186- {
187- PRECONDITION (f.arguments ().size () == 5 );
188- const array_string_exprt s1 = get_string_expr (array_pool, f.arguments ()[0 ]);
189- const array_string_exprt res =
190- array_pool.find (f.arguments ()[1 ], f.arguments ()[0 ]);
191- const exprt &offset = f.arguments ()[3 ];
192- const typet &index_type = s1.length_type ();
193- const typet &char_type = s1.content ().type ().subtype ();
194- const array_string_exprt s2 = array_pool.fresh_string (index_type, char_type);
195- return combine_results (
196- add_axioms_from_bool (s2, f.arguments ()[4 ], array_pool),
197- add_axioms_for_insert (fresh_symbol, res, s1, s2, offset, array_pool));
198- }
199-
200- // / Add axioms corresponding to the StringBuilder.insert(C) java function
201- // / \todo This should be merged with add_axioms_for_insert.
202- // / \param fresh_symbol: generator of fresh symbols
203- // / \param f: function application with three arguments: a string, an
204- // / integer offset, and a character
205- // / \param array_pool: pool of arrays representing strings
206- // / \return an expression
207- std::pair<exprt, string_constraintst> add_axioms_for_insert_char (
208- symbol_generatort &fresh_symbol,
209- const function_application_exprt &f,
210- array_poolt &array_pool)
211- {
212- PRECONDITION (f.arguments ().size () == 5 );
213- const array_string_exprt res =
214- array_pool.find (f.arguments ()[1 ], f.arguments ()[0 ]);
215- const array_string_exprt s1 = get_string_expr (array_pool, f.arguments ()[2 ]);
216- const exprt &offset = f.arguments ()[3 ];
217- const typet &index_type = s1.length_type ();
218- const typet &char_type = s1.content ().type ().subtype ();
219- const array_string_exprt s2 = array_pool.fresh_string (index_type, char_type);
220- return combine_results (
221- add_axioms_from_char (s2, f.arguments ()[4 ], array_pool),
222- add_axioms_for_insert (fresh_symbol, res, s1, s2, offset, array_pool));
223- }
224-
225- // / add axioms corresponding to the StringBuilder.insert(D) java function
226- // / \deprecated should convert the value to string and call insert
227- // / \param fresh_symbol: generator of fresh symbols
228- // / \param f: function application with three arguments: a string, an
229- // / integer offset, and a double
230- // / \param array_pool: pool of arrays representing strings
231- // / \param ns: namespace
232- // / \return a string expression
233- DEPRECATED (SINCE(2017 , 10 , 5 , " convert the value to string and call insert" ))
234- std::pair<exprt, string_constraintst> add_axioms_for_insert_double(
235- symbol_generatort &fresh_symbol,
236- const function_application_exprt &f,
237- array_poolt &array_pool,
238- const namespacet &ns)
239- {
240- PRECONDITION (f.arguments ().size () == 5 );
241- const array_string_exprt res =
242- array_pool.find (f.arguments ()[1 ], f.arguments ()[0 ]);
243- const array_string_exprt s1 = get_string_expr (array_pool, f.arguments ()[2 ]);
244- const exprt &offset = f.arguments ()[3 ];
245- const typet &index_type = s1.length_type ();
246- const typet &char_type = s1.content ().type ().subtype ();
247- const array_string_exprt s2 = array_pool.fresh_string (index_type, char_type);
248- return combine_results (
249- add_axioms_for_string_of_float (
250- fresh_symbol, s2, f.arguments ()[4 ], array_pool, ns),
251- add_axioms_for_insert (fresh_symbol, res, s1, s2, offset, array_pool));
252- }
253-
254- // / Add axioms corresponding to the StringBuilder.insert(F) java function
255- // / \deprecated should convert the value to string and call insert
256- // / \param fresh_symbol: generator of fresh symbols
257- // / \param f: function application with three arguments: a string, an
258- // / integer offset, and a float
259- // / \param array_pool: pool of arrays representing strings
260- // / \param ns: namespace
261- // / \return a new string expression
262- DEPRECATED (SINCE(2017 , 10 , 5 , " convert the value to string and call insert" ))
263- std::pair<exprt, string_constraintst> add_axioms_for_insert_float(
264- symbol_generatort &fresh_symbol,
265- const function_application_exprt &f,
266- array_poolt &array_pool,
267- const namespacet &ns)
268- {
269- return add_axioms_for_insert_double (fresh_symbol, f, array_pool, ns);
270- }
0 commit comments