summaryrefslogtreecommitdiff
path: root/Test/civl/parallel2.bpl
diff options
context:
space:
mode:
authorGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-06-28 01:44:30 +0100
committerGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-06-28 01:44:30 +0100
commit962f8d5252b3f5ec4d19e0cd2a430934bd55cc6d (patch)
tree27d5f9b0d130c6c1a6758bc0b7456b0aa51e34e0 /Test/civl/parallel2.bpl
parente11d65009d0b4ba1327f5f5dd6b26367330611f0 (diff)
Normalise line endings using a .gitattributes file. Unfortunately
this required that this commit globally modify most files. If you want to use git blame to see the real author of a line use the ``-w`` flag so that whitespace changes are ignored.
Diffstat (limited to 'Test/civl/parallel2.bpl')
-rw-r--r--Test/civl/parallel2.bpl118
1 files changed, 59 insertions, 59 deletions
diff --git a/Test/civl/parallel2.bpl b/Test/civl/parallel2.bpl
index c28edf2b..540e9810 100644
--- a/Test/civl/parallel2.bpl
+++ b/Test/civl/parallel2.bpl
@@ -1,59 +1,59 @@
-// RUN: %boogie -noinfer -typeEncoding:m -useArrayTheory "%s" > "%t"
-// RUN: %diff "%s.expect" "%t"
-var {:layer 0,1} a:[int]int;
-
-function {:builtin "MapConst"} MapConstBool(bool) : [int]bool;
-function {:inline} {:linear "tid"} TidCollector(x: int) : [int]bool
-{
- MapConstBool(false)[x := true]
-}
-
-procedure {:yields} {:layer 1} Allocate() returns ({:linear "tid"} tid: int)
-{
- yield;
- call tid := AllocateLow();
- yield;
-}
-
-procedure {:yields} {:layer 0,1} Write(idx: int, val: int);
-ensures {:atomic} |{A: a[idx] := val; return true; }|;
-
-procedure {:yields} {:layer 1} main()
-{
- var {:linear "tid"} i: int;
- var {:linear "tid"} j: int;
- call i := Allocate();
- call j := Allocate();
- par i := t(i) | j := t(j);
- par i := u(i) | j := u(j);
-}
-
-procedure {:yields} {:layer 1} t({:linear_in "tid"} i': int) returns ({:linear "tid"} i: int)
-{
- i := i';
-
- yield;
- call Write(i, 42);
- call Yield(i);
- assert {:layer 1} a[i] == 42;
-}
-
-procedure {:yields} {:layer 1} u({:linear_in "tid"} i': int) returns ({:linear "tid"} i: int)
-{
- i := i';
-
- yield;
- call Write(i, 42);
- yield;
- assert {:layer 1} a[i] == 42;
-}
-
-procedure {:yields} {:layer 1} Yield({:linear "tid"} i: int)
-ensures {:layer 1} old(a)[i] == a[i];
-{
- yield;
- assert {:layer 1} old(a)[i] == a[i];
-}
-
-procedure {:yields} {:layer 0,1} AllocateLow() returns ({:linear "tid"} tid: int);
-ensures {:atomic} |{ A: return true; }|;
+// RUN: %boogie -noinfer -typeEncoding:m -useArrayTheory "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+var {:layer 0,1} a:[int]int;
+
+function {:builtin "MapConst"} MapConstBool(bool) : [int]bool;
+function {:inline} {:linear "tid"} TidCollector(x: int) : [int]bool
+{
+ MapConstBool(false)[x := true]
+}
+
+procedure {:yields} {:layer 1} Allocate() returns ({:linear "tid"} tid: int)
+{
+ yield;
+ call tid := AllocateLow();
+ yield;
+}
+
+procedure {:yields} {:layer 0,1} Write(idx: int, val: int);
+ensures {:atomic} |{A: a[idx] := val; return true; }|;
+
+procedure {:yields} {:layer 1} main()
+{
+ var {:linear "tid"} i: int;
+ var {:linear "tid"} j: int;
+ call i := Allocate();
+ call j := Allocate();
+ par i := t(i) | j := t(j);
+ par i := u(i) | j := u(j);
+}
+
+procedure {:yields} {:layer 1} t({:linear_in "tid"} i': int) returns ({:linear "tid"} i: int)
+{
+ i := i';
+
+ yield;
+ call Write(i, 42);
+ call Yield(i);
+ assert {:layer 1} a[i] == 42;
+}
+
+procedure {:yields} {:layer 1} u({:linear_in "tid"} i': int) returns ({:linear "tid"} i: int)
+{
+ i := i';
+
+ yield;
+ call Write(i, 42);
+ yield;
+ assert {:layer 1} a[i] == 42;
+}
+
+procedure {:yields} {:layer 1} Yield({:linear "tid"} i: int)
+ensures {:layer 1} old(a)[i] == a[i];
+{
+ yield;
+ assert {:layer 1} old(a)[i] == a[i];
+}
+
+procedure {:yields} {:layer 0,1} AllocateLow() returns ({:linear "tid"} tid: int);
+ensures {:atomic} |{ A: return true; }|;