@@ -115,43 +115,21 @@ class bv_pointerst:public boolbvt
115
115
// / \param bv: Encoded pointer
116
116
// / \param type: Type of the encoded pointer
117
117
// / \return Vector of literals identifying the object part of \p bv
118
- bvt object_literals (const bvt &bv, const pointer_typet &type) const
119
- {
120
- const std::size_t offset_width = bv_pointers_width.get_offset_width (type);
121
- const std::size_t object_width = bv_pointers_width.get_object_width (type);
122
- PRECONDITION (bv.size () >= offset_width + object_width);
123
-
124
- return bvt (
125
- bv.begin () + offset_width, bv.begin () + offset_width + object_width);
126
- }
118
+ bvt object_literals (const bvt &bv, const pointer_typet &type) const ;
127
119
128
120
// / Given a pointer encoded in \p bv, extract the literals representing the
129
121
// / offset into an object that the pointer points to.
130
122
// / \param bv: Encoded pointer
131
123
// / \param type: Type of the encoded pointer
132
124
// / \return Vector of literals identifying the offset part of \p bv
133
- bvt offset_literals (const bvt &bv, const pointer_typet &type) const
134
- {
135
- const std::size_t offset_width = bv_pointers_width.get_offset_width (type);
136
- PRECONDITION (bv.size () >= offset_width);
137
-
138
- return bvt (bv.begin (), bv.begin () + offset_width);
139
- }
125
+ bvt offset_literals (const bvt &bv, const pointer_typet &type) const ;
140
126
141
127
// / Construct a pointer encoding from given encodings of \p object and \p
142
128
// / offset.
143
129
// / \param object: Encoded object
144
130
// / \param offset: Encoded offset
145
131
// / \return Pointer encoding
146
- static bvt object_offset_encoding (const bvt &object, const bvt &offset)
147
- {
148
- bvt result;
149
- result.reserve (offset.size () + object.size ());
150
- result.insert (result.end (), offset.begin (), offset.end ());
151
- result.insert (result.end (), object.begin (), object.end ());
152
-
153
- return result;
154
- }
132
+ static bvt object_offset_encoding (const bvt &object, const bvt &offset);
155
133
};
156
134
157
135
#endif // CPROVER_SOLVERS_FLATTENING_BV_POINTERS_H
0 commit comments