41 identifier ==
CPROVER_PREFIX "memory" || identifier ==
"__func__" ||
42 identifier ==
"__FUNCTION__" || identifier ==
"__PRETTY_FUNCTION__" ||
43 identifier ==
"argc'" || identifier ==
"argv'" || identifier ==
"envp'" ||
44 identifier ==
"envp_size'")
52 if(symbol.
type.
id() == ID_code || symbol.
type.
id() == ID_empty)
65 (symbol.
type.
id() == ID_struct_tag &&
67 (symbol.
type.
id() == ID_union_tag &&
110 init_symbol.value.add_source_location()=source_location;
120 std::set<std::string> symbols;
122 for(
const auto &symbol_pair : symbol_table.
symbols)
124 symbols.insert(
id2string(symbol_pair.first));
128 for(
const std::string &
id : symbols)
133 dest.
add(std::move(*code));
137 for(
const std::string &
id : symbols)
142 dest.
add(std::move(*code));
147 for(
const std::string &
id : symbols)
151 if(symbol.
type.
id() != ID_code)
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a typet to a union_tag_typet.
const exprt & size() const
A codet representing sequential composition of program statements.
void add(const codet &code)
codet representation of an expression statement.
A codet representing an assignment in the program.
codet representation of a label for branch targets.
A codet representing a skip statement.
const typet & return_type() const
const parameterst & parameters() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool starts_with(const char *s) const
equivalent of as_string().starts_with(s)
Base class for all expressions.
symbol_tablet symbol_table
Symbol table.
goto_functionst goto_functions
GOTO functions.
std::size_t unload(const irep_idt &name)
Remove the function named name from the function map, if it exists.
bool get_bool(const irep_idt &name) const
void set(const irep_idt &name, const irep_idt &value)
const irep_idt & id() const
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
A side_effect_exprt representation of a function call side effect.
bool is_incomplete() const
A struct/union may be incomplete.
The symbol table base class interface.
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
const symbolt & lookup_ref(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
bool has_symbol(const irep_idt &name) const
Check whether a symbol exists in the symbol table.
source_locationt location
Source code location of definition of symbol.
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
typet type
Type of symbol.
exprt value
Initial value of symbol.
bool has_prefix(const std::string &s, const std::string &prefix)
std::optional< exprt > nondet_initializer(const typet &type, const source_locationt &source_location, const namespacet &ns)
Create a non-deterministic value for type type, with all subtypes independently expanded as non-deter...
std::optional< exprt > zero_initializer(const typet &type, const source_locationt &source_location, const namespacet &ns)
Create the equivalent of zero for type type.
Expression Initialization.
void goto_convert(const codet &code, symbol_table_baset &symbol_table, goto_programt &dest, message_handlert &message_handler, const irep_idt &mode)
Goto Programs with Functions.
const std::string & id2string(const irep_idt &d)
static std::unordered_set< irep_idt > init_symbol(const symbolt &sym, code_blockt &code_block, symbol_table_baset &symbol_table, const source_locationt &source_location, bool assume_init_pointers_not_null, const java_object_factory_parameterst &object_factory_parameters, const select_pointer_typet &pointer_type_selector, bool string_refinement_enabled, message_handlert &message_handler)
#define CHECK_RETURN(CONDITION)
#define PRECONDITION(CONDITION)
static std::optional< codet > static_lifetime_init(const irep_idt &identifier, symbol_table_baset &symbol_table)
void recreate_initialize_function(goto_modelt &goto_model, message_handlert &message_handler)
Regenerates the CPROVER_INITIALIZE function, which initializes all non-function symbols of the goto m...
#define INITIALIZE_FUNCTION
const code_blockt & to_code_block(const codet &code)
const codet & to_code(const exprt &expr)
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.