CBMC
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
data_dependency_contextt Class Reference

#include <data_dependency_context.h>

+ Inheritance diagram for data_dependency_contextt:
+ Collaboration diagram for data_dependency_contextt:

Classes

class   location_ordert
 

Public Member Functions

 
 
  A helper function to evaluate writing to a component of an abstract object.
 
  Determine whether 'this' abstract_object has been modified in comparison to a previous 'before' state.
 
  Return the set of data dependencies associated with this node.
 
  Return the set of data dominators associated with this node.
 
void  output (std::ostream &out, const class ai_baset &ai, const namespacet &ns) const override
  Output a representation of the value of this abstract object.
 
- Public Member Functions inherited from write_location_contextt
 
 
 
  Determine whether 'this' abstract_object has been modified in comparison to a previous 'before' state.
 
  Construct the union of the location set of the current object, and a the provided location set.
 
void  output (std::ostream &out, const class ai_baset &ai, const namespacet &ns) const override
  Output a representation of the value of this abstract object.
 
- Public Member Functions inherited from context_abstract_objectt
 
 
 
  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.
 
  Converts to a constant expression if possible.
 
  Try to resolve an expression with the maximum level of precision available.
 
  Update the location context for 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.
 
 
  Verify the internal structure of an abstract_object is correct.
 
  Converts to an invariant expression.
 
  Update the merge location context for an abstract object.
 
 
 
  Apply a visitor operation to all sub elements of this abstract_object.
 
 
 

Protected Member Functions

 
  Create a new abstract object that is the result of merging this abstract object with a given abstract_object.
 
  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}.
 
  Helper function for abstract_objectt::abstract_object_merge to perform any additional actions after the base abstract_object_merge has completed its actions but immediately prior to it returning.
 
- Protected Member Functions inherited from write_location_contextt
 
  Create a new abstract object that is the result of merging this abstract object with a given abstract_object.
 
  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}.
 
  Helper function for abstract_objectt::abstract_object_merge to perform any additional actions after the base abstract_object_merge has completed its actions but immediately prior to it returning.
 
  A helper function to evaluate writing to a component of an abstract object.
 
 
  Sets the last written locations for this context.
 
- Protected Member Functions inherited from context_abstract_objectt
 
 
 
  to_predicate implementation - derived classes will override
 
- 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.
 
 
 
 

Private Types

 
 

Private Member Functions

 
  Insert the given set of data dependencies into the data dependencies set for this data_dependency_context object.
 
 
  Set the given set of data dependencies for from the locations.
 
  Set the given set of data dependencies for this data_dependency_context object.
 

Private Attributes

 
 

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.
 
- Protected Types inherited from context_abstract_objectt
 
 
- Protected Types inherited from abstract_objectt
template<class T >
using  internal_sharing_ptrt = std::shared_ptr< T >
 
 
- Static Protected Member Functions inherited from write_location_contextt
  Internal helper function to format and output a given set of locations.
 
- Protected Attributes inherited from context_abstract_objectt
 

Detailed Description

Definition at line 19 of file data_dependency_context.h.

Member Typedef Documentation

◆  data_dependency_context_ptrt

Definition at line 73 of file data_dependency_context.h.

◆  dependenciest

Definition at line 90 of file data_dependency_context.h.

Constructor & Destructor Documentation

◆  data_dependency_contextt() [1/2]

data_dependency_contextt::data_dependency_contextt ( const abstract_object_pointert  child,
const typettype,
bool  top,
bool  bottom 
)
inline

Definition at line 24 of file data_dependency_context.h.

◆  data_dependency_contextt() [2/2]

data_dependency_contextt::data_dependency_contextt ( const abstract_object_pointert  child,
const exprtexpr,
const abstract_environmenttenvironment,
const namespacetns 
)
inlineexplicit

Definition at line 33 of file data_dependency_context.h.

Member Function Documentation

◆  abstract_object_merge_internal()

abstract_object_pointert data_dependency_contextt::abstract_object_merge_internal ( const abstract_object_pointertother ) const
overrideprotectedvirtual

Helper function for abstract_objectt::abstract_object_merge to perform any additional actions after the base abstract_object_merge has completed its actions but immediately prior to it returning.

As such, this function gives the ability to perform additional work for a merge.

For the dependency context, this additional work is the tracking of last_written_locations across the merge

