CBMC
Loading...
Searching...
No Matches
pointer_logic.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Pointer Logic
4
5Author: Daniel Kroening, kroening@kroening.com
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_SOLVERS_FLATTENING_POINTER_LOGIC_H
13#define CPROVER_SOLVERS_FLATTENING_POINTER_LOGIC_H
14
15#include <util/mp_arith.h>
16#include <util/expr.h>
17#include <util/numbering.h>
18
19class namespacet;
20class pointer_typet;
21
23{
24public:
25 // this numbers the objects
27
28 struct pointert
29 {
32
34 : object(std::move(_obj)), offset(std::move(_off))
35 {
36 }
37 };
38
41 const pointert &pointer,
42 const pointer_typet &type) const;
43
45 exprt pointer_expr(const mp_integer &object, const pointer_typet &type) const;
46
48 explicit pointer_logict(const namespacet &_ns);
49
50 mp_integer add_object(const exprt &expr);
51
54 {
55 return null_object;
56 }
57
60 {
61 return invalid_object;
62 }
63
64 bool is_dynamic_object(const exprt &expr) const;
65
66 void get_dynamic_objects(std::vector<mp_integer> &objects) const;
67
68protected:
69 const namespacet &ns;
71};
72
73#endif // CPROVER_SOLVERS_FLATTENING_POINTER_LOGIC_H
Base class for all expressions.
Definition expr.h:57
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition namespace.h:91
const mp_integer & get_invalid_object() const
const mp_integer & get_null_object() const
mp_integer invalid_object
numberingt< exprt, irep_hash > objects
exprt pointer_expr(const pointert &pointer, const pointer_typet &type) const
Convert an (object,offset) pair to an expression.
mp_integer null_object
void get_dynamic_objects(std::vector< mp_integer > &objects) const
mp_integer add_object(const exprt &expr)
const namespacet & ns
bool is_dynamic_object(const exprt &expr) const
pointer_logict(const namespacet &_ns)
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
named_mp_integert< bytes_tagt > bytest
Definition mp_arith.h:184
STL namespace.
BigInt mp_integer
Definition smt_terms.h:17
pointert(mp_integer _obj, bytest _off)