blob: 6447f622fe6965fef1a18d34442cf1baa5600d42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// RUN: %boogie -stratifiedInline:1 -vc:i "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
var alloc: int;
var assertsPassed: bool;
procedure boogie_si_record_li2bpl_int(x: int);
procedure __HAVOC_malloc(size: int) returns (ret: int);
free requires size >= 0;
modifies alloc;
free ensures ret == old(alloc);
free ensures alloc >= old(alloc) + size;
procedure foo(arg: int)
modifies alloc;
{
var tt: int;
anon0__unique__1:
// assume NumberOfBytes_2 >= 0;
call boogie_si_record_li2bpl_int(arg);
call tt := __HAVOC_malloc(arg);
call boogie_si_record_li2bpl_int(alloc);
return;
}
procedure {:entrypoint} main()
modifies alloc;
{
var t1: int;
assume alloc > 0;
call foo(t1);
assume alloc < 0;
}
|