@@ -260,6 +260,29 @@ package body Driver is
260
260
Source_Location => No_Location));
261
261
end Initialize_CProver_Malloc_Object ;
262
262
263
+ procedure Initialize_CProver_Memory ;
264
+ procedure Initialize_CProver_Memory is
265
+ Memory_Type : constant Irep := Make_Pointer_Type
266
+ (I_Subtype => Make_Void_Type,
267
+ Width => Pointer_Type_Width);
268
+ Memory_Sym : constant Irep := Make_Symbol_Expr
269
+ (I_Type => Memory_Type,
270
+ Identifier => " __CPROVER_memory" ,
271
+ Source_Location => No_Location);
272
+ Memory_Val : constant Irep := Integer_Constant_To_BV_Expr
273
+ (Value => Uint_0,
274
+ Expr_Type => Memory_Type,
275
+ Source_Location => No_Location);
276
+ begin
277
+ Declare_Missing_Global (Memory_Sym);
278
+ Append_Op
279
+ (Start_Body,
280
+ Make_Code_Assign
281
+ (Lhs => Memory_Sym,
282
+ Rhs => Memory_Val,
283
+ Source_Location => No_Location));
284
+ end Initialize_CProver_Memory ;
285
+
263
286
procedure Initialize_Enum_Values ;
264
287
procedure Initialize_Enum_Values is
265
288
@@ -348,6 +371,7 @@ package body Driver is
348
371
Initialize_CProver_Dead_Object;
349
372
Initialize_CProver_Deallocated;
350
373
Initialize_CProver_Malloc_Object;
374
+ Initialize_CProver_Memory;
351
375
Initialize_Enum_Values;
352
376
Initialize_Boolean_Values;
353
377
end Initialize_CProver_Internal_Variables ;
0 commit comments