blob: 84f927413072338b5fa0ecdba7e7e77f422f0d23 (
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
|
const x: int;
function R(int) returns (bool);
function Even(int) returns (bool);
var y: int where R(y);
var g: int where g == 12;
procedure P(x: int where x > 0) returns (y: int where y < 0);
requires x < 100;
modifies g;
ensures -100 < y;
procedure Q(x: int where x > 0) returns (y: int where y < 0)
requires x < 100;
modifies g;
ensures (forall t: int where Even(t) :: -100 < y + t) || // error: where not allowed in quant
(exists t: int where Even(t) :: -100 < y + t); // error: where not allowed in quant
{
var a: int;
var b: int;
start:
a := x;
call b := P(a);
y := b;
return;
}
|