CBMC
|
#include <variable_sensitivity_dependence_graph.h>
Classes | |
class | dependency_ordert |
Public Types | |
typedef grapht< vs_dep_nodet >::node_indext | node_indext |
![]() | |
typedef goto_programt::const_targett | locationt |
typedef ai_history_baset::trace_ptrt | trace_ptrt |
Public Member Functions | |
variable_sensitivity_dependence_domaint (node_indext id, variable_sensitivity_object_factory_ptrt object_factory, const vsd_configt &configuration) | |
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. More... | |
void | make_bottom () override |
no states More... | |
void | make_top () override |
all states – the analysis doesn't use this, and domains may refuse to implement it. More... | |
void | make_entry () override |
Make this domain a reasonable entry-point state. More... | |
bool | is_bottom () const override |
bool | is_top () const override |
bool | merge (const variable_sensitivity_domaint &b, trace_ptrt from, trace_ptrt to) override |
Computes the join between "this" and "b". More... | |
void | merge_three_way_function_return (const ai_domain_baset &function_call, const ai_domain_baset &function_start, const ai_domain_baset &function_end, const namespacet &ns) override |
Perform a context aware merge of the changes that have been applied between function_start and the current state. More... | |
void | output (std::ostream &out, const ai_baset &ai, const namespacet &ns) const override |
Basic text output of the abstract domain. More... | |
jsont | output_json (const ai_baset &ai, const namespacet &ns) const override |
Outputs the current value of the domain. More... | |
void | populate_dep_graph (variable_sensitivity_dependence_grapht &, goto_programt::const_targett) const |
node_indext | get_node_id () const |
![]() | |
variable_sensitivity_domaint (variable_sensitivity_object_factory_ptrt _object_factory, const vsd_configt &_configuration) | |
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. More... | |
void | make_bottom () override |
Sets the domain to bottom (no states / unreachable). More... | |
void | make_top () override |
Sets the domain to top (all states). More... | |
void | make_entry () override |
Set up a reasonable entry-point state. More... | |
void | output (std::ostream &out, const ai_baset &ai, const namespacet &ns) const override |
Basic text output of the abstract domain. More... | |
exprt | to_predicate () const override |
Gives a Boolean condition that is true for all values represented by the domain. More... | |
exprt | to_predicate (const exprt &expr, const namespacet &ns) const |
exprt | to_predicate (const exprt::operandst &exprs, const namespacet &ns) const |
bool | ai_simplify (exprt &condition, const namespacet &ns) const override |
Use the information in the domain to simplify the expression with respect to the current location. More... | |
bool | is_bottom () const override |
Find out if the domain is currently unreachable. More... | |
bool | is_top () const override |
Is the domain completely top at this state. More... | |
virtual abstract_object_pointert | eval (const exprt &expr, const namespacet &ns) const |
![]() | |
virtual | ~ai_domain_baset () |
virtual xmlt | output_xml (const ai_baset &ai, const namespacet &ns) const |
virtual bool | ai_simplify_lhs (exprt &condition, const namespacet &ns) const |
Simplifies the expression but keeps it as an l-value. More... | |
Private Types | |
typedef std::map< goto_programt::const_targett, std::set< exprt >, dependency_ordert > | data_depst |
typedef std::map< goto_programt::const_targett, tvt > | control_depst |
typedef std::set< goto_programt::const_targett > | control_dep_candidatest |
typedef std::set< goto_programt::const_targett > | control_dep_callst |
Private Member Functions | |
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. More... | |
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) |
void | data_dependencies (goto_programt::const_targett from, goto_programt::const_targett to, variable_sensitivity_dependence_grapht &dep_graph, const namespacet &ns) |
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) |
Additional Inherited Members | |
![]() | |
ai_domain_baset () | |
The constructor is expected to produce 'false' or 'bottom' A default constructor is not part of the domain interface. More... | |
ai_domain_baset (const ai_domain_baset &old) | |
A copy constructor is part of the domain interface. More... | |
Definition at line 70 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 188 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 185 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 182 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 179 of file variable_sensitivity_dependence_graph.h.
Definition at line 74 of file variable_sensitivity_dependence_graph.h.
|
inlineexplicit |
Definition at line 76 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 204 of file variable_sensitivity_dependence_graph.cpp.
|
private |
Definition at line 135 of file variable_sensitivity_dependence_graph.cpp.
|
private |
Evaluate an expression and accumulate all the data dependencies involved in the evaluation.
expr | the expression to evaluate |
ns | the namespace to use |
deps | the destination in which to accumlate data dependencies |
Definition at line 27 of file variable_sensitivity_dependence_graph.cpp.
|
inline |
Definition at line 154 of file variable_sensitivity_dependence_graph.h.
|
inlineoverridevirtual |
Implements ai_domain_baset.
Definition at line 124 of file variable_sensitivity_dependence_graph.h.
|
inlineoverridevirtual |
Implements ai_domain_baset.
Definition at line 129 of file variable_sensitivity_dependence_graph.h.
|
inlineoverridevirtual |
no states
Implements ai_domain_baset.
Definition at line 95 of file variable_sensitivity_dependence_graph.h.
|
inlineoverridevirtual |
Make this domain a reasonable entry-point state.
Implements ai_domain_baset.
Definition at line 119 of file variable_sensitivity_dependence_graph.h.
|
inlineoverridevirtual |
all states – the analysis doesn't use this, and domains may refuse to implement it.
Implements ai_domain_baset.
Definition at line 107 of file variable_sensitivity_dependence_graph.h.
|
overridevirtual |
Computes the join between "this" and "b".
b | the other domain |
from | the location preceding the 'b' domain |
to | the current location |
Reimplemented from variable_sensitivity_domaint.
Definition at line 399 of file variable_sensitivity_dependence_graph.cpp.
|
private |
Definition at line 314 of file variable_sensitivity_dependence_graph.cpp.
|
overridevirtual |
Perform a context aware merge of the changes that have been applied between function_start and the current state.
Anything that has not been modified will be taken from the function_call
domain.
function_call | The local of the merge - values from here will be taken if they have not been modified |
function_start | The base of the merge - changes that have been made between here and the end will be retained. |
function_end | The end of the merge - changes that have been made / between the start and here will be retained. |
ns | The global namespace |
Reimplemented from variable_sensitivity_domaint.
Definition at line 448 of file variable_sensitivity_dependence_graph.cpp.
|
overridevirtual |
Basic text output of the abstract domain.
out | the stream to output onto |
ai | the abstract domain |
ns | the namespace |
Reimplemented from ai_domain_baset.
Definition at line 470 of file variable_sensitivity_dependence_graph.cpp.
|
overridevirtual |
Outputs the current value of the domain.
ai | the abstract interpreter |
ns | the namespace |
Reimplemented from ai_domain_baset.
Definition at line 540 of file variable_sensitivity_dependence_graph.cpp.
void variable_sensitivity_dependence_domaint::populate_dep_graph | ( | variable_sensitivity_dependence_grapht & | dep_graph, |
goto_programt::const_targett | this_loc | ||
) | const |
Definition at line 593 of file variable_sensitivity_dependence_graph.cpp.
|
overridevirtual |
Compute the abstract transformer for a single instruction.
For the data dependencies, this involves calculating all the data dependencies that exist in the 'to' instruction.
function_from | the function of the instruction before the abstract domain |
trace_from | the instruction before the abstract domain |
function_to | the function of the instruction after the abstract domain |
trace_to | the instruction after the abstract domain |
ai | the abstract interpreter |
ns | the namespace |
Implements ai_domain_baset.
Definition at line 68 of file variable_sensitivity_dependence_graph.cpp.
|
private |
Definition at line 190 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 189 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 186 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 183 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 180 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 165 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 164 of file variable_sensitivity_dependence_graph.h.
|
private |
Definition at line 163 of file variable_sensitivity_dependence_graph.h.