@@ -178,17 +178,26 @@ void goto_symext::symex_function_call(
178
178
{
179
179
const exprt &function = instruction.call_function ();
180
180
181
- // If at some point symex_function_call can support more
182
- // expression ids(), like ID_Dereference, please expand the
183
- // precondition appropriately.
184
- PRECONDITION (function.id () == ID_symbol);
185
-
186
- symex_function_call_symbol (
187
- get_goto_function,
188
- state,
189
- instruction.call_lhs (),
190
- to_symbol_expr (instruction.call_function ()),
191
- instruction.call_arguments ());
181
+ PRECONDITION (function.id () == ID_symbol || function.id () == ID_dereference);
182
+
183
+ if (function.id () == ID_symbol)
184
+ {
185
+ symex_function_call_symbol (
186
+ get_goto_function,
187
+ state,
188
+ instruction.call_lhs (),
189
+ to_symbol_expr (function),
190
+ instruction.call_arguments ());
191
+ }
192
+ else if (function.id () == ID_dereference)
193
+ {
194
+ symex_function_call_dereference (
195
+ get_goto_function,
196
+ state,
197
+ instruction.call_lhs (),
198
+ to_dereference_expr (function),
199
+ instruction.call_arguments ());
200
+ }
192
201
}
193
202
194
203
void goto_symext::symex_function_call_symbol (
@@ -218,6 +227,19 @@ void goto_symext::symex_function_call_symbol(
218
227
get_goto_function, state, cleaned_lhs, function, cleaned_arguments);
219
228
}
220
229
230
+ void goto_symext::symex_function_call_dereference (
231
+ const get_goto_functiont &get_goto_function,
232
+ statet &state,
233
+ const exprt &lhs,
234
+ const dereference_exprt &function,
235
+ const exprt::operandst &arguments)
236
+ {
237
+ // need to clean the function pointer expression
238
+ auto cleaned_function = clean_expr (function, state, false );
239
+
240
+ // we get an if-then-else nest that contains symbols
241
+ }
242
+
221
243
void goto_symext::symex_function_call_post_clean (
222
244
const get_goto_functiont &get_goto_function,
223
245
statet &state,
0 commit comments