|
2 | 2 |
|
3 | 3 | See [docs/dev/news/](docs/dev/news/).
|
4 | 4 |
|
| 5 | +# 4.9.1 |
| 6 | + |
| 7 | +## New features |
| 8 | + |
| 9 | +- Introduce the attributes {:isolate} and {:isolate "paths} that simplify the verification of an assertion by introducing additional verification jobs. {:isolate} can be applied to `assert`, `return` and `continue` statements. When using `{:isolate_assertions}` or `--isolate-assertions`, each return statement now creates a separate verification job for each ensures clause. Previously all ensures clauses where verified in a single job, for all return statements. (https://github.com/dafny-lang/dafny/pull/5832) |
| 10 | + |
| 11 | +- Fill in matching patterns for the quantifiers introduced by automatic induction to represent the induction hypothesis. Suppress the generation of the induction hypothesis if no such matching patterns are found. Enhance tooltips accordingly. This feature is added to stabilize verification, but by sometimes not generating induction hypotheses, some automatic proofs may no longer go through. For backward compatibility, use an explicit `{:induction ...}` where `...` is the list of variables to use for the induction-hypothesis quantifier. Additionally, use a `{:nowarn}` attribute to suppress any warning about lack of matching patterns. |
| 12 | + |
| 13 | + Improve the selection of induction variables. |
| 14 | + |
| 15 | + Allow codatatype equality in matching patterns and as a focal predicate for extreme predicates. |
| 16 | + |
| 17 | + More specifically: |
| 18 | + |
| 19 | + * If a lemma bears `{:induction x, y, z}`, where `x, y, z` is a subset of the lemma's parameters (in the same order |
| 20 | + that the lemma gives them), then an induction hypothesis (IH) is generated. The IH quantifies over the |
| 21 | + given variables. |
| 22 | + |
| 23 | + For an instance-member lemma, the variables may include the implicit `this` parameter. |
| 24 | + |
| 25 | + For an extreme lemma, the IH generated is the for corresponding prefix lemma, and the given variables may |
| 26 | + include the implicit parameter `_k`. |
| 27 | + |
| 28 | + If good matching patterns are found for the quantifier, then these are indicated in tooltips. |
| 29 | + If no patterns are found, then a warning is generated; except, if the lemma bears `{:nowarn}`, then only |
| 30 | + an informational message is given. |
| 31 | + |
| 32 | + * If a lemma bears `{:induction}` or `{:induction true}`, then a list of induction variables is determined heuristically. |
| 33 | + |
| 34 | + If the list is empty, then a warning message is generated and no IH is generated. If the list is nonempty, |
| 35 | + an IH is generated and the list of variables is indicated in a tooltip. |
| 36 | + |
| 37 | + If good matching patterns are found for the quantifier, then these are indicated in tooltips. |
| 38 | + If no patterns are found, then a warning is generated; except, if the lemma bears {:nowarn}, then only |
| 39 | + an informational message is given. |
| 40 | + |
| 41 | + * If a lemma bears `{:induction false}`, then no IH is generated. |
| 42 | + |
| 43 | + * If a lemma bears an `:induction` attribute other than those listed above, then an error is generated. |
| 44 | + |
| 45 | + * If a lemma bears no `:induction` attribute, and the `--manual-lemma-induction` flag is present, then no IH is generated. |
| 46 | + |
| 47 | + * Otherwise, a list of induction variables is determined heuristically. |
| 48 | + |
| 49 | + If this list is empty, then no IH is generated and no warning/info is given. |
| 50 | + |
| 51 | + If the list is nonempty, then the machinery looks for matching patterns for the IH quantifier. If none are |
| 52 | + found, then no IH is generated. An informational message is generated, saying which candidate variables were |
| 53 | + used and saying that no matching patterns were found. |
| 54 | + |
| 55 | + If patterns are found, then an IH is generated, the list of variables and the patterns are indicated in tooltips, |
| 56 | + and the patterns are used with the IH quantifier. |
| 57 | + |
| 58 | + The pattern search can be overriden by providing patterns explicitly using the `{:inductionTrigger}` attribute. |
| 59 | + This attribute has the same syntax as the `{:trigger}` attribute. Using an empty list of triggers restores |
| 60 | + Dafny's legacy behavior (no triggers for lemma induction hypotheses). |
| 61 | + (https://github.com/dafny-lang/dafny/pull/5835) |
| 62 | + |
| 63 | +- Accept `decreases to` and `nonincreases to` expressions with 0 LHSs and/or 0 RHSs, and allow parentheses to be omitted when there is 1 LHS and 1 RHS. (https://github.com/dafny-lang/dafny/pull/5891) |
| 64 | + |
| 65 | +- Allow forall statements in statement expressions (https://github.com/dafny-lang/dafny/pull/5894) |
| 66 | + |
| 67 | +- When using `--isolate-assertions` or `{:isolate_assertions}`, a separate assertion batch will be generated per pair of return statement and ensures clause. (https://github.com/dafny-lang/dafny/pull/5917) |
| 68 | + |
| 69 | +## Bug fixes |
| 70 | + |
| 71 | +- `{:only}` on members only affects verification on the current file. (https://github.com/dafny-lang/dafny/pull/5730) |
| 72 | + |
| 73 | +- Fixed a bug that caused "hide *" and "reveal *" not to work when used in statement expressions, |
| 74 | + after a variable assignment occurred in the same expression. |
| 75 | + (https://github.com/dafny-lang/dafny/pull/5781) |
| 76 | + |
| 77 | +- Fix malformed Boogie in function override checks (https://github.com/dafny-lang/dafny/pull/5875) |
| 78 | + |
| 79 | +- Fix soundness issue where the verifier had assumed properties of `this` already during the first phase of a constructor (https://github.com/dafny-lang/dafny/pull/5876) |
| 80 | + |
| 81 | +- Don't assume type information before binding variables (for let expressions and named function results) (https://github.com/dafny-lang/dafny/pull/5877) |
| 82 | + |
| 83 | +- Enable using reveal statement expression inside witness expressions (https://github.com/dafny-lang/dafny/pull/5882) |
| 84 | + |
| 85 | +- Fix formatting of var by statements (https://github.com/dafny-lang/dafny/pull/5927) |
| 86 | + |
| 87 | +- Fix bugs that occur when using `{:extern}` to export members (https://github.com/dafny-lang/dafny/pull/5939) |
| 88 | + |
| 89 | +- Fixed a bug that would cause the symbol verification tasks to be done multiple times when using module refinement (https://github.com/dafny-lang/dafny/pull/5967) |
| 90 | + |
| 91 | +- Map range requires equality for enclosing type to support equality (https://github.com/dafny-lang/dafny/pull/5972) |
| 92 | + |
| 93 | +- Improved code navigation for datatype update expressions (https://github.com/dafny-lang/dafny/pull/5986) |
| 94 | + |
5 | 95 | # 4.9.0
|
6 | 96 |
|
7 | 97 | ## New features
|
|
0 commit comments