blob: 766c9d1eec9fdc9b0b684a5a4e54d613421e01a0 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
// RUN: %boogie -noinfer "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
procedure Test0()
{
var {:assumption} a0: bool;
assert a0;
}
procedure Test1(n: int)
{
var {:assumption} a0: bool;
a0 := a0 && (0 <= n);
assert a0; // error
}
procedure Test2()
{
var {:assumption} a0: bool;
havoc a0;
assert a0; // error
}
var {:assumption} ga0: bool;
procedure Test3()
modifies ga0;
{
ga0 := ga0 && true;
assert ga0; // error
}
procedure Test4()
{
var {:assumption} a0: bool;
var tmp: bool;
tmp := a0;
havoc a0;
assert a0 ==> tmp;
}
procedure Test5(A: bool)
{
var {:assumption} a0: bool;
var tmp0, tmp1: bool;
a0 := a0 && A;
tmp0 := a0;
havoc a0;
assert a0 ==> tmp0;
tmp1 := a0;
havoc a0;
assert a0 ==> tmp1;
}
|