Skip to content

Commit 8c1ffc9

Browse files
polgreentautschnig
authored andcommitted
make assumption output in trace reachable
Assumptions are never violated, instead they restrict the search space for non-det values
1 parent c2b5ee2 commit 8c1ffc9

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
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: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -522,22 +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
{
527527
out << "\n";
528528
out << "Assumption:\n";
529529

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

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

0 commit comments

Comments
 (0)