summaryrefslogtreecommitdiff
path: root/Test/stratifiedinline/bar9.bpl
diff options
context:
space:
mode:
authorGravatar qadeer <qadeer@microsoft.com>2012-04-04 09:34:14 -0700
committerGravatar qadeer <qadeer@microsoft.com>2012-04-04 09:34:14 -0700
commit3ff2e42970584ad66f8b8e353ddce86dbea92baf (patch)
treeb506751550be2b708766fc0eca39edddf6ddb8ef /Test/stratifiedinline/bar9.bpl
parentf9d9312fa9c8e649355183e0c46e95ea6ba6e36c (diff)
small fix
added regressions
Diffstat (limited to 'Test/stratifiedinline/bar9.bpl')
-rw-r--r--Test/stratifiedinline/bar9.bpl45
1 files changed, 45 insertions, 0 deletions
diff --git a/Test/stratifiedinline/bar9.bpl b/Test/stratifiedinline/bar9.bpl
new file mode 100644
index 00000000..12de78ad
--- /dev/null
+++ b/Test/stratifiedinline/bar9.bpl
@@ -0,0 +1,45 @@
+var i: int;
+var m: int;
+
+procedure {:inline 1} foo(x: int)
+modifies i;
+{
+ if (i < x) {
+ i := i + 1;
+ call foo(x);
+ }
+}
+
+procedure {:inline 1} bar1(j: int)
+modifies i;
+{
+ if (j < 2*m)
+ {
+ i := i + 1;
+ call bar1(j+1);
+ }
+}
+
+procedure {:inline 1} bar2(j: int)
+modifies i;
+{
+ if (j < m) {
+ i := i - 1;
+ call bar2(j+1);
+ }
+}
+
+procedure main()
+modifies i;
+{
+ i := 0;
+ if (*) {
+ call foo(20);
+ i := 0;
+ call foo(4);
+ } else {
+ call bar1(0);
+ call bar2(0);
+ }
+ assert i < 10;
+} \ No newline at end of file