From e9c589851d913a6566c421c87483dc7e94519f91 Mon Sep 17 00:00:00 2001 From: qunyanm Date: Mon, 8 Feb 2016 12:28:25 -0800 Subject: Fix issue 124. Consider math operators that later turned into function calls as candidates for triggers. --- Test/dafny4/Bug124.dfy | 14 ++++++++++++++ Test/dafny4/Bug124.dfy.expect | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 Test/dafny4/Bug124.dfy create mode 100644 Test/dafny4/Bug124.dfy.expect (limited to 'Test') diff --git a/Test/dafny4/Bug124.dfy b/Test/dafny4/Bug124.dfy new file mode 100644 index 00000000..60f26a00 --- /dev/null +++ b/Test/dafny4/Bug124.dfy @@ -0,0 +1,14 @@ +// RUN: %dafny /compile:0 /autoTriggers:1 /noNLarith "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +function power(n:nat, e:nat) : int + +lemma lemma_power() + ensures forall n:nat, e:nat :: 0 <= n * e && power(n, e) == 5; +{ + forall n:nat, e:nat + ensures 0 <= n * e && power(n, e) == 5; + { + assume false; + } +} \ No newline at end of file diff --git a/Test/dafny4/Bug124.dfy.expect b/Test/dafny4/Bug124.dfy.expect new file mode 100644 index 00000000..52595bf9 --- /dev/null +++ b/Test/dafny4/Bug124.dfy.expect @@ -0,0 +1,2 @@ + +Dafny program verifier finished with 3 verified, 0 errors -- cgit v1.2.3