CBMC
|
#include <variable_sensitivity_domain.h>
Public Member Functions | |
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 |
virtual bool | merge (const variable_sensitivity_domaint &b, trace_ptrt from, trace_ptrt to) |
Computes the join between "this" and "b". More... | |
virtual 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) |
Perform a context aware merge of the changes that have been applied between function_start and the current state. More... | |
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 jsont | output_json (const ai_baset &ai, const namespacet &ns) const |
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 Member Functions | |
void | transform_function_call (locationt from, locationt to, ai_baset &ai, const namespacet &ns) |
Used by variable_sensitivity_domaint::transform to handle FUNCTION_CALL transforms. More... | |
bool | ignore_function_call_transform (const irep_idt &function_id) const |
Used to specify which CPROVER internal functions should be skipped over when doing function call transforms. More... | |
std::vector< irep_idt > | get_modified_symbols (const variable_sensitivity_domaint &other) const |
Get symbols that have been modified since this domain and other. More... | |
void | apply_domain (std::vector< symbol_exprt > modified_symbols, const variable_sensitivity_domaint &target, const namespacet &ns) |
Given a domain and some symbols, apply those symbols values to the current domain. More... | |
void | assume (exprt expr, namespacet ns) |
Private Attributes | |
abstract_environmentt | abstract_state |
flow_sensitivityt | flow_sensitivity |
Additional Inherited Members | |
![]() | |
typedef goto_programt::const_targett | locationt |
typedef ai_history_baset::trace_ptrt | trace_ptrt |
![]() | |
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 116 of file variable_sensitivity_domain.h.
|
inlineexplicit |
Definition at line 119 of file variable_sensitivity_domain.h.
|
overridevirtual |
Use the information in the domain to simplify the expression with respect to the current location.
This may be able to reduce some values to constants.
condition | the expression to simplify |
ns | the namespace |
Reimplemented from ai_domain_baset.
Definition at line 245 of file variable_sensitivity_domain.cpp.
|
private |
Given a domain and some symbols, apply those symbols values to the current domain.
modified_symbols | The symbols to write |
target | The domain to take the values from |
ns | The global namespace |
Definition at line 462 of file variable_sensitivity_domain.cpp.
|
private |
Definition at line 474 of file variable_sensitivity_domain.cpp.
|
inlinevirtual |
Definition at line 216 of file variable_sensitivity_domain.h.
|
private |
Get symbols that have been modified since this domain and other.
other | The domain that things may have been modified in |
Definition at line 282 of file variable_sensitivity_domain.cpp.
|
private |
Used to specify which CPROVER internal functions should be skipped over when doing function call transforms.
function_id | the name of the function being called |
Definition at line 414 of file variable_sensitivity_domain.cpp.
|
overridevirtual |
Find out if the domain is currently unreachable.
Implements ai_domain_baset.
Definition at line 272 of file variable_sensitivity_domain.cpp.
|
overridevirtual |
Is the domain completely top at this state.
Implements ai_domain_baset.
Definition at line 277 of file variable_sensitivity_domain.cpp.
|
overridevirtual |
Sets the domain to bottom (no states / unreachable).
Implements ai_domain_baset.
Definition at line 209 of file variable_sensitivity_domain.cpp.
|
overridevirtual |
Set up a reasonable entry-point state.
Implements ai_domain_baset.
Definition at line 220 of file variable_sensitivity_domain.cpp.
|
overridevirtual |
Sets the domain to top (all states).
Implements ai_domain_baset.
Definition at line 215 of file variable_sensitivity_domain.cpp.
|
virtual |
Computes the join between "this" and "b".
b | the other domain |
from | it's preceding location |
to | it's current location |
Reimplemented in variable_sensitivity_dependence_domaint.
Definition at line 225 of file variable_sensitivity_domain.cpp.
|
virtual |
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 in variable_sensitivity_dependence_domaint.
Definition at line 430 of file variable_sensitivity_domain.cpp.
|
overridevirtual |
Basic text output of the abstract domain.
out | the output stream |
ai | the abstract interpreter |
ns | the namespace |
Reimplemented from ai_domain_baset.
Definition at line 170 of file variable_sensitivity_domain.cpp.
|
overridevirtual |
Gives a Boolean condition that is true for all values represented by the domain.
This allows domains to be converted into program invariants.
Reimplemented from ai_domain_baset.
Definition at line 178 of file variable_sensitivity_domain.cpp.
exprt variable_sensitivity_domaint::to_predicate | ( | const exprt & | expr, |
const namespacet & | ns | ||
) | const |
Definition at line 183 of file variable_sensitivity_domain.cpp.
exprt variable_sensitivity_domaint::to_predicate | ( | const exprt::operandst & | exprs, |
const namespacet & | ns | ||
) | const |
Definition at line 191 of file variable_sensitivity_domain.cpp.
|
overridevirtual |
Compute the abstract transformer for a single instruction.
function_from | the name of the function containing from |
trace_from | the instruction before the abstract domain |
function_to | the name of the function containing to |
trace_to | the instruction after the abstract domain |
ai | the abstract interpreter |
ns | the namespace |
Implements ai_domain_baset.
Definition at line 23 of file variable_sensitivity_domain.cpp.
|
private |
Used by variable_sensitivity_domaint::transform to handle FUNCTION_CALL transforms.
This is copying the values of the arguments into new symbols corresponding to the declared parameter names.
If the function call is opaque we currently top the return value and the value of any things whose address is passed into the function.
from | the location to transform from which is a function call |
to | the destination of the transform (potentially inside the function call) |
ai | the abstract interpreter |
ns | the namespace of the current state |
Definition at line 289 of file variable_sensitivity_domain.cpp.
|
private |
Definition at line 266 of file variable_sensitivity_domain.h.
|
private |
Definition at line 267 of file variable_sensitivity_domain.h.