summaryrefslogtreecommitdiff
path: root/Test/test21/Maps2.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/test21/Maps2.bpl
Initial set of files.
Diffstat (limited to 'Test/test21/Maps2.bpl')
-rw-r--r--Test/test21/Maps2.bpl24
1 files changed, 24 insertions, 0 deletions
diff --git a/Test/test21/Maps2.bpl b/Test/test21/Maps2.bpl
new file mode 100644
index 00000000..3f055c1d
--- /dev/null
+++ b/Test/test21/Maps2.bpl
@@ -0,0 +1,24 @@
+
+type T;
+
+function f(x : [T][int]int) returns (int);
+
+axiom (forall x:[T][int]int :: {f(x)}
+ (exists t:T :: x[t][13] == 42) ==> f(x) == 5);
+
+procedure P() returns () {
+ var x : [T][int]int, t : T;
+
+ x[t] := x[t][13 := 42];
+
+ assert f(x) == 5;
+}
+
+
+type name;
+
+function Field(int) returns (name);
+function Unified([name][int]int) returns ([int]int);
+
+axiom(forall M:[name][int]int, x:int, y:int :: {Unified(M[Field(x) := M[Field(x)][x := y]])}
+ Unified(M[Field(x) := M[Field(x)][x := y]]) == Unified(M)[x := y]);