CBMC
|
abstract_objectt is the top of the inheritance heirarchy of objects used to represent individual variables in the general non-relational domain. More...
#include <memory>
#include <set>
#include <stack>
#include <goto-programs/goto_program.h>
#include <util/sharing_map.h>
Go to the source code of this file.
Classes | |
class | abstract_objectt |
struct | abstract_objectt::combine_result |
Clones the first parameter and merges it with the second. More... | |
struct | abstract_objectt::abstract_object_visitort |
Pure virtual interface required of a client that can apply a copy-on-write operation to a given abstract_object_pointert. More... | |
struct | abstract_hashert |
struct | abstract_equalert |
Macros | |
#define | CLONE |
Typedefs | |
template<class T > | |
using | sharing_ptrt = std::shared_ptr< const T > |
Merge is designed to allow different abstractions to be merged gracefully. More... | |
typedef sharing_ptrt< class abstract_objectt > | abstract_object_pointert |
using | abstract_object_visitedt = std::set< abstract_object_pointert > |
abstract_objectt is the top of the inheritance heirarchy of objects used to represent individual variables in the general non-relational domain.
It is a two element abstraction (i.e. it is either top or bottom). Within the hierarchy of objects under it, child classes are more precise abstractions (the converse doesn't hold to avoid diamonds and inheriting unnecessary fields). Thus the common parent of two classes is an abstraction capable of representing both. This is important for understanding merge.
These objects are intended to be used in a copy-on-write style, which is why their interface differs a bit from ai_domain_baset's modify-in-place style of interface.
Although these can represent bottom (this variable cannot take any value) it is not common for them to do so.
Definition in file abstract_object.h.
#define CLONE |
Definition at line 41 of file abstract_object.h.
typedef sharing_ptrt<class abstract_objectt> abstract_object_pointert |
Definition at line 69 of file abstract_object.h.
using abstract_object_visitedt = std::set<abstract_object_pointert> |
Definition at line 70 of file abstract_object.h.
using sharing_ptrt = std::shared_ptr<const T> |
Merge is designed to allow different abstractions to be merged gracefully.
There are two real use-cases for this:
To handle this, merge is dispatched to the first abstract object being merged, which switches based on the type of the other object. If it can merge then it merges, otherwise it calls the parent merge.
Definition at line 67 of file abstract_object.h.