Skip to content

Commit be0aa32

Browse files
author
Daniel Kroening
committed
format_expr: equality on booleans is now shown as 'iff'
This makes the output closer to usual mathematical convention.
1 parent 1a717aa commit be0aa32

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/util/format_expr.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ static std::ostream &format_rec(std::ostream &os, const multi_ary_exprt &src)
7878
operator_str = u8"\u2260"; // /=, U+2260
7979
else if(src.id() == ID_implies)
8080
operator_str = u8"\u21d2"; // =>, U+21D2
81+
else if(src.id() == ID_equal)
82+
{
83+
if(!src.operands().empty() && src.op0().type().id() == ID_bool)
84+
operator_str = u8"\u21d4"; // <=>, U+21D4
85+
else
86+
operator_str = "=";
87+
}
8188
else
8289
operator_str = id2string(src.id());
8390

0 commit comments

Comments
 (0)