Skip to content

Commit 5f54fcf

Browse files
authored
Merge pull request #780 from diffblue/assume2
EBMC: retain assumptions when using `--property`
2 parents 88a0e54 + 2dc3c7d commit 5f54fcf

File tree

6 files changed

+22
-2
lines changed

6 files changed

+22
-2
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Verilog: allow indexed part select
77
* word-level BMC: fix for F/s_eventually and U/s_until
88
* IC3: liveness to safety translation
9+
* Assumptions are not disabled when using --property
910

1011
# EBMC 5.2
1112

regression/ebmc/assume1/test.desc renamed to regression/ebmc/assumptions/assume1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CORE
2-
main.v
2+
assume1.v
33
--module main --bound 3 --aig --vl2smv-extensions
44
^\[main\.property\.a1\] assume always 10 <= main\.a && main\.a <= 100: ASSUMED$
55
^\[main\.property\.p1\] always main\.a != 200: PROVED up to bound 3$
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
assume2.sv
3+
--bound 0 --property main.p1
4+
^\[main\.a1\] assume always 10 <= main\.a && main\.a <= 100: ASSUMED$
5+
^\[main\.p1\] always main\.a != 200: PROVED up to bound 0$
6+
^EXIT=0$
7+
^SIGNAL=0$
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module main(input [31:0] a);
2+
3+
a1: assume final (10<=a && a<=100);
4+
5+
p1: assert final (a!=200);
6+
7+
// would fail
8+
p2: assert final (a!=20);
9+
10+
endmodule

src/ebmc/ebmc_properties.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ bool ebmc_propertiest::select_property(
110110
{
111111
std::string property = cmdline.get_value("property");
112112

113+
// disable all assertions (not: assumptions)
113114
for(auto &p : properties)
114-
p.status = propertyt::statust::DISABLED;
115+
if(!p.is_assumed())
116+
p.status = propertyt::statust::DISABLED;
115117

116118
bool found = false;
117119

0 commit comments

Comments
 (0)