Skip to content

Change "violated assumption" to "assumption" in trace #2511

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
merged 2 commits into from
Mar 2, 2019
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
2 changes: 1 addition & 1 deletion regression/cbmc/multiple-goto-traces/test.desc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ activate-multi-line-match
^EXIT=10$
^SIGNAL=0$
VERIFICATION FAILED
Trace for main\.assertion\.1:(\n.*){16} assertion 4 \!= argc(\n.*){5}Trace for main\.assertion\.3:(\n.*){30} assertion argc != 4(\n.*){5}Trace for main\.assertion\.4:(\n.*){44} assertion argc \+ 1 != 5
Trace for main\.assertion\.1:(\n.*){22} assertion 4 \!= argc(\n.*){5}Trace for main\.assertion\.3:(\n.*){36} assertion argc != 4(\n.*){5}Trace for main\.assertion\.4:(\n.*){50} assertion argc \+ 1 != 5
\*\* 3 of 4 failed
--
^warning: ignoring
Expand Down
17 changes: 6 additions & 11 deletions src/goto-programs/goto_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,21 +522,16 @@ void show_full_goto_trace(
break;

case goto_trace_stept::typet::ASSUME:
if(!step.cond_value)
if(step.cond_value && step.pc->is_assume())
{
out << '\n';
out << "Violated assumption:" << '\n';
out << "\n";
out << "Assumption:\n";

if(!step.pc->source_location.is_nil())
out << " " << step.pc->source_location << '\n';

if(step.pc->is_assume())
{
out << " "
<< from_expr(ns, step.function_id, step.pc->get_condition())
<< '\n';
}

out << '\n';
out << " " << from_expr(ns, step.function_id, step.pc->get_condition())
<< '\n';
}
break;

Expand Down