Skip to content

Commit d48fb7c

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 0060417 commit d48fb7c

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/goto-symex/build_goto_trace.cpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,12 @@ void build_goto_trace(
353353
goto_trace_step.io_id = SSA_step.io_id;
354354
goto_trace_step.formatted = SSA_step.formatted;
355355
goto_trace_step.called_function = SSA_step.called_function;
356-
goto_trace_step.function_arguments = SSA_step.converted_function_arguments;
357356

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

361363
// update internal field for specific variables in the counterexample
362364
update_internal_field(SSA_step, goto_trace_step, ns);
@@ -394,15 +396,8 @@ void build_goto_trace(
394396

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

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

0 commit comments

Comments
 (0)