summaryrefslogtreecommitdiff
path: root/Test/dafny0/Answer
blob: 043a4cfd7e4c13c38cb6bdd80d2e67387150e905 (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
134
135
136
137
138
139
140
141
142

-------------------- 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];
    }
  }
}

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

Dafny program verifier finished with 4 verified, 1 error

-------------------- 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(12,5): Error: assertion violation
Execution trace:
    (0,0): anon0
Use.dfy(25,5): Error: assertion violation
Execution trace:
    (0,0): anon0
Use.dfy(50,5): Error: assertion violation
Execution trace:
    (0,0): anon0

Dafny program verifier finished with 6 verified, 3 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