From 962052e98513945981e3fed49e374642d1ed4aa0 Mon Sep 17 00:00:00 2001 From: qunyanm Date: Tue, 17 Nov 2015 11:18:13 -0800 Subject: Fix issue 100. Add an axiom for functionHandle to trigger off of the origial function and connect with Apply1 of the function. --- Test/dafny4/Bug100.dfy | 23 +++++++++++++++++++++++ Test/dafny4/Bug100.dfy.expect | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 Test/dafny4/Bug100.dfy create mode 100644 Test/dafny4/Bug100.dfy.expect (limited to 'Test/dafny4') 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 -- cgit v1.2.3