73 R
"(.*org\.cprover\.CProver\.nondet)"
74 R"((?:Boolean|Byte|Char|Short|Int|Long|Float|Double|With(out)?Null.*))");
96 const auto &code =
instr->code();
99 "function_call should have ID_function_call");
126 if(!(typecast.op().id() ==
ID_symbol && !typecast.op().has_operands()))
132 return op_symbol.get_identifier() == identifier;
146 if(!
instr.is_assign())
150 const auto &rhs =
instr.assign_rhs();
165 if(!
instr.is_set_return_value())
169 const auto &rhs =
instr.return_value();
224 "the code_function_callt for a nondet-returning library function should "
225 "either have a variable for the return value in its lhs() or the next "
226 "instruction should be an assignment of the return value to a temporary "
266 "failed to find return of the temporary return variable or assignment of "
267 "the temporary return variable into a target variable");
271 instr.turn_into_skip();
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
goto_instruction_codet representation of a function call statement.
goto_instruction_codet representation of a "return from a function" statement.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
A collection of goto functions.
function_mapt function_map
Interface providing access to a single function in a GOTO model, plus its associated symbol table.
goto_functionst::goto_functiont & get_goto_function()
Get GOTO function.
goto_functionst goto_functions
GOTO functions.
This class represents an instruction in the GOTO intermediate representation.
A generic container class for the GOTO intermediate representation of one function.
instructionst instructions
The list of instructions in the goto program.
void update()
Update all indices.
instructionst::iterator targett
instructionst::const_iterator const_targett
const irep_idt & id() const
Holds information about any discovered nondet methods, with extreme type- safety.
nondet_instruction_infot()
is_nullablet get_nullable_type() const
is_nondett get_instruction_type() const
nondet_instruction_infot(is_nullablet is_nullable)
A side_effect_exprt that returns a non-deterministically chosen value.
const code_function_callt & to_code_function_call(const goto_instruction_codet &code)
const std::string & id2string(const irep_idt &d)
void remove_skip(goto_programt &goto_program, goto_programt::targett begin, goto_programt::targett end)
remove unnecessary skip statements
static nondet_instruction_infot is_nondet_returning_object(const code_function_callt &function_call)
Checks whether the function call is one of our nondet library functions.
static void replace_java_nondet(goto_programt &goto_program)
Checks each instruction in the goto program to see whether it is a method returning nondet.
static bool is_symbol_with_id(const exprt &expr, const irep_idt &identifier)
Return whether the expression is a symbol with the specified identifier.
static bool is_return_with_variable(const goto_programt::instructiont &instr, const irep_idt &identifier)
Return whether the instruction is a return, and the rhs is a symbol or typecast expression with the s...
static bool is_assignment_from(const goto_programt::instructiont &instr, const irep_idt &identifier)
Return whether the instruction is an assignment, and the rhs is a symbol or typecast expression with ...
static nondet_instruction_infot get_nondet_instruction_info(const goto_programt::const_targett &instr)
Check whether the instruction is a function call which matches one of the recognised nondet library m...
static goto_programt::targett check_and_replace_target(goto_programt &goto_program, const goto_programt::targett &target)
Given an iterator into a list of instructions, modify the list to replace 'nondet' library functions ...
static bool is_typecast_with_id(const exprt &expr, const irep_idt &identifier)
Return whether the expression is a typecast with the specified identifier.
Replace Java Nondet expressions.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.