summaryrefslogtreecommitdiff
path: root/Test/AbsHoudini/quant2.bpl
diff options
context:
space:
mode:
authorGravatar akashlal <unknown>2013-05-27 12:32:24 +0530
committerGravatar akashlal <unknown>2013-05-27 12:32:24 +0530
commit0b5af50545d93128256acabcd09ec09996f495f6 (patch)
tree77b193a330e4a09fa47c19959fa06c620c973984 /Test/AbsHoudini/quant2.bpl
parent21f72bdf46f12d214ac1f58bcc1041de2827ff40 (diff)
AbsHoudini: Added support for quantifiers
Diffstat (limited to 'Test/AbsHoudini/quant2.bpl')
-rw-r--r--Test/AbsHoudini/quant2.bpl24
1 files changed, 24 insertions, 0 deletions
diff --git a/Test/AbsHoudini/quant2.bpl b/Test/AbsHoudini/quant2.bpl
new file mode 100644
index 00000000..5a491877
--- /dev/null
+++ b/Test/AbsHoudini/quant2.bpl
@@ -0,0 +1,24 @@
+function {:existential true} {:absdomain "Intervals"} b1(x: int) : bool;
+
+procedure main()
+{
+ var i: int;
+ var x: int;
+ var arr: [int] int;
+
+ i := 0;
+
+ while(*)
+ invariant (i >= 0) && (forall j: int :: (0 <= j && j < i) ==> b1(arr[j]));
+ {
+ havoc x;
+ assume x == 0 || x == 1;
+
+ arr[i] := x;
+ i := i + 1;
+ }
+
+ havoc x;
+ assume x >= 0 && x < i;
+ assert arr[x] == 0 || arr[x] == 1;
+}