diff options
author | mikebarnett <unknown> | 2009-07-15 21:03:41 +0000 |
---|---|---|
committer | mikebarnett <unknown> | 2009-07-15 21:03:41 +0000 |
commit | ce1c2de044c91624370411e23acab13b0381949b (patch) | |
tree | 592539996fe08050ead5ee210c973801611dde40 /Test/test20/Prog1.bpl |
Initial set of files.
Diffstat (limited to 'Test/test20/Prog1.bpl')
-rw-r--r-- | Test/test20/Prog1.bpl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Test/test20/Prog1.bpl b/Test/test20/Prog1.bpl new file mode 100644 index 00000000..1d75805c --- /dev/null +++ b/Test/test20/Prog1.bpl @@ -0,0 +1,26 @@ +// Let's test some Boogie 2 features ...
+type real;
+type elements;
+
+type Field a;
+var heap : <a> [ref, Field a] a;
+
+
+
+procedure p (x:int, y:ref, z:<a> [ref, Field a] a) returns (newHeap : <a> [ref, Field a] a) {
+
+ var f : Field int;
+ var g : Field bool;
+
+ var heap : <a> [ref, Field a] a;
+
+ assert z[y, f] >= 0;
+ assert z[x, f] >= 0; // error: x has wrong type
+ assert z[y, x] >= 0; // error: x has wrong type
+ assert z[y, g] >= 0; // error: result of map select has wrong type
+
+ heap[y, g] := false;
+
+}
+
+type ref;
|