35 goto_functionst::function_mapt::iterator entry=
40 message.
error() <<
"No function " << identifier
47 message.
warning() <<
"Function " << identifier <<
" is inlined, "
48 <<
"instantiations will not be removed"
52 if(entry->second.body_available())
54 message.
status() <<
"Removing body of " << identifier
56 entry->second.
clear();
72 const std::list<std::string> &
names,
75 for(
const auto &f :
names)
92 message.debug() <<
"Removing functions matching pattern: " <<
pattern_as_str
101 const std::string &function_name =
id2string(entry.first);
102 if(std::regex_match(function_name,
pattern))
132 catch(
const std::regex_error &e)
134 message.error() <<
"Invalid regular expression pattern: " <<
pattern <<
" ("
virtual void clear()
Reset the abstract state.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
function_mapt function_map
symbol_tablet symbol_table
Symbol table.
goto_functionst goto_functions
GOTO functions.
Class that provides messages with a built-in verbosity 'level'.
mstreamt & warning() const
mstreamt & status() const
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
const symbolt & lookup_ref(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
exprt value
Initial value of symbol.
const std::string & id2string(const irep_idt &d)
void remove_function(goto_modelt &goto_model, const irep_idt &identifier, message_handlert &message_handler)
Remove the body of function "identifier" such that an analysis will treat it as a side-effect free fu...
void remove_functions(goto_modelt &goto_model, const std::list< std::string > &names, message_handlert &message_handler)
Remove the body of all functions listed in "names" such that an analysis will treat it as a side-effe...
static void remove_functions_regex(goto_modelt &goto_model, const std::regex &pattern, const std::string &pattern_as_str, message_handlert &message_handler)
Remove functions matching a regular expression pattern.
Remove function definition.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.