22 :
log(_message_handler)
29 const irep_idt entry(function_to_instrument);
33 log.
error() <<
"insert-final-assert-false: could not find function "
39 auto instr_it = instructions.end();
40 auto last_instruction = std::prev(instr_it);
42 last_instruction->is_end_function(),
43 "last instruction in function should be END_FUNCTION");
46 assert_location.
set_comment(
"insert-final-assert-false (should fail) ");
55 const std::string &function_to_instrument,
59 return ifaf(goto_model, function_to_instrument);
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
The Boolean constant false.
function_mapt function_map
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 insert_before_swap(targett target)
Insertion that preserves jumps to "target".
std::list< instructiont > instructionst
static instructiont make_assertion(const exprt &g, const source_locationt &l=source_locationt::nil())
bool operator()(goto_modelt &, const std::string &)
insert_final_assert_falset(message_handlert &_message_handler)
void set_comment(const irep_idt &comment)
void set_property_class(const irep_idt &property_class)
bool insert_final_assert_false(goto_modelt &goto_model, const std::string &function_to_instrument, message_handlert &message_handler)
Transform a goto program by inserting assert(false) at the end of a given function function_to_instru...
Insert final assert false into a function.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...