Skip to content

Remove SSA ids from goto trace #986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions regression/cbmc/pointer-function-parameters-2/test.desc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ main.c
^\*\* Used 4 iterations$
^Test suite:$
^a=\(\(signed int \*\*\)NULL\), tmp\$1=[^,]*, tmp\$2=[^,]*$
^a=&tmp\$1!0, tmp\$1=\(\(signed int \*\)NULL\), tmp\$2=[^,]*$
^a=&tmp\$1!0, tmp\$1=&tmp\$2!0, tmp\$2=([012356789][0-9]*|4[0-9]+)$
^a=&tmp\$1!0, tmp\$1=&tmp\$2!0, tmp\$2=4$
^a=&tmp\$1, tmp\$1=\(\(signed int \*\)NULL\), tmp\$2=[^,]*$
^a=&tmp\$1, tmp\$1=&tmp\$2, tmp\$2=([012356789][0-9]*|4[0-9]+)$
^a=&tmp\$1, tmp\$1=&tmp\$2, tmp\$2=4$
--
^warning: ignoring
4 changes: 2 additions & 2 deletions regression/cbmc/pointer-function-parameters/test.desc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ main.c
^\*\* Used 3 iterations$
^Test suite:$
^a=\(\(signed int \*\)NULL\), tmp\$1=[^,]*$
^a=&tmp\$1!0, tmp\$1=4$
^a=&tmp\$1!0, tmp\$1=([012356789][0-9]*|4[0-9]+)$
^a=&tmp\$1, tmp\$1=4$
^a=&tmp\$1, tmp\$1=([012356789][0-9]*|4[0-9]+)$
--
^warning: ignoring
13 changes: 11 additions & 2 deletions src/goto-symex/build_goto_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,17 @@ void build_goto_trace(
goto_trace_step.io_args.push_back(j);
else
{
exprt tmp=prop_conv.get(j);
goto_trace_step.io_args.push_back(tmp);
// we only expect constants here
exprt expr=to_constant_expr(prop_conv.get(j));
if(expr.has_operands() && expr.op0().id()==ID_address_of)
{
exprt *op=&(to_address_of_expr(expr.op0()).object());
while(op->id()==ID_member || op->id()==ID_index)
op=&(op->op0());
*op=to_ssa_expr(*op).get_original_expr();
}
// use expr in the output
goto_trace_step.io_args.push_back(expr);
}
}

Expand Down