summaryrefslogtreecommitdiff
path: root/Test/civl/par-incr.bpl
diff options
context:
space:
mode:
authorGravatar Checkmate50 <dgeisler50@gmail.com>2016-06-06 23:14:18 -0600
committerGravatar Checkmate50 <dgeisler50@gmail.com>2016-06-06 23:14:18 -0600
commitd652155ae013f36a1ee17653a8e458baad2d9c2c (patch)
tree067d600fe3cd1723afc11682935f0123a1eab653 /Test/civl/par-incr.bpl
parentd7fc0deb2ca6d7ebee094b6ea5430d9b41f163ec (diff)
Merging complete. Everything looks good *crosses fingers*
Diffstat (limited to 'Test/civl/par-incr.bpl')
-rw-r--r--Test/civl/par-incr.bpl31
1 files changed, 31 insertions, 0 deletions
diff --git a/Test/civl/par-incr.bpl b/Test/civl/par-incr.bpl
new file mode 100644
index 00000000..7be8f561
--- /dev/null
+++ b/Test/civl/par-incr.bpl
@@ -0,0 +1,31 @@
+// RUN: %boogie -noinfer -typeEncoding:m -useArrayTheory "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+var {:layer 0} x: int;
+
+procedure {:yields} {:layer 0,1} Incr();
+ensures {:right} |{ A: x := x + 1; return true; }|;
+
+procedure {:yields} {:layer 1,2} Incr2()
+ensures {:right} |{ A: x := x + 2; return true; }|;
+{
+ yield;
+ par Incr() | Incr();
+ yield;
+}
+
+procedure {:yields} {:layer 1} Yield()
+{
+ yield;
+}
+
+procedure {:yields} {:layer 2,3} Incr4()
+ensures {:atomic} |{ A: x := x + 4; return true; }|;
+{
+ yield;
+ par Incr2() | Incr2() | Yield();
+ yield;
+}
+
+
+