summaryrefslogtreecommitdiff
path: root/Test/extractloops/detLoopExtractNested.bpl
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-06-05 15:03:09 -0400
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-06-05 15:03:09 -0400
commit618f037a466cd4392be6e1f4b20e248d58447456 (patch)
tree3c0b51de79e3537d3e94c8f1cca46f32d9a4b974 /Test/extractloops/detLoopExtractNested.bpl
parent636108e4c302a24ed658b5f09812010b30e36e95 (diff)
parent41082463d783d6f8d8a5aaf69bf459b57bca6000 (diff)
Merge branch 'dfsg_free'
Diffstat (limited to 'Test/extractloops/detLoopExtractNested.bpl')
-rw-r--r--Test/extractloops/detLoopExtractNested.bpl23
1 files changed, 23 insertions, 0 deletions
diff --git a/Test/extractloops/detLoopExtractNested.bpl b/Test/extractloops/detLoopExtractNested.bpl
new file mode 100644
index 00000000..65de20c1
--- /dev/null
+++ b/Test/extractloops/detLoopExtractNested.bpl
@@ -0,0 +1,23 @@
+// RUN: %boogie -nologo -stratifiedInline:1 -extractLoops -deterministicExtractLoops -recursionBound:100 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+//This example checks the bug fix in the loop extract for http://symdiff.codeplex.com/workitem/1
+
+var t: int;
+procedure {:entrypoint} NestedLoops()
+modifies t;
+//ensures t == 6;
+{
+ var i:int, j:int;
+ i, j, t := 0, 0, 0;
+ while(i < 2) {
+ j := 0;
+ while (j < 3) {
+ t := t + 1;
+ j := j + 1;
+ }
+ i := i + 1;
+ }
+ assume true; //would be provable (!true) wihtout the fix
+}
+