Go to the documentation of this file.
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;
104 for(
const auto &edge : m.out)
118 if(post_dom_all || !post_dom_one)
138 if((w_end!=-1 && w_end <= r_start) ||
139 (r_end!=-1 && w_start >= r_end))
141 else if(w_start >= r_start)
144 (r_end!=-1 && w_end > r_start))
164 goto_rw(function_to, to, rw_set);
172 for(
const auto &w_range : w_ranges)
175 for(
const auto &wr : w_range.second)
177 for(
const auto &r_range : r_ranges)
181 r_range.first, r_range.second))
204 assert(dep_graph!=
nullptr);
211 if(dep->is_function_call())
218 return d->is_function_call();
220 "All entries must be function calls");
227 if(from->is_function_call())
229 if(function_from == function_to)
271 out <<
"Control dependencies: ";
272 for(depst::const_iterator
279 out << (*it)->location_number;
286 out <<
"Data dependencies: ";
287 for(depst::const_iterator
294 out << (*it)->location_number;
313 {
"sourceLocation",
json(cd->source_location)},
322 {
"sourceLocation",
json(dd->source_location)},
327 return std::move(graph);
344 auto p = util_make_unique<dep_graph_domaint>(node_id);
347 return std::unique_ptr<statet>(p.release());
366 const node_indext n_from = (*this)[from].get_node_id();
367 assert(n_from<
size());
368 const node_indext n_to = (*this)[to].get_node_id();
374 nodes[n_from].out[n_to].add(kind);
375 nodes[n_to].in[n_from].add(kind);
const reaching_definitions_analysist & reaching_definitions() const
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 add_dep(dep_edget::kindt kind, goto_programt::const_targett from, goto_programt::const_targett to)
dependence_grapht(const namespacet &_ns)
#define CHECK_RETURN(CONDITION)
value_setst & get_value_sets() const
const post_dominators_mapt & cfg_post_dominators() const
static void goto_rw(const irep_idt &function, goto_programt::const_targett target, const code_assignt &assign, rw_range_sett &rw_set)
node_indext add_node(arguments &&... values)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
std::map< locationt, rangest > ranges_at_loct
bool is_bottom() const final override
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
This ensures that all domains are constructed with the node ID that links them to the graph part of t...
void output(std::ostream &out, const ai_baset &ai, const namespacet &ns) const final override
nodet::node_indext node_indext
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
std::unique_ptr< T > util_make_unique(Ts &&... ts)
dep_graph_domain_factoryt(dependence_grapht &_dg)
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
void control_dependencies(const irep_idt &function_id, goto_programt::const_targett from, goto_programt::const_targett to, dependence_grapht &dep_graph)
std::unique_ptr< statet > make(locationt l) const override
bool util_inplace_set_union(std::set< T, Compare, Alloc > &target, const std::set< T, Compare, Alloc > &source)
Compute union of two sets.
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
const cfgt::nodet & get_node(const T &program_point) const
Get the graph node (which gives dominators, predecessors and successors) for program_point.
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)
depst control_dep_candidates
bool merge(const dep_graph_domaint &src, goto_programt::const_targett from, goto_programt::const_targett to)
void data_dependencies(goto_programt::const_targett from, const irep_idt &function_to, goto_programt::const_targett to, dependence_grapht &dep_graph, const namespacet &ns)
This is the basic interface of the abstract interpreter with default implementations of the core func...
ai_domain_baset::locationt locationt
instructionst::const_iterator const_targett
void populate_dep_graph(dependence_grapht &, goto_programt::const_targett) const
virtual statet & get_state(locationt l)
const V & get(const std::size_t value_index) const
jsont output_json(const ai_baset &ai, const namespacet &ns) const override
Outputs the current value of the domain.
jsont & push_back(const jsont &json)
const range_domaint & get_ranges(objectst::const_iterator it) const
Field-Sensitive Program Dependence Analysis, Litvak et al., FSE 2010.