diff options
Diffstat (limited to 'Test/aitest9/TestIntervals.bpl')
-rw-r--r-- | Test/aitest9/TestIntervals.bpl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Test/aitest9/TestIntervals.bpl b/Test/aitest9/TestIntervals.bpl new file mode 100644 index 00000000..b989e16c --- /dev/null +++ b/Test/aitest9/TestIntervals.bpl @@ -0,0 +1,24 @@ +procedure P()
+{
+ var a: int, b: int, c: int;
+
+ a := 0;
+ while (*) {
+ a := a + 1;
+ }
+ // a in [0, infty]
+
+ b := 0;
+ if (*) { b := b + 1; }
+ if (*) { b := b + 1; }
+ if (*) { b := b + 1; }
+ // b in [0, 3]
+
+ c := a - b;
+ // c in [-3, infty]
+ goto Next;
+
+ Next:
+ assert -3 <= c;
+ assert c <= 0; // error (there was once an error in the Intervals which thought this assertion to be true)
+}
|