Skip to content

Commit c7d54ca

Browse files
author
Daniel Kroening
committed
symex_target_equationt now has 'called_function' field
1 parent 12afabb commit c7d54ca

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

src/goto-symex/build_goto_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ void build_goto_trace(
308308
goto_trace_step.format_string = SSA_step.format_string;
309309
goto_trace_step.io_id = SSA_step.io_id;
310310
goto_trace_step.formatted = SSA_step.formatted;
311-
goto_trace_step.function_identifier = SSA_step.function_identifier;
311+
goto_trace_step.function_identifier = SSA_step.called_function;
312312
goto_trace_step.function_arguments = SSA_step.converted_function_arguments;
313313

314314
for(auto &arg : goto_trace_step.function_arguments)

src/goto-symex/symex_function_call.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ void goto_symext::symex_function_call_code(
267267
no_body(identifier);
268268

269269
// record the return
270-
target.function_return(state.guard.as_expr(), identifier, state.source);
270+
target.function_return(state.guard.as_expr(), state.source);
271271

272272
if(call.lhs().is_not_nil())
273273
{
@@ -358,8 +358,7 @@ void goto_symext::pop_frame(statet &state)
358358
void goto_symext::symex_end_of_function(statet &state)
359359
{
360360
// first record the return
361-
target.function_return(
362-
state.guard.as_expr(), state.source.function, state.source);
361+
target.function_return(state.guard.as_expr(), state.source);
363362

364363
// then get rid of the frame
365364
pop_frame(state);

src/goto-symex/symex_target.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ class symex_targett
110110
// record return from a function
111111
virtual void function_return(
112112
const exprt &guard,
113-
const irep_idt &function_identifier,
114113
const sourcet &source)=0;
115114

116115
// just record a location

src/goto-symex/symex_target_equation.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void symex_target_equationt::function_call(
219219
SSA_step.guard = guard;
220220
SSA_step.type = goto_trace_stept::typet::FUNCTION_CALL;
221221
SSA_step.source = source;
222-
SSA_step.function_identifier = function_identifier;
222+
SSA_step.called_function = function_identifier;
223223
SSA_step.ssa_function_arguments = ssa_function_arguments;
224224

225225
merge_ireps(SSA_step);
@@ -228,7 +228,6 @@ void symex_target_equationt::function_call(
228228
/// just record a location
229229
void symex_target_equationt::function_return(
230230
const exprt &guard,
231-
const irep_idt &function_identifier,
232231
const sourcet &source)
233232
{
234233
SSA_steps.push_back(SSA_stept());
@@ -237,7 +236,6 @@ void symex_target_equationt::function_return(
237236
SSA_step.guard = guard;
238237
SSA_step.type = goto_trace_stept::typet::FUNCTION_RETURN;
239238
SSA_step.source = source;
240-
SSA_step.function_identifier = function_identifier;
241239

242240
merge_ireps(SSA_step);
243241
}

src/goto-symex/symex_target_equation.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ class symex_target_equationt:public symex_targett
8181
// record return from a function
8282
virtual void function_return(
8383
const exprt &guard,
84-
const irep_idt &function_identifier,
8584
const sourcet &source);
8685

8786
// just record a location
@@ -231,8 +230,8 @@ class symex_target_equationt:public symex_targett
231230
std::list<exprt> io_args;
232231
std::list<exprt> converted_io_args;
233232

234-
// for function call/return
235-
irep_idt function_identifier;
233+
// for function calls: the function that is called
234+
irep_idt called_function;
236235

237236
// for function calls
238237
std::vector<exprt> ssa_function_arguments,

0 commit comments

Comments
 (0)