From b8fad094ad74180ca16670bebe602737d856b5da Mon Sep 17 00:00:00 2001 From: qunyanm Date: Wed, 25 Nov 2015 10:27:02 -0800 Subject: Fix issue 103. Emit the quantifiers for ForallStmt before AutoTrigger so that the auto-triggers can be computed for ForallStmt. --- Test/dafny0/SmallTests.dfy.expect | 1 + Test/dafny4/Bug103.dfy | 20 ++++++++++++++++++++ Test/dafny4/Bug103.dfy.expect | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 Test/dafny4/Bug103.dfy create mode 100644 Test/dafny4/Bug103.dfy.expect (limited to 'Test') diff --git a/Test/dafny0/SmallTests.dfy.expect b/Test/dafny0/SmallTests.dfy.expect index 4bd12096..6161c3dd 100644 --- a/Test/dafny0/SmallTests.dfy.expect +++ b/Test/dafny0/SmallTests.dfy.expect @@ -1,3 +1,4 @@ +SmallTests.dfy(507,4): Warning: /!\ No trigger covering all quantified variables found. SmallTests.dfy(34,10): Error: index out of range Execution trace: (0,0): anon0 diff --git a/Test/dafny4/Bug103.dfy b/Test/dafny4/Bug103.dfy new file mode 100644 index 00000000..559a361c --- /dev/null +++ b/Test/dafny4/Bug103.dfy @@ -0,0 +1,20 @@ +// RUN: %dafny /compile:0 /autoTriggers:1 /print:"%t.print" "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +predicate IsLessThanSuccesor(i:int) +{ + i < i + 1 +} + +lemma LemmaWithoutTriggerOnForallStatement() +{ + forall i + ensures IsLessThanSuccesor(i); + { + } +} + + + + + diff --git a/Test/dafny4/Bug103.dfy.expect b/Test/dafny4/Bug103.dfy.expect new file mode 100644 index 00000000..52595bf9 --- /dev/null +++ b/Test/dafny4/Bug103.dfy.expect @@ -0,0 +1,2 @@ + +Dafny program verifier finished with 3 verified, 0 errors -- cgit v1.2.3