diff options
author | qadeer <unknown> | 2014-02-20 21:39:22 -0800 |
---|---|---|
committer | qadeer <unknown> | 2014-02-20 21:39:22 -0800 |
commit | 8b07f660070fcc551fe2d04c5ef197dde4c02596 (patch) | |
tree | dcf60642560567ee80a9c15987e281673d0995bc /Test/og | |
parent | 570b2104a5a4ba74d0bd3d845f6625ecd5825df7 (diff) |
fixed a bug in desugaring of linear variables
Diffstat (limited to 'Test/og')
-rw-r--r-- | Test/og/new1.bpl | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Test/og/new1.bpl b/Test/og/new1.bpl index 64144ae9..3ba0840d 100644 --- a/Test/og/new1.bpl +++ b/Test/og/new1.bpl @@ -7,13 +7,9 @@ function {:inline} {:linear "Perm"} SetCollectorPerm(x: [int]bool) : [int]bool x
}
-
-var {:linear "Perm"} Permissions: [int]bool;
-
-procedure Allocate_Perm() returns ({:linear "Perm"} xls: [int]bool);
-modifies Permissions;
+procedure Allocate_Perm({:linear "Perm"} Permissions: [int]bool) returns ({:linear "Perm"} xls: [int]bool);
requires Permissions == mapconstbool(true);
-ensures xls == mapconstbool(true) && Permissions == mapconstbool(false);
+ensures xls == mapconstbool(true);
procedure {:yields} {:stable} PB({:linear "Perm"} permVar_in:[int]bool)
requires permVar_in[0] && g == 0;
@@ -32,13 +28,12 @@ requires permVar_in[0] && g == 0; assert g == 1;
}
-procedure{:entrypoint} {:yields} Main()
-modifies g, Permissions;
+procedure{:entrypoint} {:yields} Main({:linear "Perm"} Permissions: [int]bool)
requires Permissions == mapconstbool(true);
{
var {:linear "Perm"} permVar_out: [int]bool;
- call permVar_out := Allocate_Perm();
+ call permVar_out := Allocate_Perm(Permissions);
g := 0;
async call PB(permVar_out);
|