diff options
author | rustanleino <unknown> | 2010-09-23 02:03:11 +0000 |
---|---|---|
committer | rustanleino <unknown> | 2010-09-23 02:03:11 +0000 |
commit | a3d28fd0c7d454667b6bea71a34b89e47b66d611 (patch) | |
tree | c8ab912181bd5b57ae8675744687a1feb1020273 /Test/test15/CaptureState.bpl | |
parent | 40021fe7042eb08ed5b4d16034e23c9ed022c4aa (diff) |
Boogie:
* Added /mv flag as the start of a Boogie replacement for /cev
* Allow attributes on assume statements
* /mv looks for the assume-statement attribute :captureState with a string-literal argument
Diffstat (limited to 'Test/test15/CaptureState.bpl')
-rw-r--r-- | Test/test15/CaptureState.bpl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Test/test15/CaptureState.bpl b/Test/test15/CaptureState.bpl new file mode 100644 index 00000000..7c73c411 --- /dev/null +++ b/Test/test15/CaptureState.bpl @@ -0,0 +1,26 @@ +type Ref;
+type FieldName;
+var Heap: [Ref,FieldName]int;
+
+const unique F: FieldName;
+
+procedure P(this: Ref, x: int, y: int) returns (r: int)
+ ensures 0 <= r;
+{
+ var m: int;
+
+ assume {:captureState "top"} true;
+
+ m := Heap[this, F];
+ if (0 <= x) {
+ assume {:captureState "then"} true;
+ m := m + 1;
+ assume {:captureState "postUpdate0"} true;
+ } else {
+ assume {:captureState "else"} true;
+ m := (m + y) * (m + y);
+ assume {:captureState "postUpdate1"} true;
+ }
+ r := m + m;
+ assume {:captureState "end"} true;
+}
|