19 #include <unordered_set>
23 using function_itt = goto_functionst::function_mapt::const_iterator;
41 using function_itt = goto_functionst::function_mapt::const_iterator;
44 return function_it->first.hash();
59 std::unordered_set<function_loc_pairt, function_loc_pair_hasht>;
65 std::stack<function_loc_pairt> working;
72 while(!working.empty())
74 auto loc = working.top();
77 auto insertion_result = fixpoint.insert(loc);
78 if(!insertion_result.second)
81 if(loc.target->is_function_call())
84 auto &
function = loc.target->call_function();
85 if(
function.
id() == ID_symbol)
89 auto function_iterator =
94 function_iterator->second.body.instructions.begin());
98 working.emplace(loc.function_it, std::next(loc.target));
102 auto &body = loc.function_it->second.body;
104 for(
auto successor : body.get_successors(loc.target))
105 working.emplace(loc.function_it, successor);
122 for(
auto function_it = goto_functions.
function_map.begin();
126 auto &body = function_it->second.body;
127 for(
auto target = body.instructions.begin();
128 target != body.instructions.end();
131 if(target->is_assert() && target->source_location().property_fatal())
133 auto id = target->source_location().get_property_id();
134 auto property = properties.find(
id);
140 fatal_locs.emplace(function_it, target);
150 for(
auto &loc : fixpoint)
152 if(loc.target->is_assert())
154 auto id = loc.target->source_location().get_property_id();
155 auto property = properties.find(
id);
A collection of goto functions.
function_mapt function_map
instructionst::const_iterator const_targett
const irep_idt & get_identifier() const
static loc_sett reachable_fixpoint(const loc_sett &locs, const goto_functionst &goto_functions)
std::unordered_set< function_loc_pairt, function_loc_pair_hasht > loc_sett
void propagate_fatal_assertions(propertiest &properties, const goto_functionst &goto_functions)
Proven assertions after refuted fatal assertions are marked as UNKNOWN.
void propagate_fatal_to_proven(propertiest &properties, const goto_functionst &goto_functions)
Proven assertions after refuted fatal assertions are marked as UNKNOWN.
Goto Programs with Functions.
#define hash_combine(h1, h2)
@ UNKNOWN
The checker was unable to determine the status of the property.
@ PASS
The property was not violated.
@ FAIL
The property was violated.
std::map< irep_idt, property_infot > propertiest
A map of property IDs to property infos.
#define CHECK_RETURN(CONDITION)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
std::size_t operator()(const function_itt &function_it) const
goto_functionst::function_mapt::const_iterator function_itt
std::size_t operator()(const function_loc_pairt &p) const
goto_programt::const_targett target
function_loc_pairt(function_itt __function_it, goto_programt::const_targett __target)
bool operator==(const function_loc_pairt &other) const
goto_functionst::function_mapt::const_iterator function_itt