summaryrefslogtreecommitdiff
path: root/Test/test1/WhereTyping.bpl
diff options
context:
space:
mode:
Diffstat (limited to 'Test/test1/WhereTyping.bpl')
-rw-r--r--Test/test1/WhereTyping.bpl94
1 files changed, 47 insertions, 47 deletions
diff --git a/Test/test1/WhereTyping.bpl b/Test/test1/WhereTyping.bpl
index 0884e8ef..b3675f45 100644
--- a/Test/test1/WhereTyping.bpl
+++ b/Test/test1/WhereTyping.bpl
@@ -1,47 +1,47 @@
-// RUN: %boogie -noVerify "%s" > "%t"
-// RUN: %diff "%s.expect" "%t"
-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;
-
-implementation P(xx: int) returns (yy: int)
-{
- var a: int;
- var b: int;
-
- start:
- a := xx;
- call b := P(a);
- yy := b;
- return;
-}
-
-type double;
-function F(double) returns (double);
-function G(double) returns (bool);
-
-procedure Q(omega: double where omega == F(omega),
- psi: double where psi + 1 == 0, // error: psi doesn't have right type for +
- pi: double where F(pi), // error: F has wrong return type
- sigma: double where G(sigma));
-
-
-const SomeConstant: name;
-function fgh(int) returns (int);
-
-procedure Cnst(n: name where n <: SomeConstant /*this SomeConstant refers to the const*/) returns (SomeConstant: int)
-{
- var k: int where k != SomeConstant; // fine, since SomeConstants refers to the out parameter
- var m: name where m != SomeConstant; // error: types don't match up
- var r: ref where (forall abc: int :: abc == SomeConstant);
- var b: bool;
- start:
- b := (forall x: int :: fgh(x) < SomeConstant);
- b := (forall l: name :: l == SomeConstant); // error: SomeConstant here refers to the out parameter
- return;
-}
-
-type ref, name;
+// RUN: %boogie -noVerify "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+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;
+
+implementation P(xx: int) returns (yy: int)
+{
+ var a: int;
+ var b: int;
+
+ start:
+ a := xx;
+ call b := P(a);
+ yy := b;
+ return;
+}
+
+type double;
+function F(double) returns (double);
+function G(double) returns (bool);
+
+procedure Q(omega: double where omega == F(omega),
+ psi: double where psi + 1 == 0, // error: psi doesn't have right type for +
+ pi: double where F(pi), // error: F has wrong return type
+ sigma: double where G(sigma));
+
+
+const SomeConstant: name;
+function fgh(int) returns (int);
+
+procedure Cnst(n: name where n <: SomeConstant /*this SomeConstant refers to the const*/) returns (SomeConstant: int)
+{
+ var k: int where k != SomeConstant; // fine, since SomeConstants refers to the out parameter
+ var m: name where m != SomeConstant; // error: types don't match up
+ var r: ref where (forall abc: int :: abc == SomeConstant);
+ var b: bool;
+ start:
+ b := (forall x: int :: fgh(x) < SomeConstant);
+ b := (forall l: name :: l == SomeConstant); // error: SomeConstant here refers to the out parameter
+ return;
+}
+
+type ref, name;