ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
printf_formatter.h
Go to the documentation of this file.
1
#ifndef CPROVER_PRINTF_FORMATTER
2
#define CPROVER_PRINTF_FORMATTER
3
4
#include <
irep2/irep2_expr.h
>
5
9
type2tc
printf_int_type
(
bool
is_signed,
const
std::string &mod);
10
11
class
printf_formattert
12
{
13
public
:
14
void
15
operator()
(
const
std::string &
format
,
const
std::list<expr2tc> &_operands);
16
17
void
print
(std::ostream &out);
18
std::string
as_string
();
19
22
size_t
min_outlen
= 0;
24
size_t
max_outlen
= 0;
31
bool
bounded
=
true
;
32
36
bool
exact
=
true
;
37
44
bool
args_reliable
=
true
;
45
46
protected
:
47
std::string
format
;
48
std::list<expr2tc>
operands
;
49
std::list<expr2tc>::const_iterator
next_operand
;
50
unsigned
format_pos
;
51
inline
bool
eol
()
const
52
{
53
return
format_pos
>=
format
.size();
54
}
55
56
class
eol_exception
57
{
58
};
59
60
char
next
()
61
{
62
if
(
eol
())
63
throw
eol_exception
();
64
return
format
[
format_pos
++];
65
}
66
67
void
process_char
(std::ostream &out);
68
void
process_format
(std::ostream &out);
69
70
const
expr2tc
make_type
(
const
expr2tc
&src,
const
type2tc
&dest);
71
};
72
73
#endif
printf_formattert::eol_exception
Definition
printf_formatter.h:57
printf_formattert
Definition
printf_formatter.h:12
printf_formattert::format
std::string format
Definition
printf_formatter.h:47
printf_formattert::exact
bool exact
False when a '#' flag outside o, x and X or a conversion (p, an unknown one) the formatter does not m...
Definition
printf_formatter.h:36
printf_formattert::operands
std::list< expr2tc > operands
Definition
printf_formatter.h:48
printf_formattert::next_operand
std::list< expr2tc >::const_iterator next_operand
Definition
printf_formatter.h:49
printf_formattert::make_type
const expr2tc make_type(const expr2tc &src, const type2tc &dest)
Definition
printf_formatter.cpp:12
printf_formattert::format_pos
unsigned format_pos
Definition
printf_formatter.h:50
printf_formattert::bounded
bool bounded
False when print() could not compute a sound upper bound on the output length: a value-dependent conv...
Definition
printf_formatter.h:31
printf_formattert::next
char next()
Definition
printf_formatter.h:60
printf_formattert::max_outlen
size_t max_outlen
Maximum possible output length for the last print() call.
Definition
printf_formatter.h:24
printf_formattert::as_string
std::string as_string()
Definition
printf_formatter.cpp:51
printf_formattert::operator()
void operator()(const std::string &format, const std::list< expr2tc > &_operands)
Definition
printf_formatter.cpp:23
printf_formattert::args_reliable
bool args_reliable
True when operands are the call's actual arguments, so a non-literal s operand may be used to derive ...
Definition
printf_formatter.h:44
printf_formattert::process_format
void process_format(std::ostream &out)
Definition
printf_formatter.cpp:275
printf_formattert::eol
bool eol() const
Definition
printf_formatter.h:51
printf_formattert::min_outlen
size_t min_outlen
Minimum possible output length for the last print() call.
Definition
printf_formatter.h:22
printf_formattert::print
void print(std::ostream &out)
Definition
printf_formatter.cpp:31
printf_formattert::process_char
void process_char(std::ostream &out)
Definition
printf_formatter.cpp:553
type2tc
irep_container< type2t > type2tc
Definition
irep2.h:430
expr2tc
irep_container< expr2t > expr2tc
Definition
irep2.h:431
irep2_expr.h
printf_int_type
type2tc printf_int_type(bool is_signed, const std::string &mod)
The type a d or i (is_signed) or u conversion converts its argument to under the length modifier mod:...
Definition
printf_formatter.cpp:260
src
goto-symex
trace
printf_formatter.h
Generated by
1.15.0