12 #ifndef CPROVER_ANALYSES_VARIABLE_SENSITIVITY_VARIABLE_SENSITIVITY_DEPENDENCE_GRAPH_H
13 #define CPROVER_ANALYSES_VARIABLE_SENSITIVITY_VARIABLE_SENSITIVITY_DEPENDENCE_GRAPH_H
151 node_id != std::numeric_limits<node_indext>::max(),
152 "Check for the old uninitialised value");
168 return a->location_number < b->location_number;
172 map<goto_programt::const_targett, std::set<exprt>, dependency_ordert>
177 map<goto_programt::const_targett, tvt, goto_programt::target_less_than>
182 set<goto_programt::const_targett, goto_programt::target_less_than>
187 set<goto_programt::const_targett, goto_programt::target_less_than>
218 public grapht<vs_dep_nodet>
258 for(
const auto &location_state :
261 std::static_pointer_cast<variable_sensitivity_dependence_domaint>(
262 location_state.second)
263 ->populate_dep_graph(*
this, location_state.first);
std::shared_ptr< variable_sensitivity_object_factoryt > variable_sensitivity_object_factory_ptrt
Compute dominators for CFG of goto_function.
This is the basic interface of the abstract interpreter with default implementations of the core func...
goto_programt::const_targett locationt
message_handlert & message_handler
std::unique_ptr< ai_domain_factory_baset > domain_factory
For creating domain objects.
virtual void initialize(const irep_idt &function_id, const goto_programt &goto_program)
Initialize all the abstract states for a single function.
virtual statet & get_state(trace_ptrt p)
Get the state for the given history, creating it with the factory if it doesn't exist.
The interface offered by a domain, allows code to manipulate domains without knowing their exact type...
ai_history_baset::trace_ptrt trace_ptrt
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
A collection of goto functions.
A generic container class for the GOTO intermediate representation of one function.
instructionst::const_iterator const_targett
This class represents a node in a directed graph.
A generic directed graph with a parametric node type.
The most conventional storage; one domain per location.
statet & get_state(trace_ptrt p, const ai_domain_factory_baset &fac) override
Look up the analysis state for a given history, instantiating a new domain if required.
state_mapt & internal(void)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
This ensures that all domains are constructed with the node ID that links them to the graph part of t...
bool operator()(const goto_programt::const_targett &a, const goto_programt::const_targett &b) const
control_dep_candidatest control_dep_candidates
void control_dependencies(const irep_idt &from_function, goto_programt::const_targett from, const irep_idt &to_function, goto_programt::const_targett to, variable_sensitivity_dependence_grapht &dep_graph)
bool is_bottom() const override
control_depst control_deps
bool is_top() const override
void populate_dep_graph(variable_sensitivity_dependence_grapht &, goto_programt::const_targett) const
control_dep_callst control_dep_calls
std::map< goto_programt::const_targett, tvt, goto_programt::target_less_than > control_depst
std::map< goto_programt::const_targett, std::set< exprt >, dependency_ordert > data_depst
std::set< goto_programt::const_targett, goto_programt::target_less_than > control_dep_candidatest
std::set< goto_programt::const_targett, goto_programt::target_less_than > control_dep_callst
control_dep_callst control_dep_call_candidates
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) override
Compute the abstract transformer for a single instruction.
node_indext get_node_id() const
void make_top() override
all states – the analysis doesn't use this directly (see make_entry) and domains may refuse to implem...
void eval_data_deps(const exprt &expr, const namespacet &ns, data_depst &deps) const
Evaluate an expression and accumulate all the data dependencies involved in the evaluation.
void merge_three_way_function_return(const ai_domain_baset &function_start, const ai_domain_baset &function_end, const namespacet &ns) override
Merges just the things that have changes between "function_start" and "function_end" into "this".
bool merge_control_dependencies(const control_depst &other_control_deps, const control_dep_candidatest &other_control_dep_candidates, const control_dep_callst &other_control_dep_calls, const control_dep_callst &other_control_dep_call_candidates)
bool merge(const variable_sensitivity_domaint &b, trace_ptrt from, trace_ptrt to) override
Computes the join between "this" and "b".
variable_sensitivity_dependence_domaint(node_indext id, variable_sensitivity_object_factory_ptrt object_factory, const vsd_configt &configuration)
void output(std::ostream &out, const ai_baset &ai, const namespacet &ns) const override
Basic text output of the abstract domain.
void data_dependencies(goto_programt::const_targett from, goto_programt::const_targett to, variable_sensitivity_dependence_grapht &dep_graph, const namespacet &ns)
data_depst domain_data_deps
void make_bottom() override
no states
jsont output_json(const ai_baset &ai, const namespacet &ns) const override
Outputs the current value of the domain.
grapht< vs_dep_nodet >::node_indext node_indext
post_dominators_mapt & cfg_post_dominators()
std::map< irep_idt, cfg_post_dominatorst > post_dominators_mapt
void initialize(const irep_idt &function_id, const goto_programt &goto_program)
Initialize all the abstract states for a single function.
variable_sensitivity_dependence_grapht(const goto_functionst &goto_functions, const namespacet &_ns, variable_sensitivity_object_factory_ptrt object_factory, const vsd_configt &_configuration, message_handlert &message_handler)
variable_sensitivity_dependence_domaint & operator[](locationt l)
void finalize()
Override this to add a cleanup or post-processing step after fixedpoint has run.
friend variable_sensitivity_dependence_domaint
const goto_functionst & goto_functions
friend variable_sensitivity_dependence_domain_factoryt
post_dominators_mapt post_dominators
void add_dep(vs_dep_edget::kindt kind, goto_programt::const_targett from, goto_programt::const_targett to)
virtual statet & get_state(locationt l)
virtual statet & get_state(trace_ptrt p)
Get the state for the given history, creating it with the factory if it doesn't exist.
void make_bottom() override
Sets the domain to bottom (no states / unreachable).
void make_top() override
Sets the domain to top (all states).
bool is_bottom() const override
Find out if the domain is currently unreachable.
bool is_top() const override
Is the domain completely top at this state.
A Template Class for Graphs.
exprt object_factory(const typet &type, const irep_idt base_name, code_blockt &init_code, symbol_table_baset &symbol_table, java_object_factory_parameterst parameters, lifetimet lifetime, const source_locationt &loc, const select_pointer_typet &pointer_type_selector, message_handlert &log)
Similar to gen_nondet_init below, but instead of allocating and non-deterministically initializing th...
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
graph_nodet< vs_dep_edget >::edgest edgest
graph_nodet< vs_dep_edget >::edget edget
goto_programt::const_targett PC
An abstract interpreter, based on the default recursive-interprocedural that uses variable sensitivit...
There are different ways of handling arrays, structures, unions and pointers.