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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
-------------------- Simple.dfy --------------------
// synthetic program
class MyClass<T, U> {
var x: int;
method M(s: bool, lotsaObjects: set<object>)
returns (t: object, u: set<int>, v: seq<MyClass<bool,U>>):
requires s;
modifies this;
modifies lotsaObjects;
ensures t == t;
ensures old(null) != this;
{
x := 12;
while (x < 100)
invariant x <= 100;
{
x := x + 17;
if (x % 20 == 3) {
x := this.x + 1;
} else {
this.x := x + 0;
}
call t, u, v := M(true, lotsaObjects)
var to: MyClass<T,U>;
call to, u, v := M(true, lotsaObjects)
call to, u, v := to.M(true, lotsaObjects)
assert v[x] != null ==> null !in v[2 .. x][1..][5 := v[this.x]][..10];
}
}
function F(x: int, y: int, h: WildData, k: WildData): WildData
{
if x < 0 then
h
else if x == 0 then
if if h == k then true else false then
h
else if y == 0 then
k
else
h
else
k
}
}
datatype List<T> {
Nil;
Cons(T, List<T>);
}
datatype WildData {
Something;
JustAboutAnything<G, H>(G, myName: set<H>, int, WildData);
More(List<int>);
}
datatype Nothing { }
class C {
var w: WildData;
var list: List<bool>;
}
Dafny program verifier finished with 0 verified, 0 errors
-------------------- BQueue.bpl --------------------
Boogie program verifier finished with 8 verified, 0 errors
-------------------- TypeTests.dfy --------------------
TypeTests.dfy(4,13): Error: incorrect type of function argument 0 (expected C, got D)
TypeTests.dfy(4,13): Error: incorrect type of function argument 1 (expected D, got C)
TypeTests.dfy(5,13): Error: incorrect type of function argument 0 (expected C, got int)
TypeTests.dfy(5,13): Error: incorrect type of function argument 1 (expected D, got int)
TypeTests.dfy(11,4): Error: incorrect type of method in-parameter 0 (expected int, got bool)
TypeTests.dfy(12,4): Error: incorrect type of method out-parameter 0 (expected int, got C)
TypeTests.dfy(12,4): Error: incorrect type of method out-parameter 1 (expected C, got int)
7 resolution/type errors detected in synthetic program
-------------------- SmallTests.dfy --------------------
SmallTests.dfy(30,7): Error: RHS expression must be well defined
Execution trace:
(0,0): anon0
SmallTests.dfy(61,36): Error: possible division by zero
Execution trace:
(0,0): anon10_Then
SmallTests.dfy(62,51): Error: possible division by zero
Execution trace:
(0,0): anon10_Else
(0,0): anon3
(0,0): anon11_Else
SmallTests.dfy(63,22): Error: target object may be null
Execution trace:
(0,0): anon10_Then
(0,0): anon3
(0,0): anon11_Then
(0,0): anon6
Dafny program verifier finished with 6 verified, 4 errors
-------------------- Queue.dfy --------------------
Dafny program verifier finished with 12 verified, 0 errors
-------------------- ListCopy.dfy --------------------
Dafny program verifier finished with 2 verified, 0 errors
-------------------- BinaryTree.dfy --------------------
Dafny program verifier finished with 13 verified, 0 errors
-------------------- ListReverse.dfy --------------------
Dafny program verifier finished with 1 verified, 0 errors
-------------------- ListContents.dfy --------------------
Dafny program verifier finished with 5 verified, 0 errors
-------------------- SchorrWaite.dfy --------------------
Dafny program verifier finished with 6 verified, 0 errors
-------------------- Termination.dfy --------------------
Dafny program verifier finished with 6 verified, 0 errors
-------------------- Use.dfy --------------------
Use.dfy(15,5): Error: assertion violation
Execution trace:
(0,0): anon0
Use.dfy(26,5): Error: assertion violation
Execution trace:
(0,0): anon0
Use.dfy(35,5): Error: assertion violation
Execution trace:
(0,0): anon0
Use.dfy(56,5): Error: assertion violation
Execution trace:
(0,0): anon0
Use.dfy(88,5): Error: assertion violation
Execution trace:
(0,0): anon0
Use.dfy(130,5): Error: assertion violation
Execution trace:
(0,0): anon0
Use.dfy(152,5): Error: assertion violation
Execution trace:
(0,0): anon0
Use.dfy(170,5): Error: assertion violation
Execution trace:
(0,0): anon0
Use.dfy(215,5): Error: assertion violation
Execution trace:
(0,0): anon0
Dafny program verifier finished with 20 verified, 9 errors
-------------------- DTypes.dfy --------------------
DTypes.dfy(15,5): Error: assertion violation
Execution trace:
(0,0): anon0
DTypes.dfy(28,5): Error: assertion violation
Execution trace:
(0,0): anon0
DTypes.dfy(54,5): Error: assertion violation
Execution trace:
(0,0): anon0
Dafny program verifier finished with 5 verified, 3 errors
-------------------- TypeParameters.dfy --------------------
TypeParameters.dfy(41,5): Error: assertion violation
Execution trace:
(0,0): anon0
TypeParameters.dfy(63,5): Error: assertion violation
Execution trace:
(0,0): anon0
Dafny program verifier finished with 10 verified, 2 errors
-------------------- Datatypes.dfy --------------------
Dafny program verifier finished with 6 verified, 0 errors
-------------------- UnboundedStack.dfy --------------------
Dafny program verifier finished with 7 verified, 0 errors
-------------------- SumOfCubes.dfy --------------------
Dafny program verifier finished with 10 verified, 0 errors
|