Skip to content

Commit 4a122da

Browse files
authored
Merge pull request #276 from diffblue/k-induction-bugfix
ebmc: bugfix for k-induction
2 parents b30a313 + d6c395e commit 4a122da

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

regression/ebmc/k-induction/k-induction3.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ k-induction3.v
33
--module main --bound 9 --k-induction
44
^EXIT=10$
55
^SIGNAL=0$
6-
^\[main.property.p1] .* INCONCLUSIVE$
6+
^\[main.property.p1] .* REFUTED$
77
--
88
^warning: ignoring

regression/ebmc/k-induction/k-induction3.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ initial a = 0;
66

77
always @ (posedge clock) begin
88
a = a+1;
9+
// expected to be refuted with k >= 9
910
assert p1: a!=10;
1011
end
1112

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
KNOWNBUG
1+
CORE
22
k-induction5.v
33
--module main --bound 1 --k-induction
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main.property.property1\] .* PROVED$
7-
^\[main.property.property2\] .* INCONCLUSIVE$
7+
^\[main.property.property2\] .* REFUTED$
88
--
99
^warning: ignoring
1010
--
11-
The result for property2 should be REFUTED.

regression/ebmc/k-induction/k-induction5.k-3.desc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ k-induction5.v
44
^EXIT=10$
55
^SIGNAL=0$
66
^\[main.property.property1\] .* PROVED$
7-
^\[main.property.property2\] .* PROVED$
7+
^\[main.property.property2\] .* REFUTED$
88
--
99
^warning: ignoring
1010
--
11-
The result for property2 should be REFUTED.

src/ebmc/k_induction.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ int k_inductiont::induction_step()
173173
p_it.is_failure())
174174
continue;
175175

176+
// Do not run the step case for properties that have
177+
// failed the base case already. Properties may pass the step
178+
// case, but are still false when the base case fails.
179+
if(p_it.is_refuted())
180+
continue;
181+
176182
auto solver_wrapper = solver_factory(ns, message.get_message_handler());
177183
auto &solver = solver_wrapper.decision_procedure();
178184

0 commit comments

Comments
 (0)