diff options
author | 2011-01-20 22:34:43 +0000 | |
---|---|---|
committer | 2011-01-20 22:34:43 +0000 | |
commit | 98882464b1ca2c3028f4c77381aaf38aef83a163 (patch) | |
tree | 1ee1df128d73c162e27934efcc7784cdae84b54e /BCT/RegressionTests | |
parent | fe2939f3591113645c0da217cae03d7f98ce8c8f (diff) |
Moved the parts of the Prelude that depend on the heap representation into the appropriate Heap objects.
Also added the ability to easily have access to the ASTs that result from the specific heap representation's declarations.
Diffstat (limited to 'BCT/RegressionTests')
-rw-r--r-- | BCT/RegressionTests/TranslationTest/RegressionTestInput.txt | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/BCT/RegressionTests/TranslationTest/RegressionTestInput.txt b/BCT/RegressionTests/TranslationTest/RegressionTestInput.txt index fdb08f32..0b5a0c2d 100644 --- a/BCT/RegressionTests/TranslationTest/RegressionTestInput.txt +++ b/BCT/RegressionTests/TranslationTest/RegressionTestInput.txt @@ -2,22 +2,33 @@ // Bytecode Translator prelude
const null: int;
+
type HeapType = [int,int]int;
-function IsGoodHeap(HeapType): bool;
-var $Heap: HeapType where IsGoodHeap($Heap);
+
+function IsGoodHeap(HeapType) : bool;
var $ArrayContents: [int][int]int;
+
var $ArrayLength: [int]int;
-var $Alloc: [int] bool;
-procedure {:inline 1} Alloc() returns (x: int)
- free ensures x != 0;
+var $Alloc: [int]bool;
+
+procedure {:inline 1} Alloc() returns (x: int);
modifies $Alloc;
+ free ensures x != 0;
+
+
+
+implementation Alloc() returns (x: int)
{
- assume $Alloc[x] == false;
- $Alloc[x] := true;
+ assume $Alloc[x] == false;
+ $Alloc[x] := true;
}
+
+
+var $Heap: HeapType where IsGoodHeap($Heap);
+
procedure RegressionTestInput.AsyncAttribute..ctor$System.Void(this: int);
|