diff options
Diffstat (limited to 'Test')
-rw-r--r-- | Test/dafny4/Bug128.dfy | 13 | ||||
-rw-r--r-- | Test/dafny4/Bug128.dfy.expect | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Test/dafny4/Bug128.dfy b/Test/dafny4/Bug128.dfy new file mode 100644 index 00000000..b7220335 --- /dev/null +++ b/Test/dafny4/Bug128.dfy @@ -0,0 +1,13 @@ +// RUN: %dafny /noNLarith /z3opt:pi.warnings=true /proverWarnings:1 /compile:0 /autoTriggers:1 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+function GetIndexInSequence<T>(s:seq<T>, x:T) : int
+ requires x in s;
+ ensures 0 <= GetIndexInSequence(s, x) < |s|;
+ ensures s[GetIndexInSequence(s, x)] == x; {
+ var i :| 0 <= i < |s| && s[i] == x;
+ i
+ }
+
+
+
diff --git a/Test/dafny4/Bug128.dfy.expect b/Test/dafny4/Bug128.dfy.expect new file mode 100644 index 00000000..700ad964 --- /dev/null +++ b/Test/dafny4/Bug128.dfy.expect @@ -0,0 +1,4 @@ +Prover warning: pattern does not contain all quantified variables.
+Prover warning: pattern does not contain all quantified variables.
+
+Dafny program verifier finished with 1 verified, 0 errors
|