@@ -17,6 +17,7 @@ Author: Daniel Kroening, kroening@kroening.com
17
17
#include " format_type.h"
18
18
#include " ieee_float.h"
19
19
#include " invariant.h"
20
+ #include " lispexpr.h"
20
21
#include " mp_arith.h"
21
22
#include " rational.h"
22
23
#include " rational_tools.h"
@@ -128,12 +129,18 @@ static std::ostream &format_rec(
128
129
else
129
130
return os << src.pretty ();
130
131
}
131
- else if (type == ID_unsignedbv || type == ID_signedbv)
132
+ else if (type == ID_unsignedbv ||
133
+ type == ID_signedbv ||
134
+ type == ID_c_bool)
132
135
return os << *numeric_cast<mp_integer>(src);
133
136
else if (type == ID_integer)
134
137
return os << src.get_value ();
138
+ else if (type == ID_string)
139
+ return os << ' "' << escape (id2string (src.get_value ())) << ' "' ;
135
140
else if (type == ID_floatbv)
136
141
return os << ieee_floatt (src);
142
+ else if (type == ID_pointer && src.is_zero ())
143
+ return os << src.get_value ();
137
144
else
138
145
return os << src.pretty ();
139
146
}
@@ -165,6 +172,12 @@ std::ostream &format_rec(
165
172
<< to_member_expr (expr).get_component_name ();
166
173
else if (id == ID_symbol)
167
174
return os << to_symbol_expr (expr).get_identifier ();
175
+ else if (id == ID_index)
176
+ {
177
+ const auto &index_expr=to_index_expr (expr);
178
+ return os << format (index_expr.array ()) << ' ['
179
+ << format (index_expr.index ()) << ' ]' ;
180
+ }
168
181
else if (id == ID_type)
169
182
return format_rec (os, expr.type ());
170
183
else if (id == ID_forall || id == ID_exists)
0 commit comments