File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,12 @@ class string_constraint_generatort final
136
136
137
137
array_poolt array_pool;
138
138
139
+ // / Associate array to pointer, and array to length
140
+ // / \return an expression if the given function application is one of
141
+ // / associate pointer and associate length
142
+ optionalt<exprt>
143
+ make_array_pointer_association (const function_application_exprt &expr);
144
+
139
145
// Type used by primitives to signal errors
140
146
const signedbv_typet get_return_code_type ()
141
147
{
Original file line number Diff line number Diff line change @@ -437,6 +437,17 @@ static irep_idt get_function_name(const function_application_exprt &expr)
437
437
: to_symbol_expr (name).get_identifier ();
438
438
}
439
439
440
+ optionalt<exprt> string_constraint_generatort::make_array_pointer_association (
441
+ const function_application_exprt &expr)
442
+ {
443
+ const irep_idt &id = get_function_name (expr);
444
+ if (id == ID_cprover_associate_array_to_pointer_func)
445
+ return associate_array_to_pointer (expr);
446
+ else if (id == ID_cprover_associate_length_to_array_func)
447
+ return associate_length_to_array (expr);
448
+ return {};
449
+ }
450
+
440
451
// / strings contained in this call are converted to objects of type
441
452
// / `string_exprt`, through adding axioms. Axioms are then added to enforce that
442
453
// / the result corresponds to the function application.
You can’t perform that action at this time.
0 commit comments