diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-23 00:12:04 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-23 00:12:04 -0700 |
commit | dc08d67a27ffeb26889a56daa573ccc56daa1c0d (patch) | |
tree | bf33f9861099ea37a6f05c668a7dc61db97b15de /Test/triggers | |
parent | be66434c97446d311aada9aec42fdbc8eba26ea8 (diff) |
Make quantifier splitting a two step process
This fixes a bug that affected Monad.dfy
Diffstat (limited to 'Test/triggers')
-rw-r--r-- | Test/triggers/regression-tests.dfy | 20 | ||||
-rw-r--r-- | Test/triggers/regression-tests.dfy.expect | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Test/triggers/regression-tests.dfy b/Test/triggers/regression-tests.dfy new file mode 100644 index 00000000..263e424a --- /dev/null +++ b/Test/triggers/regression-tests.dfy @@ -0,0 +1,20 @@ +// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" /autoTriggers:1 /printTooltips "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +// This tests checks that quantifier splitting is resilient to the fact that +// certain statements (like calc) can return duplicate subexpressions. This was +// once a problem, because a quantifier that got returned twice would get split +// on the first pass over it, and would have its nely created children re-split +// on the second pass. This created a split quantifier whose children were split +// quantifiers, which violated an invariant of spliit quantifiers. + +abstract module Base { } + +module Blah refines Base { + lemma A() { + calc { + forall b :: b; + } + } +} + diff --git a/Test/triggers/regression-tests.dfy.expect b/Test/triggers/regression-tests.dfy.expect new file mode 100644 index 00000000..a03810fb --- /dev/null +++ b/Test/triggers/regression-tests.dfy.expect @@ -0,0 +1,3 @@ +regression-tests.dfy(16,5): Warning: (!) No terms found to trigger on.
+
+Dafny program verifier finished with 2 verified, 0 errors
|