summaryrefslogtreecommitdiff
path: root/Test/dafny4
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-11-17 11:18:13 -0800
committerGravatar qunyanm <unknown>2015-11-17 11:18:13 -0800
commit962052e98513945981e3fed49e374642d1ed4aa0 (patch)
treeb7c38191c6844d25a0b9ef8972ff318bbddc09cf /Test/dafny4
parent0323a4f1a4d258a21be56cd65c5998ea6d0a3b19 (diff)
Fix issue 100. Add an axiom for functionHandle to trigger off of the origial
function and connect with Apply1 of the function.
Diffstat (limited to 'Test/dafny4')
-rw-r--r--Test/dafny4/Bug100.dfy23
-rw-r--r--Test/dafny4/Bug100.dfy.expect2
2 files changed, 25 insertions, 0 deletions
diff --git a/Test/dafny4/Bug100.dfy b/Test/dafny4/Bug100.dfy
new file mode 100644
index 00000000..0c971e82
--- /dev/null
+++ b/Test/dafny4/Bug100.dfy
@@ -0,0 +1,23 @@
+// RUN: %dafny /compile:0 /autoTriggers:1 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+lemma lemma_ensures(x:int, RefineInt:int->int)
+ requires forall y :: RefineInt.requires(y);
+ ensures forall y :: RefineInt(y) + x == RefineInt(x) + y;
+
+function Identity(z:int) : int
+
+lemma test()
+{
+ var v,w:int;
+ lemma_ensures(w, Identity);
+ //var RefineInt := Identity;
+ //assert RefineInt(v) == Identity(v);
+ assert Identity(v) + w == Identity(w) + v;
+}
+
+
+
+
+
+
diff --git a/Test/dafny4/Bug100.dfy.expect b/Test/dafny4/Bug100.dfy.expect
new file mode 100644
index 00000000..73ba063c
--- /dev/null
+++ b/Test/dafny4/Bug100.dfy.expect
@@ -0,0 +1,2 @@
+
+Dafny program verifier finished with 4 verified, 0 errors