Parameters
other the object to merge with this
Returns
the result of the merge

Reimplemented from abstract_objectt.

Definition at line 308 of file data_dependency_context.cpp.

◆  combine()

abstract_object_pointert data_dependency_contextt::combine ( const data_dependency_context_ptrtother,
) const
private

Definition at line 260 of file data_dependency_context.cpp.

◆  get_data_dependencies()

std::set< goto_programt::const_targett, goto_programt::target_less_than > data_dependency_contextt::get_data_dependencies ( ) const

Return the set of data dependencies associated with this node.

Returns
set of data dependencies

Definition at line 331 of file data_dependency_context.cpp.

◆  get_data_dominators()

std::set< goto_programt::const_targett, goto_programt::target_less_than > data_dependency_contextt::get_data_dominators ( ) const

Return the set of data dominators associated with this node.

Returns
set of data dominators

Definition at line 346 of file data_dependency_context.cpp.

◆  has_been_modified()

bool data_dependency_contextt::has_been_modified ( const abstract_object_pointertbefore ) const
overridevirtual

Determine whether 'this' abstract_object has been modified in comparison to a previous 'before' state.

Parameters
before the abstract_object_pointert to use as a reference to compare against
Returns
true if 'this' is considered to have been modified in comparison to 'before', false otherwise.

Reimplemented from context_abstract_objectt.

Definition at line 28 of file data_dependency_context.cpp.

◆  insert_data_deps()

abstract_object_pointert data_dependency_contextt::insert_data_deps ( const dependenciestdependencies ) const
private

Insert the given set of data dependencies into the data dependencies set for this data_dependency_context object.

Parameters
dependencies the set of dependencies to add
Returns
a new data_dependency_context if new dependencies were added, or 'this' if no addtional dependencies were added.

Definition at line 82 of file data_dependency_context.cpp.

◆  meet()

abstract_object_pointert data_dependency_contextt::meet ( const abstract_object_pointertother ) const
overrideprotectedvirtual

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 243 of file data_dependency_context.cpp.

◆  merge()

abstract_object_pointert data_dependency_contextt::merge ( const abstract_object_pointertother,
const widen_modetwiden_mode 
) const
overrideprotectedvirtual

Create a new abstract object that is the result of merging this abstract object with a given abstract_object.

Parameters
other the abstract object to merge with
widen_mode Indicates if this is a widening merge
Returns
the result of the merge, or 'this' if the merge would not change the current abstract object

Reimplemented from abstract_objectt.

Definition at line 223 of file data_dependency_context.cpp.

◆  mutable_clone()

internal_abstract_object_pointert data_dependency_contextt::mutable_clone ( ) const
inlineoverrideprotectedvirtual

Reimplemented from abstract_objectt.

Definition at line 61 of file data_dependency_context.h.

◆  output()

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

Output a representation of the value of this abstract object.

Parameters
out the stream to write to
ai the abstract interpreter that contains the abstract domain (that contains the object ... )
ns the current namespace

Reimplemented from context_abstract_objectt.

Definition at line 355 of file data_dependency_context.cpp.

◆  set_data_deps() [1/2]

void data_dependency_contextt::set_data_deps ( const dependenciestdependencies )
private

Set the given set of data dependencies for this data_dependency_context object.

Parameters
dependencies the set of dependencies to set

Definition at line 159 of file data_dependency_context.cpp.

◆  set_data_deps() [2/2]

void data_dependency_contextt::set_data_deps ( const locationstlocations )
private

Set the given set of data dependencies for from the locations.

Parameters
locations the write locations

Definition at line 146 of file data_dependency_context.cpp.

◆  update_location_context_internal()

context_abstract_objectt::context_abstract_object_ptrt data_dependency_contextt::update_location_context_internal ( const locationstlocations ) const
overrideprivatevirtual

Implements context_abstract_objectt.

Definition at line 131 of file data_dependency_context.cpp.

◆  write()

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

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 context_abstract_objectt.

Definition at line 194 of file data_dependency_context.cpp.

Member Data Documentation

◆  data_deps

dependenciest data_dependency_contextt::data_deps
private

Definition at line 91 of file data_dependency_context.h.

◆  data_dominators

dependenciest data_dependency_contextt::data_dominators
private

Definition at line 92 of file data_dependency_context.h.


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

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