summaryrefslogtreecommitdiff
path: root/Test/hofs
diff options
context:
space:
mode:
authorGravatar leino <unknown>2015-05-01 14:02:27 -0700
committerGravatar leino <unknown>2015-05-01 14:02:27 -0700
commitd92e95d5fb8afdcf8f8dca77e541ad3032bfdff4 (patch)
treee43b1d21e12159937dc822628ce6440f8ecf6f8a /Test/hofs
parent1c5875daddfeb4736af4245c566a4d2dae31a1cf (diff)
Improved encoding of a property of reads clauses to make things more easily provable.
Diffstat (limited to 'Test/hofs')
-rw-r--r--Test/hofs/ReadsReads.dfy11
1 files changed, 11 insertions, 0 deletions
diff --git a/Test/hofs/ReadsReads.dfy b/Test/hofs/ReadsReads.dfy
index d0a8b43b..3fb03fda 100644
--- a/Test/hofs/ReadsReads.dfy
+++ b/Test/hofs/ReadsReads.dfy
@@ -131,3 +131,14 @@ module ReadsAll {
f(0) + f(1) + f(2)
}
}
+
+module ReadsOnFunctions {
+ lemma M0(f: int -> int)
+ {
+ var g := f.requires;
+ assert g.reads(10) == f.reads(10);
+ }
+// function F(f: int -> int): int
+// requires forall x :: f.reads(x) == {} // should always be allowed to invoke .reads, even if F has an empty reads clause
+// { 0 }
+}