1/*******************************************************************\
3Module: printf Formatting
5Author: Daniel Kroening, kroening@kroening.com
7\*******************************************************************/
25 if(src.
type() == dest)
56 std::ostringstream stream;
70 std::string length_modifier;
74 if(
ch ==
'0')
// leading zeros
87 if(
ch ==
'.')
// precision
106 length_modifier =
"hh";
111 length_modifier =
"h";
119 length_modifier =
"ll";
124 length_modifier =
"l";
130 length_modifier =
"ll";
137 length_modifier =
ch;
143 length_modifier =
"z";
161 if(length_modifier ==
"L")
167 case 'a':
// TODO: hexadecimal output
168 case 'A':
// TODO: hexadecimal output
174 if(length_modifier ==
"L")
187 if(length_modifier ==
"L")
194 length_modifier =
'l';
199 // this is the address of a string
235 if(length_modifier ==
"hh")
237 else if(length_modifier ==
"h")
239 else if(length_modifier ==
"l")
241 else if(length_modifier ==
"ll")
243 else if(length_modifier ==
"j")
// intmax_t
245 else if(length_modifier ==
"z")
247 else if(length_modifier ==
"t")
255 case 'o':
// TODO: octal output
256 case 'x':
// TODO: hexadecimal output
257 case 'X':
// TODO: hexadecimal output
263 if(length_modifier ==
"hh")
265 else if(length_modifier ==
"h")
267 else if(length_modifier ==
"l")
269 else if(length_modifier ==
"ll")
271 else if(length_modifier ==
"j")
// intmax_t
273 else if(length_modifier ==
"z")
275 else if(length_modifier ==
"t")
284 length_modifier =
'l';
288 if(length_modifier ==
"l")
296 // TODO: hexadecimal output
303 // printf would store the number of characters written so far in the
304 // object pointed to by this operand. We do not implement this side-effect
305 // here, and just skip one operand.
signedbv_typet signed_long_int_type()
signedbv_typet signed_char_type()
unsignedbv_typet unsigned_int_type()
unsignedbv_typet unsigned_long_long_int_type()
unsignedbv_typet unsigned_long_int_type()
signedbv_typet signed_int_type()
signedbv_typet pointer_diff_type()
unsignedbv_typet unsigned_char_type()
signedbv_typet signed_size_type()
signedbv_typet signed_long_long_int_type()
bitvector_typet wchar_t_type()
floatbv_typet long_double_type()
floatbv_typet double_type()
signedbv_typet signed_short_int_type()
unsignedbv_typet unsigned_short_int_type()
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Base class for all expressions.
typet & type()
Return the type of the expression.
Semantic type conversion.
The type of an expression, extends irept.
const exprt & skip_typecast(const exprt &expr)
find the expression nested inside typecasts, if any
Deprecated expression utility functions.
API to expression classes for Pointers.
exprt simplify_expr(exprt src, const namespacet &ns)
API to expression classes.