Skip to content

Commit 72216e0

Browse files
authored
Merge pull request #1394 from diffblue/smv-TRUE-paren
SMV netlist: avoid parentheses around TRUE
2 parents 620025a + 4d71419 commit 72216e0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

regression/ebmc/smv-netlist/s_until1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CORE
22
s_until1.sv
33
--smv-netlist
44
^LTLSPEC \(\!node144\) U node151$
5-
^LTLSPEC \(TRUE\) U node158$
5+
^LTLSPEC TRUE U node158$
66
^EXIT=0$
77
^SIGNAL=0$
88
--

src/trans-netlist/smv_netlist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void print_smv(const netlistt &netlist, std::ostream &out, const exprt &expr)
106106
std::ostringstream buffer;
107107
auto l = to_literal_expr(expr).get_literal();
108108
print_smv(netlist, buffer, l);
109-
if(l.sign())
109+
if(l.sign() && !l.is_constant())
110110
return {precedencet::NOT, buffer.str()};
111111
else
112112
return {precedencet::MAX, buffer.str()};

0 commit comments

Comments
 (0)