@@ -172,7 +172,6 @@ array_string_exprt string_constraint_generatort::fresh_string(
172
172
symbol_exprt content = fresh_symbol (" string_content" , array_type);
173
173
array_string_exprt str = to_array_string_expr (content);
174
174
created_strings.insert (str);
175
- add_default_axioms (str);
176
175
return str;
177
176
}
178
177
@@ -279,7 +278,7 @@ exprt string_constraint_generatort::associate_array_to_pointer(
279
278
280
279
const exprt &pointer_expr = f.arguments ()[1 ];
281
280
array_pool.insert (pointer_expr, array_expr);
282
- add_default_axioms (to_array_string_expr (array_expr));
281
+ created_strings. emplace (to_array_string_expr (array_expr));
283
282
return from_integer (0 , f.type ());
284
283
}
285
284
@@ -319,27 +318,6 @@ void string_constraint_generatort::clear_constraints()
319
318
not_contains_constraints.clear ();
320
319
}
321
320
322
- // / adds standard axioms about the length of the string and its content: * its
323
- // / length should be positive * it should not exceed max_string_length * if
324
- // / force_printable_characters is true then all characters should belong to the
325
- // / range of ASCII characters between ' ' and '~'
326
- // / \param s: a string expression
327
- // / \return a string expression that is linked to the argument through axioms
328
- // / that are added to the list
329
- void string_constraint_generatort::add_default_axioms (
330
- const array_string_exprt &s)
331
- {
332
- // If `s` was already added we do nothing.
333
- if (!created_strings.insert (s).second )
334
- return ;
335
-
336
- const exprt index_zero = from_integer (0 , s.length ().type ());
337
- lemmas.push_back (s.axiom_for_length_ge (index_zero));
338
-
339
- if (max_string_length!=std::numeric_limits<size_t >::max ())
340
- lemmas.push_back (s.axiom_for_length_le (max_string_length));
341
- }
342
-
343
321
// / Add constraint on characters of a string.
344
322
// /
345
323
// / This constraint is
@@ -409,13 +387,14 @@ array_string_exprt array_poolt::find(const exprt &pointer, const exprt &length)
409
387
}
410
388
411
389
// / Adds creates a new array if it does not already exists
412
- // / \todo This should be replaced by associate_char_array_to_char_pointer
390
+ // / \todo This should be replaced
391
+ // / by array_poolt.make_char_array_for_char_pointer
413
392
array_string_exprt string_constraint_generatort::char_array_of_pointer (
414
393
const exprt &pointer,
415
394
const exprt &length)
416
395
{
417
396
const array_string_exprt array = array_pool.find (pointer, length);
418
- add_default_axioms (array);
397
+ created_strings. insert (array);
419
398
return array;
420
399
}
421
400
0 commit comments