summaryrefslogtreecommitdiff
path: root/Test/og/Program1.bpl
diff options
context:
space:
mode:
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;
+}|;