#include <full_array_abstract_object.h>
+ Inheritance diagram for full_array_abstract_objectt:
+ Collaboration diagram for full_array_abstract_objectt:
Start the abstract object at either top or bottom or neither Asserts if both top and bottom are true.
the current known value about this object.
Update the 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.
Interface for transforms.
A helper function to evaluate writing to a component of an abstract object.
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.
Converts to a constant expression if possible.
Converts to an invariant expression.
Print the value of the abstract object.
Determine whether 'this' abstract_object has been modified in comparison to a previous 'before' state.
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
A helper function to read elements from an array.
A helper function to evaluate writing to a index of an array.
Tries to do an array/array merge if merging with a constant array If it can't, falls back to parent merge.
To validate that the struct object is in a valid state.
Perform any additional structural modifications when setting this object to TOP.
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.
Short hand method for creating a top element of the array.
Merges an array into this array.
to_predicate implementation - derived classes will override
Additional Inherited Members
Dump all elements in m1 that are different or missing in m2.
Interface method for the meet operation.
static bool merge_shared_maps (
const sharing_mapt< keyt,
abstract_object_pointert,
false, hash > &
map1,
const sharing_mapt< keyt,
abstract_object_pointert,
false, hash > &
map2,
sharing_mapt< keyt,
abstract_object_pointert,
false, hash > &
out_map,
const widen_modet &
widen_mode)
Detailed Description
Member Typedef Documentation
◆ abstract_aggregate_baset
◆ full_array_pointert
◆ shared_array_mapt
Constructor & Destructor Documentation
◆ full_array_abstract_objectt() [1/2]
full_array_abstract_objectt::full_array_abstract_objectt
(
typet
type,
)
Start the abstract object at either top or bottom or neither Asserts if both top and bottom are true.
- Parameters
-
type the type the abstract_object is representing
top is the abstract_object starting as top
bottom is the abstract_object starting as bottom
Definition at line 67 of file full_array_abstract_object.cpp.
◆ full_array_abstract_objectt() [2/2]
full_array_abstract_objectt::full_array_abstract_objectt
(
const exprt &
expr,
)
- Parameters
-
expr the expression to use as the starting pointer for an abstract object
environment the environment the abstract object is being created in
ns the namespace
Definition at line 76 of file full_array_abstract_object.cpp.
Member Function Documentation
◆ full_array_merge()
Merges an array into this array.
- Parameters
-
other The object to merge in
widen_mode Indicates if this is a widening merge
- Returns
- Returns a new abstract object that is the result of the merge unless the merge is the same as this abstract object, in which case it returns this..
Definition at line 123 of file full_array_abstract_object.cpp.
◆ get_top_entry()
Short hand method for creating a top element of the array.
- Parameters
-
env the abstract environment
ns the namespace
- Returns
- An abstract object pointer of type type().subtype() (i.e. the type of the array's values).
Definition at line 387 of file full_array_abstract_object.cpp.
◆ map_find_or_top()
◆ map_put()
◆ merge()
)
const
overrideprotectedvirtual
Tries to do an array/array merge if merging with a constant array If it can't, falls back to parent merge.
- Parameters
-
other The object to merge in
widen_mode Indicates if this is a widening merge
- Returns
- Returns the result of the merge.
Reimplemented from abstract_objectt.
Definition at line 111 of file full_array_abstract_object.cpp.
◆ merge_location_context()
Update the merge location context for an abstract object.
- Parameters
-
location the location to be updated
- Returns
- a clone of this abstract object with its location context updated
Reimplemented from abstract_objectt.
Definition at line 401 of file full_array_abstract_object.cpp.
◆ mutable_clone()
inlineoverrideprotectedvirtual
◆ output()
void full_array_abstract_objectt::output
(
std::ostream &
out,
)
const
override
the current known value about this object.
For this array we print: { [0] - <output of object at index 0... }
- Parameters
-
out the stream to write to
ai the abstract interpreter that contains the abstract domain (that contains the object ... )
ns the current namespace
Definition at line 148 of file full_array_abstract_object.cpp.
◆ read_component()
)
const
overrideprotectedvirtual
◆ read_element()
◆ set_top_internal()
void full_array_abstract_objectt::set_top_internal
(
)
overrideprotectedvirtual
◆ statistics()
)
const
overrideprotectedvirtual
◆ to_predicate_internal()
exprt full_array_abstract_objectt::to_predicate_internal
(
const exprt &
name )
const
overrideprivatevirtual
to_predicate implementation - derived classes will override
- Parameters
-
name - the variable name to substitute into the expression
- Returns
- Returns an exprt representing the object as an invariant.
Reimplemented from abstract_objectt.
Definition at line 418 of file full_array_abstract_object.cpp.
◆ verify()
bool full_array_abstract_objectt::verify
(
)
const
overrideprotectedvirtual
To validate that the struct object is in a valid state.
This means either it is top or bottom, or if neither of those then there exists something in the map of components. If there is something in the map, then it can't be top or bottom
- Returns
- Returns true if the struct is valid
Reimplemented from abstract_objectt.
Definition at line 96 of file full_array_abstract_object.cpp.
◆ visit_sub_elements()
Apply a visitor operation to all sub elements of this abstract_object.
A sub element might be a member of a struct, or an element of an array, for instance, but this is entirely determined by the particular derived instance of abstract_objectt.
- Parameters
-
visitor an instance of a visitor class that will be applied to all sub elements
- Returns
- A new abstract_object if it's contents is modifed, or this if no modification is needed
Reimplemented from abstract_objectt.
Definition at line 407 of file full_array_abstract_object.cpp.
◆ write_component()
)
const
overrideprotectedvirtual
A helper function to evaluate writing to a index of an array.
- Parameters
-
environment the abstract environment
ns the namespace
stack the remaining stack of expressions on the LHS to evaluate
expr the expression uses to access a specific index
value the value we are trying to assign to that value in the array
merging_write Should this and all future writes be merged with the current value
- Returns
- The abstract_object_pointert representing the result of writing to a specific index.
Reimplemented from abstract_aggregate_objectt< full_array_abstract_objectt, array_aggregate_typet >.
Definition at line 188 of file full_array_abstract_object.cpp.
◆ write_element()
◆ write_leaf_element()
◆ write_location_context()
Update the location context for an abstract object.
- Parameters
-
location the location to be updated
- Returns
- a clone of this abstract object with its location context updated
Reimplemented from abstract_objectt.
Definition at line 395 of file full_array_abstract_object.cpp.
◆ write_sub_element()
Member Data Documentation
◆ map
The documentation for this class was generated from the following files: