@@ -91,12 +91,12 @@ string_exprt string_constraint_generatort::add_axioms_for_concat(
91
91
const function_application_exprt &f)
92
92
{
93
93
const function_application_exprt::argumentst &args=f.arguments ();
94
- assert (args.size ()>=2 );
94
+ PRECONDITION (args.size ()>=2 );
95
95
string_exprt s1=get_string_expr (args[0 ]);
96
96
string_exprt s2=get_string_expr (args[1 ]);
97
97
if (args.size ()!=2 )
98
98
{
99
- assert (args.size ()==4 );
99
+ PRECONDITION (args.size ()==4 );
100
100
return add_axioms_for_concat_substr (s1, s2, args[2 ], args[3 ]);
101
101
}
102
102
return add_axioms_for_concat (s1, s2);
@@ -160,7 +160,7 @@ string_exprt string_constraint_generatort::add_axioms_for_concat_double(
160
160
const function_application_exprt &f)
161
161
{
162
162
string_exprt s1=get_string_expr (args (f, 2 )[0 ]);
163
- assert (refined_string_typet::is_refined_string_type (f.type ()));
163
+ PRECONDITION (refined_string_typet::is_refined_string_type (f.type ()));
164
164
refined_string_typet ref_type=to_refined_string_type (f.type ());
165
165
string_exprt s2=add_axioms_from_float (args (f, 2 )[1 ], ref_type, true );
166
166
return add_axioms_for_concat (s1, s2);
@@ -173,7 +173,7 @@ string_exprt string_constraint_generatort::add_axioms_for_concat_float(
173
173
const function_application_exprt &f)
174
174
{
175
175
string_exprt s1=get_string_expr (args (f, 2 )[0 ]);
176
- assert (refined_string_typet::is_refined_string_type (f.type ()));
176
+ PRECONDITION (refined_string_typet::is_refined_string_type (f.type ()));
177
177
refined_string_typet ref_type=to_refined_string_type (f.type ());
178
178
string_exprt s2=add_axioms_from_float (args (f, 2 )[1 ], ref_type, false );
179
179
return add_axioms_for_concat (s1, s2);
0 commit comments