summaryrefslogtreecommitdiff
path: root/Test/dafny0/IMaps2.dfy
diff options
context:
space:
mode:
authorGravatar chrishaw <unknown>2015-02-26 23:11:11 -0800
committerGravatar chrishaw <unknown>2015-02-26 23:11:11 -0800
commitbcb9f9e189461258d9b50aee0565afe3b8c59e5c (patch)
tree85914af749444540ef9c6d4b9421c244c3a38116 /Test/dafny0/IMaps2.dfy
parentf9d6586f72af31d7654bf4590f47ac1292348941 (diff)
Add imap type, which is like map but may have have infinite size
Diffstat (limited to 'Test/dafny0/IMaps2.dfy')
-rw-r--r--Test/dafny0/IMaps2.dfy8
1 files changed, 8 insertions, 0 deletions
diff --git a/Test/dafny0/IMaps2.dfy b/Test/dafny0/IMaps2.dfy
new file mode 100644
index 00000000..a1b155ac
--- /dev/null
+++ b/Test/dafny0/IMaps2.dfy
@@ -0,0 +1,8 @@
+// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+function domain<U, V>(m: imap<U,V>): set<U>
+ ensures forall i :: i in domain(m) <==> i in m;
+{
+ set s | s in m // UNSAFE, m may have infinite domain
+}