From f28fa68497352ffb57ab2846da4cc1c1aeaf1968 Mon Sep 17 00:00:00 2001 From: leino Date: Wed, 12 Aug 2015 22:44:50 -0700 Subject: Change the induction heuristic for lemmas to also look in precondition for clues about which parameters to include. As a result, improved many test cases (see, e.g., dafny4/NipkowKlein-chapter7.dfy!) and beautified some others. --- Test/VerifyThis2015/Problem1.dfy | 8 -------- 1 file changed, 8 deletions(-) (limited to 'Test/VerifyThis2015/Problem1.dfy') diff --git a/Test/VerifyThis2015/Problem1.dfy b/Test/VerifyThis2015/Problem1.dfy index 2e8a5243..67eeba07 100644 --- a/Test/VerifyThis2015/Problem1.dfy +++ b/Test/VerifyThis2015/Problem1.dfy @@ -161,18 +161,13 @@ lemma Same2(pat: seq, a: seq) ensures IRP_Alt(pat, a) { if pat == [] { - assert pat <= a; } else if a != [] && pat[0] == a[0] { - assert IsRelaxedPrefixAux(pat[1..], a[1..], 1); - Same2(pat[1..], a[1..]); if pat[1..] <= a[1..] { - assert pat <= a; } else { var k :| 0 <= k < |pat[1..]| && pat[1..][..k] + pat[1..][k+1..] <= a[1..]; assert 0 <= k+1 < |pat| && pat[..k+1] + pat[k+2..] <= a; } } else { - assert IsRelaxedPrefixAux(pat[1..], a, 0); Same2_Prefix(pat[1..], a); assert pat[1..] <= a; assert 0 <= 0 < |pat| && pat[..0] + pat[0+1..] <= a; @@ -182,7 +177,4 @@ lemma Same2_Prefix(pat: seq, a: seq) requires IsRelaxedPrefixAux(pat, a, 0) ensures pat <= a { - if pat != [] { - Same2_Prefix(pat[1..], a[1..]); - } } -- cgit v1.2.3 From d1b680b7e97bd81ed682271717b4f073603bfe75 Mon Sep 17 00:00:00 2001 From: qunyanm Date: Tue, 15 Dec 2015 10:42:41 -0800 Subject: Add /autoTriggers:1 to remove the undeterminateness of proof search. --- Test/VerifyThis2015/Problem1.dfy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Test/VerifyThis2015/Problem1.dfy') diff --git a/Test/VerifyThis2015/Problem1.dfy b/Test/VerifyThis2015/Problem1.dfy index 67eeba07..1b54e918 100644 --- a/Test/VerifyThis2015/Problem1.dfy +++ b/Test/VerifyThis2015/Problem1.dfy @@ -1,4 +1,4 @@ -// RUN: %dafny /compile:3 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t" +// RUN: %dafny /compile:3 /autoTriggers:1 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t" // RUN: %diff "%s.expect" "%t" // Rustan Leino -- cgit v1.2.3