Skip to content

Commit 37900c3

Browse files
authored
Merge pull request #1637 from diffblue/p-command-line-option2
ensure that command-line properties are boolean
2 parents 116668c + 3a04a5d commit 37900c3

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# EBMC 5.10
22

3+
* cast properties given with -p to Boolean if need be
4+
35
# EBMC 5.9
46

57
* Verilog: use top-level module for verification, instead of "main"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
p-command-line-option2.v
3+
--bound 1 -p "0"
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^\[command-line assertion\] always 0: REFUTED$
7+
--
8+
^warning: ignoring
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module main(input clk);
2+
3+
endmodule

src/ebmc/ebmc_properties.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ ebmc_propertiest ebmc_propertiest::from_command_line(
159159
throw ebmc_errort() << "failed to parse the given property expression";
160160
}
161161

162+
// We want the property to be boolean.
163+
expr = typecast_exprt::conditional_cast(expr, bool_typet{});
164+
162165
// We give it an implict always, as in SVA
163166

164167
if(expr.id() != ID_sva_always)

0 commit comments

Comments
 (0)