Skip to content

Commit f552b6e

Browse files
committed
numbered trace output now includes number of states
This enables writing tests that check the length of the witness trace.
1 parent d3071f4 commit f552b6e

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

regression/ebmc/smv/smv_ltlspec3.desc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ smv_ltlspec3.smv
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main::spec1\] X X main::var::x = TRUE: REFUTED$
7+
^Counterexample with 3 states:$
78
^main::var::x@0 = FALSE$
89
^main::var::x@1 = FALSE$
910
^main::var::x@2 = FALSE$

regression/ebmc/traces/numbered1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ waveform1.smv
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main::spec1\] .* REFUTED$
7-
^Counterexample:$
7+
^Counterexample with 21 states:$
88
^main::var::y@0 = 0$
99
^main::var::y@10 = 100$
1010
^main::var::y@20 = 200$

regression/verilog/SVA/cover1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CORE
22
cover1.sv
33
--bound 10 --numbered-trace
44
^\[main\.property\.p0\] cover main\.counter == 1: PROVED$
5-
^Trace:$
5+
^Trace with 2 states:$
66
^main\.counter@0 = 0$
77
^main\.counter@1 = 1$
88
^\[main\.property\.p1\] cover main\.counter == 100: REFUTED up to bound 10$

src/ebmc/report_results.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,17 @@ void report_results(
135135
}
136136
else if(cmdline.isset("numbered-trace"))
137137
{
138-
message.status() << term() << ":" << messaget::eom;
138+
message.status() << term();
139+
auto failing_opt =
140+
property.witness_trace->get_min_failing_timeframe();
141+
if(failing_opt.has_value())
142+
{
143+
if(*failing_opt == 0)
144+
message.status() << " with 1 state";
145+
else
146+
message.status() << " with " << *failing_opt + 1 << " states";
147+
}
148+
message.status() << ':' << messaget::eom;
139149
show_trans_trace_numbered(
140150
property.witness_trace.value(), message, ns, std::cout);
141151
}

0 commit comments

Comments
 (0)