CBMC
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
variable_sensitivity_domaint Class Reference

#include <variable_sensitivity_domain.h>

+ Inheritance diagram for variable_sensitivity_domaint:
+ Collaboration diagram for variable_sensitivity_domaint:

Public Member Functions

 
  Compute the abstract transformer for a single instruction.
 
  Sets the domain to bottom (no states / unreachable).
 
  Sets the domain to top (all states).
 
void  output (std::ostream &out, const ai_baset &ai, const namespacet &ns) const override
  Basic text output of the abstract domain.
 
  Gives a Boolean condition that is true for all values represented by the domain.
 
 
 
  Computes the join between "this" and "b".
 
  Merges just the things that have changes between "function_start" and "function_end" into "this".
 
  Use the information in the domain to simplify the expression with respect to the current location.
 
  Find out if the domain is currently unreachable.
 
  Is the domain completely top at this state.
 
 
- Public Member Functions inherited from ai_domain_baset
 
 
 
  Make this domain a reasonable entry-point state For most domains top is sufficient.
 
  Simplifies the expression but keeps it as an l-value.
 

Private Member Functions

  Used by variable_sensitivity_domaint::transform to handle FUNCTION_CALL transforms.
 
  Used to specify which CPROVER internal functions should be skipped over when doing function call transforms.
 
void  assume (exprt expr, namespacet ns)
 

Private Attributes

 
 

Additional Inherited Members

- Public Types inherited from ai_domain_baset
 
 
- Protected Member Functions inherited from ai_domain_baset
  The constructor is expected to produce 'false' or 'bottom' A default constructor is not part of the domain interface.
 
  A copy constructor is part of the domain interface.
 

Detailed Description

Definition at line 115 of file variable_sensitivity_domain.h.

Constructor & Destructor Documentation

◆  variable_sensitivity_domaint()

variable_sensitivity_domaint::variable_sensitivity_domaint ( variable_sensitivity_object_factory_ptrt  _object_factory,
const vsd_configt_configuration 
)
inlineexplicit

Definition at line 118 of file variable_sensitivity_domain.h.

Member Function Documentation

◆  ai_simplify()

bool variable_sensitivity_domaint::ai_simplify ( exprtcondition,
const namespacetns 
) const
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.

Parameters
condition the expression to simplify
ns the namespace
Returns
True if no simplification was made

Reimplemented from ai_domain_baset.

Definition at line 241 of file variable_sensitivity_domain.cpp.

◆  assume()

void variable_sensitivity_domaint::assume ( exprt  expr,
namespacet  ns 
)
private

Definition at line 452 of file variable_sensitivity_domain.cpp.

◆  eval()

virtual abstract_object_pointert variable_sensitivity_domaint::eval ( const exprtexpr,
const namespacetns 
) const
inlinevirtual

Definition at line 211 of file variable_sensitivity_domain.h.

◆  ignore_function_call_transform()

bool variable_sensitivity_domaint::ignore_function_call_transform ( const irep_idtfunction_id ) const
private

Used to specify which CPROVER internal functions should be skipped over when doing function call transforms.

Parameters
function_id the name of the function being called
Returns
Returns true if the function should be ignored

Definition at line 403 of file variable_sensitivity_domain.cpp.

◆  is_bottom()

bool variable_sensitivity_domaint::is_bottom ( ) const
overridevirtual

Find out if the domain is currently unreachable.

Returns
True if the domain is bottom (i.e. unreachable).

Implements ai_domain_baset.

Definition at line 268 of file variable_sensitivity_domain.cpp.

◆  is_top()

bool variable_sensitivity_domaint::is_top ( ) const
overridevirtual

Is the domain completely top at this state.

Returns
True if the domain is top

Implements ai_domain_baset.

Definition at line 273 of file variable_sensitivity_domain.cpp.

◆  make_bottom()

void variable_sensitivity_domaint::make_bottom ( )
overridevirtual

Sets the domain to bottom (no states / unreachable).

Implements ai_domain_baset.

Definition at line 210 of file variable_sensitivity_domain.cpp.

◆  make_top()

void variable_sensitivity_domaint::make_top ( )
overridevirtual

Sets the domain to top (all states).

Implements ai_domain_baset.

Definition at line 216 of file variable_sensitivity_domain.cpp.

◆  merge()

bool variable_sensitivity_domaint::merge ( const variable_sensitivity_domaintb,
trace_ptrt  from,
trace_ptrt  to 
)
virtual

Computes the join between "this" and "b".

Parameters
b the other domain
from it's preceding location
to it's current location
Returns
true if something has changed.

Reimplemented in variable_sensitivity_dependence_domaint.

Definition at line 221 of file variable_sensitivity_domain.cpp.

◆  merge_three_way_function_return()

void variable_sensitivity_domaint::merge_three_way_function_return ( const ai_domain_basetfunction_start,
const ai_domain_basetfunction_end,
const namespacetns 
)
virtual

Merges just the things that have changes between "function_start" and "function_end" into "this".

To be used correctly "this" must be derived from the function call site. Anything that is not modified in the function (such as globals) will not be changed.

Parameters
function_start The base of the diff - 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 419 of file variable_sensitivity_domain.cpp.

◆  output()

void variable_sensitivity_domaint::output ( std::ostream &  out,
const ai_basetai,
const namespacetns 
) const
overridevirtual

Basic text output of the abstract domain.

Parameters
out the output stream
ai the abstract interpreter
ns the namespace

Reimplemented from ai_domain_baset.

Definition at line 171 of file variable_sensitivity_domain.cpp.

◆  to_predicate() [1/3]

exprt variable_sensitivity_domaint::to_predicate ( void  ) const
overridevirtual

Gives a Boolean condition that is true for all values represented by the domain.

This allows domains to be converted into program invariants.

Returns
exprt describing the domain

Reimplemented from ai_domain_baset.

Definition at line 179 of file variable_sensitivity_domain.cpp.

◆  to_predicate() [2/3]

exprt variable_sensitivity_domaint::to_predicate ( const exprtexpr,
const namespacetns 
) const

Definition at line 184 of file variable_sensitivity_domain.cpp.

◆  to_predicate() [3/3]

exprt variable_sensitivity_domaint::to_predicate ( const exprt::operandstexprs,
const namespacetns 
) const

Definition at line 192 of file variable_sensitivity_domain.cpp.

◆  transform()

void variable_sensitivity_domaint::transform ( const irep_idtfunction_from,
trace_ptrt  trace_from,
const irep_idtfunction_to,
trace_ptrt  trace_to,
ai_basetai,
const namespacetns 
)
overridevirtual

Compute the abstract transformer for a single instruction.

Parameters
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 24 of file variable_sensitivity_domain.cpp.

◆  transform_function_call()

void variable_sensitivity_domaint::transform_function_call ( locationt  from,
locationt  to,
ai_basetai,
const namespacetns 
)
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.

Parameters
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 278 of file variable_sensitivity_domain.cpp.

Member Data Documentation

◆  abstract_state

abstract_environmentt variable_sensitivity_domaint::abstract_state
private

Definition at line 245 of file variable_sensitivity_domain.h.

◆  flow_sensitivity

flow_sensitivityt variable_sensitivity_domaint::flow_sensitivity
private

Definition at line 246 of file variable_sensitivity_domain.h.


The documentation for this class was generated from the following files:

AltStyle によって変換されたページ (->オリジナル) /