73 if(from->is_goto() || from->is_assume())
75 else if(from->is_end_function())
95 bool post_dom_all = !control_dep_candidate->is_assume();
96 bool post_dom_one=
false;
100 cfg_post_dominatorst::cfgt::entry_mapt::const_iterator e =
104 e != pd.
cfg.
entry_map.end(),
"cfg must have an entry for every location");
110 for(
const auto &edge : m.out)
121 if(post_dom_all || !post_dom_one)
141 if((w_end!=-1 && w_end <= r_start) ||
142 (r_end!=-1 && w_start >= r_end))
144 else if(w_start >= r_start)
147 (r_end!=-1 && w_end > r_start))
174 for(
const auto &w_range : w_ranges)
177 for(
const auto &wr : w_range.second)
178 for(
const auto &r_range : r_ranges)
181 r_range.first, r_range.second))
202 assert(dep_graph!=
nullptr);
205 if(from->is_function_call())
207 if(function_from == function_to)
217 dynamic_cast<dep_graph_domaint*>(&(dep_graph->
get_state(next)));
247 out <<
"Control dependencies: ";
248 for(depst::const_iterator
255 out << (*it)->location_number;
262 out <<
"Data dependencies: ";
263 for(depst::const_iterator
270 out << (*it)->location_number;
288 link[
"locationNumber"]=
290 link[
"sourceLocation"]=
json(cd->source_location);
297 link[
"locationNumber"]=
299 link[
"sourceLocation"]=
json(dd->source_location);
304 return std::move(graph);
312 const node_indext n_from = (*this)[from].get_node_id();
313 assert(n_from<
size());
314 const node_indext n_to = (*this)[to].get_node_id();
320 nodes[n_from].out[n_to].add(kind);
321 nodes[n_to].in[n_from].add(kind);
void output(std::ostream &out, const ai_baset &ai, const namespacet &ns) const final override
void transform(const irep_idt &function_from, goto_programt::const_targett from, const irep_idt &function_to, goto_programt::const_targett to, ai_baset &ai, const namespacet &ns) final override
how function calls are treated: a) there is an edge from each call site to the function head b) there...
Field-Sensitive Program Dependence Analysis, Litvak et al., FSE 2010.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
bool util_inplace_set_union(std::set< T, Compare, Alloc > &target, const std::set< T, Compare, Alloc > &source)
Compute union of two sets.
const reaching_definitions_analysist & reaching_definitions() const
void add_dep(dep_edget::kindt kind, goto_programt::const_targett from, goto_programt::const_targett to)
jsont & push_back(const jsont &json)
void control_dependencies(goto_programt::const_targett from, goto_programt::const_targett to, dependence_grapht &dep_graph)
instructionst::const_iterator const_targett
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
void goto_rw(goto_programt::const_targett target, const code_assignt &assign, rw_range_sett &rw_set)
jsont output_json(const ai_baset &ai, const namespacet &ns) const override
Outputs the current value of the domain.
const post_dominators_mapt & cfg_post_dominators() const
value_setst & get_value_sets() const
void populate_dep_graph(dependence_grapht &, goto_programt::const_targett) const
nodet::node_indext node_indext
depst control_dep_candidates
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
#define forall_rw_range_set_r_objects(it, rw_set)
void data_dependencies(goto_programt::const_targett from, goto_programt::const_targett to, dependence_grapht &dep_graph, const namespacet &ns)
const V & get(const std::size_t value_index) const
static bool may_be_def_use_pair(const mp_integer &w_start, const mp_integer &w_end, const mp_integer &r_start, const mp_integer &r_end)
The basic interface of an abstract interpreter.
bool merge(const dep_graph_domaint &src, goto_programt::const_targett from, goto_programt::const_targett to)
bool is_bottom() const final override
const range_domaint & get_ranges(objectst::const_iterator it) const
json_objectt & make_object()
virtual statet & get_state(goto_programt::const_targett l)
Get the state for the given location, creating it in a default way if it doesn't exist.
std::map< locationt, rangest > ranges_at_loct
json_objectt json(const source_locationt &location)