diff options
author | qadeer <unknown> | 2014-02-07 15:18:39 -0800 |
---|---|---|
committer | qadeer <unknown> | 2014-02-07 15:18:39 -0800 |
commit | de9be69954d167a71c74ff68dd27e8cc96ba9c12 (patch) | |
tree | aee587de099489d41f4dfe74912e854f25b0df4d /Test/og/DeviceCache.bpl | |
parent | 9a8cb7e40a8bde05f53e616a9b47f06fe57bcaed (diff) |
new design for linear types + VCgen
ported all the examples
added the QED examples to runtest.bat
Diffstat (limited to 'Test/og/DeviceCache.bpl')
-rw-r--r-- | Test/og/DeviceCache.bpl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/og/DeviceCache.bpl b/Test/og/DeviceCache.bpl index 730b1ce1..ec61e188 100644 --- a/Test/og/DeviceCache.bpl +++ b/Test/og/DeviceCache.bpl @@ -6,6 +6,16 @@ var {:qed} lock: X; var {:qed} currsize: int;
var {:qed} newsize: int;
+function {:builtin "MapConst"} MapConstBool(bool) : [X]bool;
+function {:inline} {:linear "tid"} TidCollector(x: X) : [X]bool
+{
+ MapConstBool(false)[x := true]
+}
+function {:inline} {:linear "tid"} TidSetCollector(x: [X]bool) : [X]bool
+{
+ x
+}
+
function {:inline} Inv(ghostLock: X, currsize: int, newsize: int) : (bool)
{
0 <= currsize && currsize <= newsize &&
|