summaryrefslogtreecommitdiff
path: root/Test/test20/ParallelAssignment.bpl
diff options
context:
space:
mode:
authorGravatar mikebarnett <unknown>2009-07-15 21:03:41 +0000
committerGravatar mikebarnett <unknown>2009-07-15 21:03:41 +0000
commitce1c2de044c91624370411e23acab13b0381949b (patch)
tree592539996fe08050ead5ee210c973801611dde40 /Test/test20/ParallelAssignment.bpl
Initial set of files.
Diffstat (limited to 'Test/test20/ParallelAssignment.bpl')
-rw-r--r--Test/test20/ParallelAssignment.bpl23
1 files changed, 23 insertions, 0 deletions
diff --git a/Test/test20/ParallelAssignment.bpl b/Test/test20/ParallelAssignment.bpl
new file mode 100644
index 00000000..3ca196c8
--- /dev/null
+++ b/Test/test20/ParallelAssignment.bpl
@@ -0,0 +1,23 @@
+// Examples from the Boogie2 language report
+// (stuff where resolution succeeds, but typechecking might fail)
+
+type C, D;
+
+var x : int;
+var y : int;
+var z : int;
+var a : [int]int;
+var b : [int][C, D]int;
+
+procedure P(i:int, j:int, m:C, n:D) returns () modifies x, y, a, b; {
+ x := x+1;
+ a[i] := 12;
+ x, y := y, x;
+ x, a[i] := x+1, x;
+ x := true; // type error
+ a[true] := 5; // type error
+
+ z := 23; // assignment to non-modifiable variable
+ b[i][m, n] := 17;
+ b[i][m, n], x := a[x], y;
+} \ No newline at end of file