Skip to content

Commit 09612df

Browse files
author
Daniel Kroening
committed
symex_target_equationt now has 'called_function' field
1 parent 3def534 commit 09612df

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

src/goto-symex/build_goto_trace.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ void build_goto_trace(
305305
goto_trace_step.format_string = SSA_step.format_string;
306306
goto_trace_step.io_id = SSA_step.io_id;
307307
goto_trace_step.formatted = SSA_step.formatted;
308-
goto_trace_step.function_identifier = SSA_step.function_identifier;
308+
goto_trace_step.function_identifier = SSA_step.called_function;
309309
goto_trace_step.function_arguments = SSA_step.converted_function_arguments;
310310

311311
for(auto &arg : goto_trace_step.function_arguments)

src/goto-symex/symex_function_call.cpp

+2-3
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
{
@@ -359,8 +359,7 @@ void goto_symext::pop_frame(statet &state)
359359
void goto_symext::symex_end_of_function(statet &state)
360360
{
361361
// first record the return
362-
target.function_return(
363-
state.guard.as_expr(), state.source.function, state.source);
362+
target.function_return(state.guard.as_expr(), state.source);
364363

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

src/goto-symex/symex_target.h

-1
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

+1-3
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

+2-3
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)