19 #include <unordered_set>
23 std::unordered_set<irep_idt> &property_set)
25 for(goto_programt::instructionst::iterator
33 irep_idt property_id = it->source_location().get_property_id();
35 std::unordered_set<irep_idt>::iterator c_it =
36 property_set.find(property_id);
38 if(c_it==property_set.end())
41 property_set.erase(c_it);
53 std::map<irep_idt, std::size_t> &property_counters)
55 for(goto_programt::instructionst::iterator
64 if(it->source_location().is_nil())
67 it->source_location_nonconst().
set_function(function_identifier);
70 irep_idt function = it->source_location().get_function();
73 if(!it->source_location().get_property_class().empty())
78 std::string class_infix =
79 id2string(it->source_location().get_property_class());
82 std::replace(class_infix.begin(), class_infix.end(),
' ',
'_');
90 std::size_t &count=property_counters[prefix];
96 it->source_location_nonconst().set_property_id(property_id);
102 std::map<irep_idt, std::size_t> property_counters;
108 const std::list<std::string> &properties)
115 const std::list<std::string> &properties)
117 std::unordered_set<irep_idt> property_set;
119 property_set.insert(properties.begin(), properties.end());
124 if(!property_set.empty())
126 "property " +
id2string(*property_set.begin()) +
" unknown",
132 std::map<irep_idt, std::size_t> property_counters;
134 for(goto_functionst::function_mapt::iterator
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
A collection of goto functions.
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.
Thrown when users pass incorrect command line arguments, for example passing no files to analysis or ...
void set_function(const irep_idt &function)
const std::string & id2string(const irep_idt &d)
void set_properties(goto_programt &goto_program, std::unordered_set< irep_idt > &property_set)
void label_properties(goto_modelt &goto_model)
Set the properties to check.
void replace(const union_find_replacet &replace_map, string_not_contains_constraintt &constraint)
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.