summaryrefslogtreecommitdiff
path: root/Test/aitest1/ineq.bpl.expect
blob: d6c36bddd9b7840cfca752eed26dc63c65f2d029 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
procedure SimpleLoop();



implementation SimpleLoop()
{
  var i: int;

  start:
    assume {:inferred} true;
    i := 0;
    assume {:inferred} i == 0;
    goto test;

  test:  // cut point
    assume {:inferred} 0 <= i && i < 11;
    assume {:inferred} 0 <= i && i < 11;
    goto Then, Else;

  Else:
    assume {:inferred} 0 <= i && i < 11;
    assume !(i < 10);
    assume {:inferred} 0 <= i && i < 11;
    return;

  Then:
    assume {:inferred} 0 <= i && i < 11;
    assume i < 10;
    i := i + 1;
    assume {:inferred} 1 <= i && i < 11;
    goto test;
}



procedure VariableBoundLoop(n: int);



implementation VariableBoundLoop(n: int)
{
  var i: int;

  start:
    assume {:inferred} true;
    i := 0;
    assume {:inferred} i == 0;
    goto test;

  test:  // cut point
    assume {:inferred} 0 <= i;
    assume {:inferred} 0 <= i;
    goto Then, Else;

  Else:
    assume {:inferred} 0 <= i;
    assume !(i < n);
    assume {:inferred} 0 <= i;
    return;

  Then:
    assume {:inferred} 0 <= i;
    assume i < n;
    i := i + 1;
    assume {:inferred} 1 <= i && 1 <= n;
    goto test;
}



procedure Foo();



implementation Foo()
{
  var i: int;

  start:
    assume {:inferred} true;
    i := 3 * i + 1;
    i := 3 * (i + 1);
    i := 1 + 3 * i;
    i := (i + 1) * 3;
    assume {:inferred} true;
    return;
}



procedure FooToo();



implementation FooToo()
{
  var i: int;

  start:
    assume {:inferred} true;
    i := 5;
    i := 3 * i + 1;
    i := 3 * (i + 1);
    i := 1 + 3 * i;
    i := (i + 1) * 3;
    assume {:inferred} i == 465;
    return;
}



procedure FooTooStepByStep();



implementation FooTooStepByStep()
{
  var i: int;

  L0:
    assume {:inferred} true;
    i := 5;
    i := 3 * i + 1;
    i := 3 * (i + 1);
    i := 1 + 3 * i;
    i := (i + 1) * 3;
    assume {:inferred} i == 465;
    return;
}



Boogie program verifier finished with 0 verified, 0 errors