Skip to content
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
1 change: 1 addition & 0 deletions regression/ebmc/smv/smv_ltlspec3.desc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ smv_ltlspec3.smv
^EXIT=10$
^SIGNAL=0$
^\[main::spec1\] X X main::var::x = TRUE: REFUTED$
^Counterexample with 3 states:$
^main::var::x@0 = FALSE$
^main::var::x@1 = FALSE$
^main::var::x@2 = FALSE$
Expand Down
2 changes: 1 addition & 1 deletion regression/ebmc/traces/numbered1.desc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ waveform1.smv
^EXIT=10$
^SIGNAL=0$
^\[main::spec1\] .* REFUTED$
^Counterexample:$
^Counterexample with 21 states:$
^main::var::y@0 = 0$
^main::var::y@10 = 100$
^main::var::y@20 = 200$
Expand Down
2 changes: 1 addition & 1 deletion regression/verilog/SVA/cover1.desc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CORE
cover1.sv
--bound 10 --numbered-trace
^\[main\.property\.p0\] cover main\.counter == 1: PROVED$
^Trace:$
^Trace with 2 states:$
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and above: is "2" the only possible case, or could this change with the solver picking a different model? If so, it should perhaps be with \d+ states.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The desired outcome is that this is the only answer, as the shortest counterexample. It's a TODO item to see whether say incremental SAT could do so deterministically.

^main\.counter@0 = 0$
^main\.counter@1 = 1$
^\[main\.property\.p1\] cover main\.counter == 100: REFUTED up to bound 10$
Expand Down
12 changes: 11 additions & 1 deletion src/ebmc/report_results.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,17 @@ void report_results(
}
else if(cmdline.isset("numbered-trace"))
{
message.status() << term() << ":" << messaget::eom;
message.status() << term();
auto failing_opt =
property.witness_trace->get_min_failing_timeframe();
if(failing_opt.has_value())
{
if(*failing_opt == 0)
message.status() << " with 1 state";
else
message.status() << " with " << *failing_opt + 1 << " states";
}
message.status() << ':' << messaget::eom;
show_trans_trace_numbered(
property.witness_trace.value(), message, ns, std::cout);
}
Expand Down