CBMC
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | List of all members
abstract_value_objectt Class Referenceabstract

#include <abstract_value_object.h>

+ Inheritance diagram for abstract_value_objectt:
+ Collaboration diagram for abstract_value_objectt:

Public Member Functions

 
 
 
 
 
  Interface for transforms.
 
 
  A helper function to evaluate writing to a component of an abstract object.
 
- Public Member Functions inherited from abstract_objectt
  Start the abstract object at either top or bottom or neither Asserts if both top and bottom are true.
 
  Construct an abstract object from the expression.
 
 
  Get the real type of the variable this abstract object is representing.
 
  Find out if the abstract object is top.
 
  Find out if the abstract object is bottom.
 
  Verify the internal structure of an abstract_object is correct.
 
 
  Converts to a constant expression if possible.
 
  Converts to an invariant expression.
 
virtual void  output (std::ostream &out, const class ai_baset &ai, const namespacet &ns) const
  Print the value of the abstract object.
 
  Determine whether 'this' abstract_object has been modified in comparison to a previous 'before' state.
 
  Update the write location context for an abstract object.
 
  Update the merge location context for an abstract object.
 
 
 
 
  Apply a visitor operation to all sub elements of this abstract_object.
 
 
 
  to_predicate implementation - derived classes will override
 

Protected Types

 
- Protected Types inherited from abstract_objectt
template<class T >
using  internal_sharing_ptrt = std::shared_ptr< T >
 
 

Protected Member Functions

  Attempts to do a value/value merge if both are constants, otherwise falls back to the parent merge.
 
  Base implementation of the meet operation: only used if no more precise abstraction can be used, can only result in {TOP, BOTTOM, one of the original objects}.
 
 
 
 
 
 
- Protected Member Functions inherited from abstract_objectt
 
  Create a new abstract object that is the result of the merge, unless the object would be unchanged, then would return itself.
 
  To detect the cases where the base merge is sufficient to do a merge We can't do if this->is_bottom() since we want the specific.
 
  Helper function for base meet.
 
  Helper function to decide if base meet implementation should be used.
 
 
 
 

Additional Inherited Members

- Public Types inherited from abstract_objectt
 
 
- Static Public Member Functions inherited from abstract_objectt
static void  dump_map (std::ostream out, const shared_mapt &m)
 
  Dump all elements in m1 that are different or missing in m2.
 
 
 
  Interface method for the meet operation.
 

Detailed Description

Definition at line 239 of file abstract_value_object.h.

Member Typedef Documentation

◆  abstract_value_pointert

Definition at line 298 of file abstract_value_object.h.

Constructor & Destructor Documentation

◆  abstract_value_objectt() [1/2]

abstract_value_objectt::abstract_value_objectt ( const typettype,
bool  tp,
bool  bttm 
)
inline

Definition at line 243 of file abstract_value_object.h.

◆  abstract_value_objectt() [2/2]

abstract_value_objectt::abstract_value_objectt ( const exprtexpr,
const abstract_environmenttenvironment,
const namespacetns 
)
inline

Definition at line 248 of file abstract_value_object.h.

Member Function Documentation

◆  as_value()

abstract_value_pointert abstract_value_objectt::as_value ( const abstract_object_pointertobj ) const
protected

Definition at line 697 of file abstract_value_object.cpp.

◆  constrain()

virtual sharing_ptrt< const abstract_value_objectt > abstract_value_objectt::constrain ( const exprtlower,
const exprtupper 
) const
pure virtual

Implemented in constant_abstract_valuet, interval_abstract_valuet, and value_set_abstract_objectt.

◆  expression_transform()

abstract_object_pointert abstract_value_objectt::expression_transform ( const exprtexpr,
const std::vector< abstract_object_pointert > &  operands,
const abstract_environmenttenvironment,
const namespacetns 
) const
finalvirtual

Interface for transforms.

Parameters
expr the expression to evaluate and find the result of it. This will be the symbol referred to be op0()
operands an abstract_object (pointer) that represent the possible values of each operand
environment the abstract environment in which the expression is being evaluated
ns the current variable namespace
Returns
Returns the abstract_object representing the result of this expression to the maximum precision available.

Reimplemented from abstract_objectt.

Definition at line 172 of file abstract_value_object.cpp.

◆  index_range()

index_ranget abstract_value_objectt::index_range ( const namespacetns ) const
inline

Definition at line 256 of file abstract_value_object.h.

◆  index_range_implementation()

virtual index_range_implementation_ptrt abstract_value_objectt::index_range_implementation ( const namespacetns ) const
protectedpure virtual

Implemented in constant_abstract_valuet, interval_abstract_valuet, and value_set_abstract_objectt.

◆  meet()

abstract_object_pointert abstract_value_objectt::meet ( const abstract_object_pointertother ) const
finalprotectedvirtual

Base implementation of the meet operation: only used if no more precise abstraction can be used, can only result in {TOP, BOTTOM, one of the original objects}.

Parameters
other pointer to the abstract object to meet
Returns
the resulting abstract object pointer

Reimplemented from abstract_objectt.

Definition at line 205 of file abstract_value_object.cpp.

◆  meet_with_value()

virtual abstract_object_pointert abstract_value_objectt::meet_with_value ( const abstract_value_pointertother ) const
protectedpure virtual

Implemented in constant_abstract_valuet, interval_abstract_valuet, and value_set_abstract_objectt.

◆  merge()

abstract_object_pointert abstract_value_objectt::merge ( const abstract_object_pointertother,
const widen_modetwiden_mode 
) const
finalprotectedvirtual

Attempts to do a value/value merge if both are constants, otherwise falls back to the parent merge.

Parameters
other the abstract object to merge with
widen_mode Indicates if this is a widening merge
Returns
Returns the result of the merge

Reimplemented from abstract_objectt.

Definition at line 192 of file abstract_value_object.cpp.

◆  merge_with_value()

virtual abstract_object_pointert abstract_value_objectt::merge_with_value ( const abstract_value_pointertother,
const widen_modetwiden_mode 
) const
protectedpure virtual

Implemented in constant_abstract_valuet, interval_abstract_valuet, and value_set_abstract_objectt.

◆  to_interval()

virtual constant_interval_exprt abstract_value_objectt::to_interval ( ) const
pure virtual

Implemented in constant_abstract_valuet, interval_abstract_valuet, and value_set_abstract_objectt.

◆  value_range()

value_ranget abstract_value_objectt::value_range ( ) const
inline

Definition at line 261 of file abstract_value_object.h.

◆  value_range_implementation()

virtual value_range_implementation_ptrt abstract_value_objectt::value_range_implementation ( ) const
protectedpure virtual

Implemented in constant_abstract_valuet, interval_abstract_valuet, and value_set_abstract_objectt.

◆  write()

abstract_object_pointert abstract_value_objectt::write ( abstract_environmenttenvironment,
const namespacetns,
const std::stack< exprt > &  stack,
const exprtspecifier,
bool  merging_write 
) const
finalvirtual

A helper function to evaluate writing to a component of an abstract object.

More precise abstractions may override this to update what they are storing for a specific component.

Parameters
environment the abstract environment
ns the current namespace
stack the remaining stack of expressions on the LHS to evaluate
specifier the expression uses to access a specific component
value the value we are trying to write to the component
merging_write if true, this and all future writes will be merged with the current value
Returns
the abstract_objectt representing the result of writing to a specific component.

Reimplemented from abstract_objectt.

Definition at line 181 of file abstract_value_object.cpp.


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

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