summaryrefslogtreecommitdiff
path: root/Test/og/parallel4.bpl
diff options
context:
space:
mode:
authorGravatar Unknown <qadeer@FAIZ-AHMED-FAIZ.redmond.corp.microsoft.com>2013-03-03 22:43:56 -0800
committerGravatar Unknown <qadeer@FAIZ-AHMED-FAIZ.redmond.corp.microsoft.com>2013-03-03 22:43:56 -0800
commit68a39909f93535ad4d091fce647d8a0e8539508f (patch)
tree2b1f666381bcb13849cdc3797b4d36cf9a84a47f /Test/og/parallel4.bpl
parent8f5515633b1273670a96a2c6b961317293d07ebf (diff)
fixed bugs in both parallel calls and linear stuff (reported by Chris)
also added improved error reporting suggested by Chris
Diffstat (limited to 'Test/og/parallel4.bpl')
-rw-r--r--Test/og/parallel4.bpl21
1 files changed, 21 insertions, 0 deletions
diff --git a/Test/og/parallel4.bpl b/Test/og/parallel4.bpl
new file mode 100644
index 00000000..a5b2768f
--- /dev/null
+++ b/Test/og/parallel4.bpl
@@ -0,0 +1,21 @@
+var a:int;
+
+procedure {:entrypoint} main()
+{
+ var {:linear "tid"} i: int;
+ var {:linear "tid"} j: int;
+ call i := t(i) | j := t(j);
+}
+
+procedure t({:linear "tid"} i': int) returns ({:linear "tid"} i: int)
+{
+ assume i == i';
+ call Yield();
+ assert a == old(a);
+ a := a + 1;
+}
+
+procedure Yield()
+{
+ yield;
+}