summaryrefslogtreecommitdiff
path: root/Test/linear
diff options
context:
space:
mode:
authorGravatar qadeer <unknown>2014-07-11 14:00:32 -0700
committerGravatar qadeer <unknown>2014-07-11 14:00:32 -0700
commit5ef33fad3a4d6438d7e3c38388639eff7f08533d (patch)
tree5b44085b51ba2aa44dd965c62818c2ca74b97d96 /Test/linear
parent9abbf5e9060e152fb13c0cd5c9fbbdc3aba19f30 (diff)
fixed some tests in og
added another test in linear (based on bug reported by Chris) removed the QED build configuration
Diffstat (limited to 'Test/linear')
-rw-r--r--Test/linear/async-bug.bpl31
-rw-r--r--Test/linear/async-bug.bpl.expect3
2 files changed, 34 insertions, 0 deletions
diff --git a/Test/linear/async-bug.bpl b/Test/linear/async-bug.bpl
new file mode 100644
index 00000000..faa1a65d
--- /dev/null
+++ b/Test/linear/async-bug.bpl
@@ -0,0 +1,31 @@
+// RUN: %boogie -noinfer -typeEncoding:m -useArrayTheory -doModSetAnalysis "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+const GcTid:int;
+
+procedure {:yields} {:phase 100} Initialize({:cnst "tid"} tid:int)
+requires{:phase 100} tid == GcTid;
+{
+ yield;
+ assert{:phase 100} tid == GcTid;
+
+ async call GarbageCollect(tid);
+
+ yield;
+ assert{:phase 100} tid == GcTid;
+
+ async call GarbageCollect(tid);
+
+ yield;
+ assert{:phase 100} tid == GcTid;
+
+ yield;
+ assert{:phase 100} tid == GcTid;
+}
+
+procedure {:yields} {:phase 100} GarbageCollect({:cnst "tid"} tid:int)
+requires{:phase 100} tid == GcTid;
+{
+ yield;
+ assert{:phase 100} tid == GcTid;
+}
+
diff --git a/Test/linear/async-bug.bpl.expect b/Test/linear/async-bug.bpl.expect
new file mode 100644
index 00000000..8bfe61d1
--- /dev/null
+++ b/Test/linear/async-bug.bpl.expect
@@ -0,0 +1,3 @@
+async-bug.bpl(11,10): Error: Const linear variable cannot be an argument for a const parameter of an async procedure call
+async-bug.bpl(16,10): Error: Const linear variable cannot be an argument for a const parameter of an async procedure call
+2 type checking errors detected in async-bug.bpl