Go to the documentation of this file.
30 const bool non_void_non_function_pointer =
31 type.
id() == ID_pointer &&
35 non_void_non_function_pointer;
49 const bool skip_classid =
true;
57 object_factory_parameters,
63 gen_nondet_init_code, symbol_table, instructions, message_handler, mode);
89 const auto next_instr = std::next(target);
103 if(!nondet_expr.get_nullable())
119 op.type(),
"nondet_tmp", source_loc, function_identifier, symbol_table);
122 op = aux_symbol_expr;
139 object_factory_parameters,
149 return std::make_pair(target2,
true);
152 return std::make_pair(next_instr,
false);
166 const irep_idt &function_identifier,
174 user_object_factory_parameters;
175 object_factory_parameters.
function_id = function_identifier;
177 bool changed =
false;
178 auto instruction_iterator = goto_program.
instructions.begin();
180 while(instruction_iterator != goto_program.
instructions.end())
185 instruction_iterator,
188 object_factory_parameters,
190 instruction_iterator = ret.first;
191 changed |= ret.second;
207 function.get_function_id(),
208 function.get_goto_function().body,
209 function.get_symbol_table(),
211 object_factory_parameters,
214 function.compute_location_numbers();
229 if(symbol.
mode==ID_java)
236 object_factory_parameters,
255 object_factory_parameters);
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.
static instructiont make_dead(const symbol_exprt &symbol, const source_locationt &l=source_locationt::nil())
The type of an expression, extends irept.
irep_idt function_id
Function id, used as a prefix for identifiers of temporaries.
void remove_skip(goto_programt &goto_program, goto_programt::targett begin, goto_programt::targett end)
remove unnecessary skip statements
static std::pair< goto_programt::targett, bool > insert_nondet_init_code(const irep_idt &function_identifier, goto_programt &goto_program, const goto_programt::targett &target, symbol_table_baset &symbol_table, message_handlert &message_handler, java_object_factory_parameterst object_factory_parameters, const irep_idt &mode)
Checks an instruction to see whether it contains an assignment from side_effect_expr_nondet.
void update()
Update all indices.
A goto_instruction_codet representing the declaration of a local variable.
void compute_location_numbers()
Base class for all expressions.
function_mapt function_map
Expression to hold a symbol (variable)
static instructiont make_decl(const symbol_exprt &symbol, const source_locationt &l=source_locationt::nil())
void goto_convert(const codet &code, symbol_table_baset &symbol_table, goto_programt &dest, message_handlert &message_handler, const irep_idt &mode)
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().
void convert_nondet(const irep_idt &function_identifier, goto_programt &goto_program, symbol_table_baset &symbol_table, message_handlert &message_handler, const java_object_factory_parameterst &user_object_factory_parameters, const irep_idt &mode)
For each instruction in the goto program, checks if it is an assignment from nondet and replaces it w...
irep_idt mode
Language mode.
bool can_cast_expr< side_effect_expr_nondett >(const exprt &base)
void destructive_insert(const_targett target, goto_programt &p)
Inserts the given program p before target.
The symbol table base class interface.
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
void gen_nondet_init(const exprt &expr, code_blockt &init_code, symbol_table_baset &symbol_table, const source_locationt &loc, bool skip_classid, lifetimet lifetime, const java_object_factory_parameterst &object_factory_parameters, const select_pointer_typet &pointer_type_selector, update_in_placet update_in_place, message_handlert &log)
Initializes a primitive-typed or reference-typed object tree rooted at expr, allocating child objects...
const irep_idt & id() const
symbolt & fresh_java_symbol(const typet &type, const std::string &basename_prefix, const source_locationt &source_location, const irep_idt &function_name, symbol_table_baset &symbol_table)
size_t min_null_tree_depth
To force a certain depth of non-null objects.
instructionst instructions
The list of instructions in the goto program.
A collection of goto functions.
goto_functionst goto_functions
GOTO functions.
static goto_programt get_gen_nondet_init_instructions(const symbol_exprt &aux_symbol_expr, const source_locationt &source_loc, symbol_table_baset &symbol_table, message_handlert &message_handler, const java_object_factory_parameterst &object_factory_parameters, const irep_idt &mode)
Populate instructions with goto instructions to nondet init aux_symbol_expr
side_effect_expr_nondett & to_side_effect_expr_nondet(exprt &expr)
const typet & base_type() const
The type of the data what we point to.
A generic container class for the GOTO intermediate representation of one function.
targett insert_after(const_targett target)
Insertion after the instruction pointed-to by the given instruction iterator target.
static bool is_nondet_pointer(exprt expr)
Returns true if expr is a nondet pointer that isn't a function pointer or a void* pointer as these ca...
@ DYNAMIC
Allocate dynamic objects (using ALLOCATE)
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
This class represents an instruction in the GOTO intermediate representation.
symbol_tablet symbol_table
Symbol table.
Interface providing access to a single function in a GOTO model, plus its associated symbol table.
instructionst::iterator targett