diff options
author | qunyanm <unknown> | 2016-02-04 12:35:46 -0800 |
---|---|---|
committer | qunyanm <unknown> | 2016-02-04 12:35:46 -0800 |
commit | 4f0b823bdc1be13c2589cc46f650ab57d29e7117 (patch) | |
tree | 18b5f2aca540e19cb5e9f856cebe96322f28a18e /Test | |
parent | 0d003990dd503ceb9cc56e7fb590981e752b5cfa (diff) |
Fix issue 128. Change the translation of CanCallAssumption for let-such-that
expression from
// CanCall[[ var b :| RHS(b,g); Body(b,g,h) ]] =
// (forall b0,b1 :: typeAntecedent ==>
// CanCall[[ RHS(b,g) ]] &&
// (RHS(b,g) ==> CanCall[[ Body(b,g,h) ]]) &&
// $let$canCall(b,g))
to
// CanCall[[ var b0,b1 :| RHS(b0,b1,g); Body(b0,b1,g,h) ]] =
// $let$canCall(g) &&
// CanCall[[ Body($let$b0(g), $let$b1(g), h) ]]
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
|