summaryrefslogtreecommitdiff
path: root/Test/test20/TypeSynonyms2.bpl
diff options
context:
space:
mode:
authorGravatar mikebarnett <unknown>2009-07-15 21:03:41 +0000
committerGravatar mikebarnett <unknown>2009-07-15 21:03:41 +0000
commitce1c2de044c91624370411e23acab13b0381949b (patch)
tree592539996fe08050ead5ee210c973801611dde40 /Test/test20/TypeSynonyms2.bpl
Initial set of files.
Diffstat (limited to 'Test/test20/TypeSynonyms2.bpl')
-rw-r--r--Test/test20/TypeSynonyms2.bpl20
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/test20/TypeSynonyms2.bpl b/Test/test20/TypeSynonyms2.bpl
new file mode 100644
index 00000000..f6fee1f3
--- /dev/null
+++ b/Test/test20/TypeSynonyms2.bpl
@@ -0,0 +1,20 @@
+
+
+type Set a = [a]bool;
+
+function union<a>(x : Set a, y : Set a) returns (Set a);
+axiom (forall<a> x : Set a, y : Set a, z : a :: (x[z] || y[z]) == union(x, y)[z]);
+
+
+const intSet0 : Set int;
+axiom (forall x:int :: intSet0[x] == (x == 0 || x == 2 || x == 3));
+
+const intSet1 : Set int;
+axiom (forall x:int :: intSet1[x] == (x == -5 || x == 3));
+
+
+procedure P() returns () {
+ assert (forall x:int :: union(intSet0, intSet1)[x] ==
+ (x == -5 || x == 0 || x == 2 || x == 3));
+}
+