Skip to content

Commit ccd9783

Browse files
author
Daniel Kroening
authored
Merge pull request #2818 from diffblue/trace-with-arguments
rename 'identifier' to 'function_identifier'
2 parents 91ad280 + 43c149d commit ccd9783

9 files changed

+29
-28
lines changed

src/goto-programs/goto_trace.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void goto_trace_stept::output(
6666
if(is_assert() || is_assume() || is_goto())
6767
out << " (" << cond_value << ")";
6868
else if(is_function_call() || is_function_return())
69-
out << ' ' << identifier;
69+
out << ' ' << function_identifier;
7070

7171
if(hidden)
7272
out << " hidden";
@@ -444,14 +444,14 @@ void show_goto_trace(
444444
case goto_trace_stept::typet::FUNCTION_CALL:
445445
function_depth++;
446446
if(options.show_function_calls)
447-
out << "\n#### Function call: " << step.identifier << " (depth "
448-
<< function_depth << ") ####\n";
447+
out << "\n#### Function call: " << step.function_identifier
448+
<< " (depth " << function_depth << ") ####\n";
449449
break;
450450
case goto_trace_stept::typet::FUNCTION_RETURN:
451451
function_depth--;
452452
if(options.show_function_calls)
453-
out << "\n#### Function return: " << step.identifier << " (depth "
454-
<< function_depth << ") ####\n";
453+
out << "\n#### Function return: " << step.function_identifier
454+
<< " (depth " << function_depth << ") ####\n";
455455
break;
456456
case goto_trace_stept::typet::SPAWN:
457457
case goto_trace_stept::typet::MEMORY_BARRIER:

src/goto-programs/goto_trace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class goto_trace_stept
120120
bool formatted;
121121

122122
// for function call/return
123-
irep_idt identifier;
123+
irep_idt function_identifier;
124124

125125
/*! \brief outputs the trace step in ASCII to a given stream
126126
*/

src/goto-programs/interpreter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,8 @@ void interpretert::execute_function_call()
771771
#if 0
772772
const memory_cellt &cell=memory[address];
773773
#endif
774-
const irep_idt &identifier=address_to_identifier(address);
775-
trace_step.identifier=identifier;
774+
const irep_idt &identifier = address_to_identifier(address);
775+
trace_step.function_identifier = identifier;
776776

777777
const goto_functionst::function_mapt::const_iterator f_it=
778778
goto_functions.function_map.find(identifier);

src/goto-programs/json_goto_trace.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ void convert_return(
274274
json_call_return["internal"] = jsont::json_boolean(step.internal);
275275
json_call_return["thread"] = json_numbert(std::to_string(step.thread_nr));
276276

277-
const symbolt &symbol = ns.lookup(step.identifier);
277+
const symbolt &symbol = ns.lookup(step.function_identifier);
278278
json_objectt &json_function = json_call_return["function"].make_object();
279279
json_function["displayName"] = json_stringt(symbol.display_name());
280-
json_function["identifier"] = json_stringt(step.identifier);
280+
json_function["identifier"] = json_stringt(step.function_identifier);
281281
json_function["sourceLocation"] = json(symbol.location);
282282

283283
if(!location.is_null())

src/goto-programs/xml_goto_trace.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,12 @@ void convert(
190190
xml_call_return.set_attribute("thread", std::to_string(step.thread_nr));
191191
xml_call_return.set_attribute("step_nr", std::to_string(step.step_nr));
192192

193-
const symbolt &symbol=ns.lookup(step.identifier);
193+
const symbolt &symbol = ns.lookup(step.function_identifier);
194194
xmlt &xml_function=xml_call_return.new_element("function");
195195
xml_function.set_attribute(
196196
"display_name", id2string(symbol.display_name()));
197-
xml_function.set_attribute("identifier", id2string(step.identifier));
197+
xml_function.set_attribute(
198+
"identifier", id2string(step.function_identifier));
198199
xml_function.new_element()=xml(symbol.location);
199200

200201
if(xml_location.name!="")

src/goto-symex/build_goto_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void build_goto_trace(
309309
goto_trace_step.format_string = SSA_step.format_string;
310310
goto_trace_step.io_id = SSA_step.io_id;
311311
goto_trace_step.formatted = SSA_step.formatted;
312-
goto_trace_step.identifier = SSA_step.identifier;
312+
goto_trace_step.function_identifier = SSA_step.function_identifier;
313313

314314
// update internal field for specific variables in the counterexample
315315
update_internal_field(SSA_step, goto_trace_step, ns);

src/goto-symex/symex_target.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ class symex_targett
104104
// record a function call
105105
virtual void function_call(
106106
const exprt &guard,
107-
const irep_idt &identifier,
107+
const irep_idt &function_identifier,
108108
const sourcet &source)=0;
109109

110110
// record return from a function
111111
virtual void function_return(
112112
const exprt &guard,
113-
const irep_idt &identifier,
113+
const irep_idt &function_identifier,
114114
const sourcet &source)=0;
115115

116116
// just record a location

src/goto-symex/symex_target_equation.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -209,33 +209,33 @@ void symex_target_equationt::location(
209209
/// just record a location
210210
void symex_target_equationt::function_call(
211211
const exprt &guard,
212-
const irep_idt &identifier,
212+
const irep_idt &function_identifier,
213213
const sourcet &source)
214214
{
215215
SSA_steps.push_back(SSA_stept());
216216
SSA_stept &SSA_step=SSA_steps.back();
217217

218-
SSA_step.guard=guard;
219-
SSA_step.type=goto_trace_stept::typet::FUNCTION_CALL;
220-
SSA_step.source=source;
221-
SSA_step.identifier=identifier;
218+
SSA_step.guard = guard;
219+
SSA_step.type = goto_trace_stept::typet::FUNCTION_CALL;
220+
SSA_step.source = source;
221+
SSA_step.function_identifier = function_identifier;
222222

223223
merge_ireps(SSA_step);
224224
}
225225

226226
/// just record a location
227227
void symex_target_equationt::function_return(
228228
const exprt &guard,
229-
const irep_idt &identifier,
229+
const irep_idt &function_identifier,
230230
const sourcet &source)
231231
{
232232
SSA_steps.push_back(SSA_stept());
233233
SSA_stept &SSA_step=SSA_steps.back();
234234

235-
SSA_step.guard=guard;
236-
SSA_step.type=goto_trace_stept::typet::FUNCTION_RETURN;
237-
SSA_step.source=source;
238-
SSA_step.identifier=identifier;
235+
SSA_step.guard = guard;
236+
SSA_step.type = goto_trace_stept::typet::FUNCTION_RETURN;
237+
SSA_step.source = source;
238+
SSA_step.function_identifier = function_identifier;
239239

240240
merge_ireps(SSA_step);
241241
}

src/goto-symex/symex_target_equation.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ class symex_target_equationt:public symex_targett
7474
// record a function call
7575
virtual void function_call(
7676
const exprt &guard,
77-
const irep_idt &identifier,
77+
const irep_idt &function_identifier,
7878
const sourcet &source);
7979

8080
// record return from a function
8181
virtual void function_return(
8282
const exprt &guard,
83-
const irep_idt &identifier,
83+
const irep_idt &function_identifier,
8484
const sourcet &source);
8585

8686
// just record a location
@@ -230,7 +230,7 @@ class symex_target_equationt:public symex_targett
230230
std::list<exprt> converted_io_args;
231231

232232
// for function call/return
233-
irep_idt identifier;
233+
irep_idt function_identifier;
234234

235235
// for SHARED_READ/SHARED_WRITE and ATOMIC_BEGIN/ATOMIC_END
236236
unsigned atomic_section_id=0;

0 commit comments

Comments
 (0)