Go to the documentation of this file.
12 #ifndef CPROVER_GOTO_PROGRAMS_STRING_ABSTRACTION_H
13 #define CPROVER_GOTO_PROGRAMS_STRING_ABSTRACTION_H
68 if(type.
id()!=ID_signedbv &&
69 type.
id()!=ID_unsignedbv)
120 const exprt &pointer,
147 typedef std::unordered_map<irep_idt, irep_idt>
localst;
175 const typet &source_type);
186 #endif // CPROVER_GOTO_PROGRAMS_STRING_ABSTRACTION_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
exprt member(const exprt &a, whatt what)
static typet build_type(whatt what)
exprt build(const exprt &pointer, whatt what, bool write, const source_locationt &)
goto_programt::targett abstract_assign(goto_programt &dest, goto_programt::targett it)
void string_abstraction(goto_modelt &, message_handlert &)
The type of an expression, extends irept.
bool build_pointer(const exprt &object, exprt &dest, bool write)
abstraction_types_mapt abstraction_types_map
The trinary if-then-else operator.
Base class for all expressions.
const typet & build_abstraction_type_rec(const typet &type, const abstraction_types_mapt &known)
struct configt::ansi_ct ansi_c
const bitvector_typet & to_bitvector_type(const typet &type)
Cast a typet to a bitvector_typet.
Expression to hold a symbol (variable)
bool is_ptr_string_struct(const typet &type) const
code_typet::parametert add_parameter(const symbolt &fct_symbol, const typet &type, const irep_idt &identifier)
void abstract_function_call(goto_programt::targett it)
goto_programt::targett abstract_char_assign(goto_programt &dest, goto_programt::targett it)
goto_programt::targett value_assignments(goto_programt &dest, goto_programt::targett it, const exprt &lhs, const exprt &rhs)
void make_type(exprt &dest, const typet &type)
bool is_char_type(const typet &type) const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
typet & type()
Return the type of the expression.
::std::map< typet, typet > abstraction_types_mapt
static bool has_string_macros(const exprt &expr)
Replace all uses of char * by a struct that carries that string, and also the underlying allocation a...
exprt build_unknown(whatt what, bool write)
void declare_define_locals(goto_programt &dest)
exprt make_val_or_dummy_rec(goto_programt &dest, goto_programt::targett ref_instr, const symbolt &symbol, const typet &source_type)
symbol_exprt add_dummy_symbol_and_value(goto_programt &dest, goto_programt::targett ref_instr, const symbolt &symbol, const irep_idt &component_name, const typet &type, const typet &source_type)
void build_new_symbol(const symbolt &symbol, const irep_idt &identifier, const typet &type)
const typet & build_abstraction_type(const typet &type)
const irep_idt & id() const
goto_programt::targett char_assign(goto_programt &dest, goto_programt::targett target, const exprt &new_lhs, const exprt &lhs, const exprt &rhs)
goto_programt::targett value_assignments_if(goto_programt &dest, goto_programt::targett target, const exprt &lhs, const if_exprt &rhs)
goto_programt initialization
bool build_wrap(const exprt &object, exprt &dest, bool write)
void replace_string_macros(exprt &expr, bool lhs, const source_locationt &)
std::size_t get_width() const
void add_str_parameters(symbolt &fct_symbol, goto_functiont::parameter_identifierst ¶meter_identifiers)
A collection of goto functions.
goto_programt::targett abstract_pointer_assign(goto_programt &dest, goto_programt::targett it)
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
unsigned temporary_counter
bool build_symbol_constant(const mp_integer &zero_length, const mp_integer &buf_size, exprt &dest)
void make_decl_and_def(goto_programt &dest, goto_programt::targett ref_instr, const irep_idt &identifier, const irep_idt &source_sym)
A generic container class for the GOTO intermediate representation of one function.
std::vector< irep_idt > parameter_identifierst
bool build_array(const array_exprt &object, exprt &dest, bool write)
void move_lhs_arithmetic(exprt &lhs, exprt &rhs)
Semantic type conversion.
string_abstractiont(goto_modelt &goto_model, message_handlert &_message_handler)
Apply string abstraction to goto_model.
bool build_if(const if_exprt &o_if, exprt &dest, bool write)
std::unordered_map< irep_idt, irep_idt > localst
message_handlert & message_handler
Array constructor from list of elements.
bool build_symbol(const symbol_exprt &sym, exprt &dest)
instructionst::iterator targett
goto_programt::targett value_assignments_string_struct(goto_programt &dest, goto_programt::targett target, const exprt &lhs, const exprt &rhs)