Skip to content

Commit 20261da

Browse files
committed
SMV netlist: avoid parentheses around TRUE
This changes the returned precedence of TRUE when generating SMV netlists, avoiding unnecessary parentheses around TRUE.
1 parent 2be0696 commit 20261da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)