Go to the documentation of this file.
15 #ifndef CPROVER_ANALYSES_DEPENDENCE_GRAPH_H
16 #define CPROVER_ANALYSES_DEPENDENCE_GRAPH_H
98 "node_id must not be valid");
109 "node_id must be valid");
122 node_id != std::numeric_limits<node_indext>::max(),
123 "node_id must not be valid");
136 "node_id must be valid");
142 "If the domain is top, it must have no dependencies");
150 "node_id must be valid");
156 "If the domain is bottom, it must have no dependencies");
163 assert(
node_id!=std::numeric_limits<node_indext>::max());
175 typedef std::set<goto_programt::const_targett>
depst;
212 public ait<dep_graph_domaint>,
226 rd(goto_functions,
ns);
231 if(!goto_program.
empty())
234 entry.first, std::prev(goto_program.
instructions.end()));
247 if(!goto_program.
empty())
259 for(
const auto &location_state :
262 std::static_pointer_cast<dep_graph_domaint>(location_state.second)
263 ->populate_dep_graph(*
this, location_state.first);
292 #endif // CPROVER_ANALYSES_DEPENDENCE_GRAPH_H
const reaching_definitions_analysist & reaching_definitions() const
std::map< irep_idt, goto_programt::const_targett > end_function_map
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
grapht< dep_nodet >::node_indext node_indext
void initialize(const irep_idt &function, const goto_programt &goto_program)
Initialize all the abstract states for a single function.
virtual void make_bottom()=0
no states
void transform(const irep_idt &function_from, trace_ptrt trace_from, const irep_idt &function_to, trace_ptrt trace_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...
void add_dep(dep_edget::kindt kind, goto_programt::const_targett from, goto_programt::const_targett to)
friend dep_graph_domain_factoryt
dependence_grapht(const namespacet &_ns)
A generic directed graph with a parametric node type.
const post_dominators_mapt & cfg_post_dominators() const
state_mapt & internal(void)
void make_top() final override
all states – the analysis doesn't use this, and domains may refuse to implement it.
bool empty() const
Is the program empty?
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
bool is_bottom() const final override
graph_nodet< dep_edget >::edget edget
void finalize()
Override this to add a cleanup or post-processing step after fixedpoint has run.
const friend depst & dependence_graph_test_get_data_deps(const dep_graph_domaint &)
function_mapt function_map
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
ai_history_baset::trace_ptrt trace_ptrt
void make_entry() final override
Make this domain a reasonable entry-point state.
void initialize(const goto_functionst &goto_functions)
Initialize all the abstract states for a whole program.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
void control_dependencies(const irep_idt &function_id, goto_programt::const_targett from, goto_programt::const_targett to, dependence_grapht &dep_graph)
goto_programt::const_targett PC
void make_bottom() final override
no states
dep_graph_domaint(node_indext id)
virtual statet & get_state(trace_ptrt p)
Get the state for the given history, creating it with the factory if it doesn't exist.
node_indext get_node_id() const
reaching_definitions_analysist rd
std::map< irep_idt, cfg_post_dominatorst > post_dominators_mapt
std::set< goto_programt::const_targett > depst
depst control_dep_candidates
The most conventional storage; one domain per location.
bool is_top() const final override
post_dominators_mapt post_dominators
instructionst instructions
The list of instructions in the goto program.
virtual void initialize(const irep_idt &function_id, const goto_programt &goto_program)
Initialize all the abstract states for a single function.
A collection of goto functions.
bool merge(const dep_graph_domaint &src, trace_ptrt from, trace_ptrt to)
This class represents a node in a directed graph.
const friend depst & dependence_graph_test_get_control_deps(const dep_graph_domaint &)
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...
graph_nodet< dep_edget >::edgest edgest
A generic container class for the GOTO intermediate representation of one function.
instructionst::const_iterator const_targett
void populate_dep_graph(dependence_grapht &, goto_programt::const_targett) const
The interface offered by a domain, allows code to manipulate domains without knowing their exact type...
jsont output_json(const ai_baset &ai, const namespacet &ns) const override
Outputs the current value of the domain.
#define forall_goto_program_instructions(it, program)