Go to the documentation of this file.
36 identifier ==
CPROVER_PREFIX "memory" || identifier ==
"__func__" ||
37 identifier ==
"__FUNCTION__" || identifier ==
"__PRETTY_FUNCTION__" ||
38 identifier ==
"argc'" || identifier ==
"argv'" || identifier ==
"envp'" ||
39 identifier ==
"envp_size'")
49 if(type.
id() == ID_code || type.
id() == ID_empty)
57 writable_symbol.
type = type;
62 (type.
id() == ID_struct || type.
id() == ID_union) &&
105 init_symbol.value.add_source_location()=source_location;
115 std::set<std::string> symbols;
117 for(
const auto &symbol_pair : symbol_table.
symbols)
119 symbols.insert(
id2string(symbol_pair.first));
123 for(
const std::string &
id : symbols)
128 dest.
add(std::move(*code));
132 for(
const std::string &
id : symbols)
137 dest.
add(std::move(*code));
142 for(
const std::string &
id : symbols)
146 if(symbol.
type.
id() != ID_code)
bool has_symbol(const irep_idt &name) const
Check whether a symbol exists in the symbol table.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
A codet representing sequential composition of program statements.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
#define CHECK_RETURN(CONDITION)
The type of an expression, extends irept.
typet type
Type of symbol.
A side_effect_exprt representation of a function call side effect.
optionalt< 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...
Base class for all expressions.
optionalt< exprt > zero_initializer(const typet &type, const source_locationt &source_location, const namespacet &ns)
Create the equivalent of zero for type type.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
const codet & to_code(const exprt &expr)
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
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)
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
bool has_prefix(const std::string &s, const std::string &prefix)
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
const std::string & id2string(const irep_idt &d)
void set(const irep_idt &name, const irep_idt &value)
codet representation of a label for branch targets.
#define PRECONDITION(CONDITION)
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
#define INITIALIZE_FUNCTION
A codet representing an assignment in the program.
const irep_idt & id() const
void add(const codet &code)
const parameterst & parameters() const
nonstd::optional< T > optionalt
exprt value
Initial value of symbol.
A codet representing a skip statement.
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
source_locationt location
Source code location of definition of symbol.
static optionalt< codet > static_lifetime_init(const irep_idt &identifier, symbol_tablet &symbol_table)
const symbolst & symbols
Read-only field, used to look up symbols given their names.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const typet & return_type() const
const code_blockt & to_code_block(const codet &code)
unsignedbv_typet size_type()
bool get_bool(const irep_idt &name) const
codet representation of an expression statement.