Go to the documentation of this file.
61 if(symbol.
type.
get_bool(ID_C_no_initialization_required))
85 goto_functionst::function_mapt::iterator fct_entry =
93 if(instruction.is_assign())
100 const auto source_location = instruction.source_location();
107 else if(instruction.is_function_call())
148 const std::set<std::string> &except_values)
151 std::set<std::string> to_exclude;
153 for(
auto const &except : except_values)
155 const bool file_prefix_found = except.find(
":") != std::string::npos;
157 if(file_prefix_found)
159 to_exclude.insert(except);
162 to_exclude.insert(except.substr(2, except.length() - 2));
166 to_exclude.insert(
"./" + except);
181 symbol_it != symbol_table.
end();
184 symbolt &symbol = symbol_it.get_writeable_symbol();
187 if(to_exclude.find(qualified_name) != to_exclude.end())
189 symbol.
value.
set(ID_C_no_nondet_initialization, 1);
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.
static void nondet_static(const namespacet &ns, goto_functionst &goto_functions, const irep_idt &fct_name)
Nondeterministically initializes global scope variables in a goto-function.
#define CHECK_RETURN(CONDITION)
const irep_idt & display_name() const
Return language specific display name if present.
typet type
Type of symbol.
function_mapt function_map
Expression to hold a symbol (variable)
static instructiont make_assignment(const code_assignt &_code, const source_locationt &l=source_locationt::nil())
Create an assignment instruction.
virtual iteratort begin() override
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.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
bool is_nondet_initializable_static(const symbol_exprt &symbol_expr, const namespacet &ns)
See the return.
const T & as_const(T &value)
Return a reference to the same object but ensures the type is const.
bool has_prefix(const std::string &s, const std::string &prefix)
virtual iteratort end() override
const std::string & id2string(const irep_idt &d)
void set(const irep_idt &name, const irep_idt &value)
const irep_idt & get_identifier() const
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
#define INITIALIZE_FUNCTION
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
A side_effect_exprt that returns a non-deterministically chosen value.
instructionst instructions
The list of instructions in the goto program.
A collection of goto functions.
exprt value
Initial value of symbol.
const symbol_table_baset & get_symbol_table() const
Return first symbol table registered with the namespace.
goto_functionst goto_functions
GOTO functions.
source_locationt location
Source code location of definition of symbol.
bool is_constant_or_has_constant_components(const typet &type, const namespacet &ns)
Identify whether a given type is constant itself or contains constant components.
A generic container class for the GOTO intermediate representation of one function.
const irep_idt & get_file() const
A goto_instruction_codet representing an assignment in the program.
symbol_tablet symbol_table
Symbol table.
bool get_bool(const irep_idt &name) const