21 bool enable_assertions,
22 bool enable_built_in_assertions,
23 bool enable_assumptions)
25 bool did_something =
false;
29 if(instruction.is_assert())
31 bool is_user_provided =
32 instruction.source_location().get_bool(
"user-provided");
35 (is_user_provided && !enable_assertions &&
36 instruction.source_location().get_property_class() !=
"error label") ||
37 (!is_user_provided && !enable_built_in_assertions))
39 instruction.turn_into_skip();
43 else if(instruction.is_assume())
45 if(!enable_assumptions)
47 instruction.turn_into_skip();
62 const bool enable_built_in_assertions =
67 if(enable_assertions && enable_built_in_assertions && enable_assumptions)
75 enable_built_in_assertions,
85 const bool enable_built_in_assertions =
90 if(enable_assertions && enable_built_in_assertions && enable_assumptions)
96 enable_built_in_assertions,
function_mapt function_map
goto_functionst goto_functions
GOTO functions.
A generic container class for the GOTO intermediate representation of one function.
instructionst instructions
The list of instructions in the goto program.
bool get_bool_option(const std::string &option) const
static void transform_assertions_assumptions(goto_programt &goto_program, bool enable_assertions, bool enable_built_in_assertions, bool enable_assumptions)
Checks for Errors in C and Java Programs.
void remove_skip(goto_programt &goto_program, goto_programt::targett begin, goto_programt::targett end)
remove unnecessary skip statements