CBMC
|
#include <context_abstract_object.h>
Protected Types | |
using | context_abstract_object_ptrt = std::shared_ptr< context_abstract_objectt > |
typedef std::set< locationt, goto_programt::target_less_than > | locationst |
![]() | |
template<class T > | |
using | internal_sharing_ptrt = std::shared_ptr< T > |
typedef internal_sharing_ptrt< class abstract_objectt > | internal_abstract_object_pointert |
Protected Member Functions | |
void | set_child (const abstract_object_pointert &child) |
void | set_top_internal () override |
void | set_not_top_internal () override |
abstract_object_pointert | write (abstract_environmentt &environment, const namespacet &ns, const std::stack< exprt > &stack, const exprt &specifier, const abstract_object_pointert &value, bool merging_write) const override |
A helper function to evaluate writing to a component of an abstract object. | |
bool | has_been_modified (const abstract_object_pointert &before) const override |
Determine whether 'this' abstract_object has been modified in comparison to a previous 'before' state. | |
exprt | to_predicate_internal (const exprt &name) const override |
to_predicate implementation - derived classes will override | |
virtual context_abstract_object_ptrt | update_location_context_internal (const locationst &locations) const =0 |
![]() | |
virtual internal_abstract_object_pointert | mutable_clone () const |
abstract_object_pointert | abstract_object_merge (const abstract_object_pointert &other) const |
Create a new abstract object that is the result of the merge, unless the object would be unchanged, then would return itself. | |
bool | should_use_base_merge (const abstract_object_pointert &other) const |
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. | |
virtual abstract_object_pointert | merge (const abstract_object_pointert &other, const widen_modet &widen_mode) const |
Create a new abstract object that is the result of the merge, unless the object would be unchanged, then would return itself. | |
abstract_object_pointert | abstract_object_meet (const abstract_object_pointert &other) const |
Helper function for base meet. | |
bool | should_use_base_meet (const abstract_object_pointert &other) const |
Helper function to decide if base meet implementation should be used. | |
void | set_top () |
void | set_not_top () |
void | set_not_bottom () |
Protected Attributes | |
abstract_object_pointert | child_abstract_object |
Additional Inherited Members | |
![]() | |
typedef goto_programt::const_targett | locationt |
typedef sharing_mapt< irep_idt, abstract_object_pointert, false, irep_id_hash > | shared_mapt |
![]() | |
static void | dump_map (std::ostream out, const shared_mapt &m) |
static void | dump_map_diff (std::ostream out, const shared_mapt &m1, const shared_mapt &m2) |
Dump all elements in m1 that are different or missing in m2. | |
static combine_result | merge (const abstract_object_pointert &op1, const abstract_object_pointert &op2, const locationt &merge_location, const widen_modet &widen_mode) |
static combine_result | merge (const abstract_object_pointert &op1, const abstract_object_pointert &op2, const widen_modet &widen_mode) |
static combine_result | meet (const abstract_object_pointert &op1, const abstract_object_pointert &op2) |
Interface method for the meet operation. | |
Definition at line 21 of file context_abstract_object.h.
|
protected |
Definition at line 102 of file context_abstract_object.h.
|
protected |
Definition at line 127 of file context_abstract_object.h.
|
inline |
Definition at line 26 of file context_abstract_object.h.
|
inlineexplicit |
Definition at line 36 of file context_abstract_object.h.
|
inlinevirtual |
Definition at line 46 of file context_abstract_object.h.
abstract_object_pointert context_abstract_objectt::envelop | ( | abstract_object_pointert & | child | ) | const |
Definition at line 120 of file context_abstract_object.cpp.
|
overridevirtual |
Try to resolve an expression with the maximum level of precision available.
expr | the expression to evaluate and find the result of. This will be the symbol referred to be op0() |
operands | the operands to use instead of expr.operands() |
environment | the abstract environment in which to resolve 'expr' |
ns | the current namespace |
Reimplemented from abstract_objectt.
Definition at line 83 of file context_abstract_object.cpp.
abstract_object_pointert context_abstract_objectt::get_child | ( | ) | const |
Definition at line 15 of file context_abstract_object.cpp.
|
overridevirtual |
Reimplemented from abstract_objectt.
Definition at line 179 of file context_abstract_object.cpp.
|
overrideprotectedvirtual |
Determine whether 'this' abstract_object has been modified in comparison to a previous 'before' state.
before | The abstract_object_pointert to use as a reference to compare against |
Reimplemented from abstract_objectt.
Reimplemented in data_dependency_contextt, and write_location_contextt.
Definition at line 157 of file context_abstract_object.cpp.
|
inlineoverridevirtual |
Find out if the abstract object is bottom.
Reimplemented from abstract_objectt.
Definition at line 60 of file context_abstract_object.h.
|
inlineoverridevirtual |
Find out if the abstract object is top.
Reimplemented from abstract_objectt.
Definition at line 55 of file context_abstract_object.h.
|
overridevirtual |
Output a representation of the value of this abstract object.
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 abstract_objectt.
Reimplemented in data_dependency_contextt, liveness_contextt, and write_location_contextt.
Definition at line 141 of file context_abstract_object.cpp.
|
protected |
Definition at line 20 of file context_abstract_object.cpp.
|
overrideprotectedvirtual |
Reimplemented from abstract_objectt.
Definition at line 31 of file context_abstract_object.cpp.
|
overrideprotectedvirtual |
Reimplemented from abstract_objectt.
Definition at line 25 of file context_abstract_object.cpp.
|
inlineoverridevirtual |
Converts to a constant expression if possible.
If abstract element represents a single value, then that value, otherwise nil. E.G. if it is an interval then this will be x if it is [x,x] This is the (sort of) dual to the constant_exprt constructor that allows an object to be built from a value.
Reimplemented from abstract_objectt.
Definition at line 65 of file context_abstract_object.h.
|
overrideprotectedvirtual |
to_predicate implementation - derived classes will override
name | - the variable name to substitute into the expression |
Reimplemented from abstract_objectt.
Definition at line 174 of file context_abstract_object.cpp.
Get the real type of the variable this abstract object is representing.
Reimplemented from abstract_objectt.
Definition at line 50 of file context_abstract_object.h.
|
overridevirtual |
Reimplemented from abstract_objectt.
Definition at line 169 of file context_abstract_object.cpp.
|
protectedpure virtual |
Implemented in data_dependency_contextt, liveness_contextt, and write_location_contextt.
|
overrideprotectedvirtual |
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.
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 |
Reimplemented from abstract_objectt.
Reimplemented in data_dependency_contextt, liveness_contextt, and write_location_contextt.
Definition at line 53 of file context_abstract_object.cpp.
|
overridevirtual |
Update the location context for an abstract object.
location | the location to be updated |
Reimplemented from abstract_objectt.
Definition at line 108 of file context_abstract_object.cpp.
|
protected |
Definition at line 106 of file context_abstract_object.h.