Skip to content

Commit 55b44ba

Browse files
committed
Goto trace: simplify io args, function arguments
This is to be consistent with other steps, which are simplified as part of building the goto trace.
1 parent d932d6f commit 55b44ba

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

Diff for: src/goto-symex/build_goto_trace.cpp

+7-12
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,12 @@ void build_goto_trace(
354354
goto_trace_step.io_id = SSA_step.io_id;
355355
goto_trace_step.formatted = SSA_step.formatted;
356356
goto_trace_step.called_function = SSA_step.called_function;
357-
goto_trace_step.function_arguments = SSA_step.converted_function_arguments;
358357

359-
for(auto &arg : goto_trace_step.function_arguments)
360-
arg = decision_procedure.get(arg);
358+
for(const auto &arg : SSA_step.converted_function_arguments)
359+
{
360+
goto_trace_step.function_arguments.push_back(
361+
simplify_expr(decision_procedure.get(arg), ns));
362+
}
361363

362364
// update internal field for specific variables in the counterexample
363365
update_internal_field(SSA_step, goto_trace_step, ns);
@@ -395,15 +397,8 @@ void build_goto_trace(
395397

396398
for(const auto &j : SSA_step.converted_io_args)
397399
{
398-
if(j.is_constant() || j.id() == ID_string_constant)
399-
{
400-
goto_trace_step.io_args.push_back(j);
401-
}
402-
else
403-
{
404-
exprt tmp = decision_procedure.get(j);
405-
goto_trace_step.io_args.push_back(tmp);
406-
}
400+
goto_trace_step.io_args.push_back(
401+
simplify_expr(decision_procedure.get(j), ns));
407402
}
408403

409404
if(SSA_step.is_assert() || SSA_step.is_assume() || SSA_step.is_goto())

0 commit comments

Comments
 (0)