Skip to content

Commit a35d547

Browse files
authored
Merge pull request #2511 from polgreen/fix_trace_wording
Change "violated assumption" to "assumption" in trace
2 parents 2ee5a33 + 8c1ffc9 commit a35d547

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

regression/cbmc/multiple-goto-traces/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ activate-multi-line-match
55
^EXIT=10$
66
^SIGNAL=0$
77
VERIFICATION FAILED
8-
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
8+
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
99
\*\* 3 of 4 failed
1010
--
1111
^warning: ignoring

src/goto-programs/goto_trace.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -522,21 +522,16 @@ void show_full_goto_trace(
522522
break;
523523

524524
case goto_trace_stept::typet::ASSUME:
525-
if(!step.cond_value)
525+
if(step.cond_value && step.pc->is_assume())
526526
{
527-
out << '\n';
528-
out << "Violated assumption:" << '\n';
527+
out << "\n";
528+
out << "Assumption:\n";
529+
529530
if(!step.pc->source_location.is_nil())
530531
out << " " << step.pc->source_location << '\n';
531532

532-
if(step.pc->is_assume())
533-
{
534-
out << " "
535-
<< from_expr(ns, step.function_id, step.pc->get_condition())
536-
<< '\n';
537-
}
538-
539-
out << '\n';
533+
out << " " << from_expr(ns, step.function_id, step.pc->get_condition())
534+
<< '\n';
540535
}
541536
break;
542537

0 commit comments

Comments
 (0)