26 ui_message_handler(ui_message_handler),
37 const auto &failed_step =
38 collect_guards(failed_property_id, localization_points, fault_location);
40 if(!localization_points.empty())
50 return fault_location;
61 step.is_assignment() &&
68 auto emplace_result = fault_location.
scores.emplace(step.source.pc, 0);
69 localization_points.emplace(l, emplace_result.first);
72 else if(step.is_assert() && step.property_id == failed_property_id)
85 PRECONDITION(value.size() == localization_points.size());
86 std::vector<exprt> assumptions;
87 localization_points_valuet::const_iterator v_it = value.begin();
88 for(
const auto &l : localization_points)
91 assumptions.push_back(l.first);
92 else if(v_it->is_false())
108 for(
auto &l : localization_points)
110 auto &score = l.second->second;
128 for(std::size_t i = 0; i < v.size(); ++i)
131 if(!
check(failed_step, localization_points, v))
135 if(!
check(failed_step, localization_points, v))
Single SSA step in the equation.
virtual exprt get(const exprt &) const =0
Return expr with variables replaced by values from satisfying assignment if available.
virtual exprt handle(const exprt &)=0
Generate a handle, which is an expression that has the same value as the argument in any model that i...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
bool is_true() const
Return whether the expression is a constant representing true.
bool is_false() const
Return whether the expression is a constant representing false.
bool is_constant() const
Return whether the expression is a constant.
ui_message_handlert & ui_message_handler
bool check(const SSA_stept &failed_step, const localization_pointst &, const localization_points_valuet &)
std::map< exprt, fault_location_infot::score_mapt::iterator > localization_pointst
A localization point is a goto instruction that is potentially at fault.
goto_symex_fault_localizert(const optionst &options, ui_message_handlert &ui_message_handler, const symex_target_equationt &equation, stack_decision_proceduret &solver)
fault_location_infot operator()(const irep_idt &failed_property_id)
const SSA_stept & collect_guards(const irep_idt &failed_property_id, localization_pointst &localization_points, fault_location_infot &fault_location)
Collects the guards as localization_points up to failed_property_id and initializes fault_location_in...
stack_decision_proceduret & solver
void update_scores(const localization_pointst &)
void localize_linear(const SSA_stept &failed_step, const localization_pointst &)
const symex_target_equationt & equation
std::vector< tvt > localization_points_valuet
Class that provides messages with a built-in verbosity 'level'.
virtual void pop()=0
Pop whatever is on top of the stack.
virtual void push(const std::vector< exprt > &assumptions)=0
Pushes a new context on the stack that consists of the given (possibly empty vector of) assumptions.
Inheriting the interface of symex_targett this class represents the SSA form of the input program as ...
Fault Localization for Goto Symex.
void solver(std::vector< framet > &frames, const std::unordered_set< symbol_exprt, irep_hash > &address_taken, const solver_optionst &solver_options, const namespacet &ns, std::vector< propertyt > &properties, std::size_t property_index)
#define UNREACHABLE
This should be used to mark dead code.
#define PRECONDITION(CONDITION)
Decision procedure with incremental solving with contexts and assumptions.
Generate Equation using Symbolic Execution.