summaryrefslogtreecommitdiff
path: root/Test/hofs/Simple.dfy
diff options
context:
space:
mode:
authorGravatar Dan Rosén <danr@chalmers.se>2014-08-12 14:44:55 -0700
committerGravatar Dan Rosén <danr@chalmers.se>2014-08-12 14:44:55 -0700
commite2d1b7891526c90e26a790a9783aed8f69a57450 (patch)
tree986d95d64662104c8eac9a5321ea7e99faedc665 /Test/hofs/Simple.dfy
parent8797f054f44d114147562689d80c9970d8ea4f82 (diff)
Compile lambda functions and apply expressions, and change let expr compilation
Diffstat (limited to 'Test/hofs/Simple.dfy')
-rw-r--r--Test/hofs/Simple.dfy14
1 files changed, 11 insertions, 3 deletions
diff --git a/Test/hofs/Simple.dfy b/Test/hofs/Simple.dfy
index 4bb58078..c27fa82c 100644
--- a/Test/hofs/Simple.dfy
+++ b/Test/hofs/Simple.dfy
@@ -1,4 +1,4 @@
-// RUN: %dafny /compile:0 "%s" > "%t"
+// RUN: %dafny "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
function method MkId<A>() : A -> A {
@@ -81,10 +81,18 @@ function P(f: A -> B, x : A): B
f(x)
}
+
function Q(f: U -> V, x : U): V
- reads (f.reads)(x); // would be nice to be able to write P.reads(f,x)
- requires (f.requires)(x);
+ reads P.reads(f,x);
+ requires f.requires(x); // would be nice to be able to write P.requires(f,x)
{
P(f,x)
}
+function QQ(f: U -> V, x : U): V
+ reads ((() => ((()=>f)()).reads)())((()=>x)());
+ requires ((() => ((()=>f)()).requires)())((()=>x)());
+{
+ ((() => P)())((()=>f)(),(()=>x)())
+}
+