summaryrefslogtreecommitdiff
path: root/Test/og/Program1.bpl
diff options
context:
space:
mode:
authorGravatar qadeer <unknown>2014-07-12 15:31:40 -0700
committerGravatar qadeer <unknown>2014-07-12 15:31:40 -0700
commit85a60be8a0a7ef1438908364b7997dddc4524ed1 (patch)
tree356d1801d0338ae1ec91d22909b88ea589cbad11 /Test/og/Program1.bpl
parent5ef33fad3a4d6438d7e3c38388639eff7f08533d (diff)
added tests
Diffstat (limited to 'Test/og/Program1.bpl')
-rw-r--r--Test/og/Program1.bpl29
1 files changed, 29 insertions, 0 deletions
diff --git a/Test/og/Program1.bpl b/Test/og/Program1.bpl
new file mode 100644
index 00000000..56620da2
--- /dev/null
+++ b/Test/og/Program1.bpl
@@ -0,0 +1,29 @@
+// RUN: %boogie -noinfer -typeEncoding:m -useArrayTheory "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+var {:phase 1} x:int;
+
+procedure {:yields} {:phase 1} p()
+requires {:phase 1} x >= 5;
+ensures {:phase 1} x >= 8;
+{
+ yield;
+ assert {:phase 1} x >= 5;
+ call Incr(1);
+ yield;
+ assert {:phase 1} x >= 6;
+ call Incr(1);
+ yield;
+ assert {:phase 1} x >= 7;
+ call Incr(1);
+}
+
+procedure {:yields} {:phase 1} q()
+{
+ call Incr(3);
+}
+
+procedure {:yields} {:phase 0,1} Incr(val: int);
+ensures {:atomic}
+|{A:
+ x := x + val; return true;
+}|;