|
2 | 2 |
|
3 | 3 | See [docs/dev/news/](docs/dev/news/). |
4 | 4 |
|
| 5 | +# 4.5.0 |
| 6 | + |
| 7 | +## New features |
| 8 | + |
| 9 | +- Add the option `--include-test-runner` to `dafny translate`, to enable getting the same result as `dafny test` when doing manual compilation. (https://github.com/dafny-lang/dafny/pull/3818) |
| 10 | + |
| 11 | +- - Fix: verification in the IDE no longer fails for iterators |
| 12 | + - Fix: the IDE now provides feedback when verification fails to run, for example due to a bad solver path |
| 13 | + - Fix: let the IDE correctly use the solver-path option when it's specified in a project file |
| 14 | + - Feat: improve the order of verification diagnostics emitted by the Dafny CLI, so that they now always follow the line order of the program. |
| 15 | + (https://github.com/dafny-lang/dafny/pull/4798) |
| 16 | + |
| 17 | +- - Add an option `--filter-position` to the `dafny verify` command. The option filters what gets verified based on a source location. The location is specified as a file path suffix, optionally followed by a colon and a line number. For example, `dafny verify dfyconfig.toml --filter-position=source1.dfy:5` will only verify things that range over line 5 in the file `source1.dfy`. In combination with ``--isolate-assertions`, individual assertions can be verified by filtering on the line that contains them. When processing a single file, the filename can be skipped, for example: `dafny verify MyFile.dfy --filter-position=:23` |
| 18 | + - Add an option `--filter-symbol` to the `dafny verify` command, that only verifies symbols whose fully qualified name contains the given argument. For example, `dafny verify dfyconfig.toml --filter-symbol=MyModule` will verify everything inside `MyModule`. |
| 19 | + - The option `--boogie-filter` has been removed in favor of --filter-symbol |
| 20 | + (https://github.com/dafny-lang/dafny/pull/4816) |
| 21 | + |
| 22 | +- Add a `json` format to those supported by `--log-format` and `/verificationLogger`, for producing thorough, machine readable logs of verification results. (https://github.com/dafny-lang/dafny/pull/4951) |
| 23 | + |
| 24 | +- - Flip the behavior of `--warn-deprecation` and change the name to `--allow-deprecation`, so the default is now false, which is standard for boolean options. |
| 25 | + - When using `--allow-deprecation`, deprecated code is shown using tooltips in the IDE, and on the CLI when using `--show-tooltips`. |
| 26 | + - Replace the option `--warn-as-error` with the option `--allow-warnings`. The new option, when false, the default value, causes Dafny to stop generating executable output and return a failure exit code, when warnings occur in the program. Contrary to the previous `--warn-as-error` option, warnings are always reported as warnings. |
| 27 | + - During development, users must use `dafny run --allow-warnings` if they want to run their Dafny code when it contains warnings. |
| 28 | + - If users have builds that were passing with warnings, they have to add `--allow-warnings` to allow them to still pass. |
| 29 | + - If users upgrade to a new Dafny version, and are not using `--allow-warnings`, and do not want to migrate off of deprecated features, they will have to use `--allow-deprecation`. |
| 30 | + - When using the legacy CLI, the option /warningsAsErrors now has the behavior of --allow-warnings=false |
| 31 | + - A doo file that was created using `--allow-warnings` causes a warning if used by a consumer that does not use it. |
| 32 | + (https://github.com/dafny-lang/dafny/pull/4971) |
| 33 | + |
| 34 | +- The new `{:contradiction}` attribute can be placed on an `assert` statement to indicate that it forms part of an intentional proof by contradiction and therefore shouldn't be warned about when `--warn-contradictory-assumptions` is turned on. (https://github.com/dafny-lang/dafny/pull/5001) |
| 35 | + |
| 36 | +- Function and method parameters and return types, and datatype constructor arguments, can now have attributes. By default, there are no attributes that Dafny recognizes in these positions, but custom back-ends can use this feature to get extra information from the source files. (https://github.com/dafny-lang/dafny/pull/5032) |
| 37 | + |
| 38 | +- Under the CLI option `--general-newtypes`, the base type of a `newtype` declaration can now be (`int` or `real`, as before, or) `bool`, `char`, or a bitvector type. |
| 39 | + |
| 40 | + `as` and `is` expressions now support more types than before. In addition, run-time type tests are supported for `is` expressions, provided type parameters are injective (as was already required) and provided the constraints of any subset type or newtype is compilable. Note, although both `as` and `is` allow many more useful cases than before, using `--general-newtypes` will also forbid some unusual cases that were previously allowed. Any such case that is now forbidden can still be done by doing the `as`/`is` via `int`. |
| 41 | + (https://github.com/dafny-lang/dafny/pull/5061) |
| 42 | + |
| 43 | +- Allow newtype declarations to be based on set/iset/multiset/seq. (https://github.com/dafny-lang/dafny/pull/5133) |
| 44 | + |
| 45 | +## Bug fixes |
| 46 | + |
| 47 | +- Fixed crash caused by cycle in type declaration (https://github.com/dafny-lang/dafny/pull/4471) |
| 48 | + |
| 49 | +- Fix resolution of unary minus in new resolver (https://github.com/dafny-lang/dafny/pull/4737) |
| 50 | + |
| 51 | +- The command line and the language server now use the same counterexample-related Z3 options. (https://github.com/dafny-lang/dafny/pull/4792) |
| 52 | + |
| 53 | +- Dafny no longer crashes when required parameters occur after optional ones. (https://github.com/dafny-lang/dafny/pull/4809) |
| 54 | + |
| 55 | +- Use defensive coding to prevent a crash in the IDE that could occur in the context of code actions. (https://github.com/dafny-lang/dafny/pull/4818) |
| 56 | + |
| 57 | +- Fix null-pointer problem in new resolver (https://github.com/dafny-lang/dafny/pull/4875) |
| 58 | + |
| 59 | +- Fixed a crash that could occur when a case body of a match that was inside a loop, had a continue or break statement. (https://github.com/dafny-lang/dafny/pull/4894) |
| 60 | + |
| 61 | +- Compile run-time constraint checks for newtypes in comprehensions (https://github.com/dafny-lang/dafny/pull/4919) |
| 62 | + |
| 63 | +- Fix null dereference in constant-folding invalid string-indexing expressions (https://github.com/dafny-lang/dafny/pull/4921) |
| 64 | + |
| 65 | +- Check for correct usage of type characteristics in specifications and other places where they were missing. |
| 66 | + |
| 67 | + This fix will cause build breaks for programs with missing type characteristics (like `(!new)` and `(0)`). Any such error message is accompanied with a hint about what type characterics need to be added where. |
| 68 | + (https://github.com/dafny-lang/dafny/pull/4928) |
| 69 | + |
| 70 | +- Initialize additional fields in the AST (https://github.com/dafny-lang/dafny/pull/4930) |
| 71 | + |
| 72 | +- Fix crash when a function/method with a specification is overridden in an abstract type. (https://github.com/dafny-lang/dafny/pull/4954) |
| 73 | + |
| 74 | +- Fix crash for lookup of non-existing member in new resolver (https://github.com/dafny-lang/dafny/pull/4955) |
| 75 | + |
| 76 | +- Fix: check that subset-type variable's type is determined (resolver refresh). |
| 77 | + Fix crash in verifier when there was a previous error in determining subset-type/newtype base type. |
| 78 | + Fix crash in verifier when a subset type has no explicit `witness` clause and has a non-reference trait as its base type. |
| 79 | + (https://github.com/dafny-lang/dafny/pull/4956) |
| 80 | + |
| 81 | +- The `{:rlimit N}` attribute, which multiplied `N` by 1000 before sending it to Z3, is deprecated in favor of the `{:resource_limit N}` attribute, which can accept string arguments with exponential notation for brevity. The `--resource-limit` and `/rlimit` flags also now omit the multiplication, and the former allows exponential notation. (https://github.com/dafny-lang/dafny/pull/4975) |
| 82 | + |
| 83 | +- Allow a datatype to depend on traits without being told "datatype has no instances" (https://github.com/dafny-lang/dafny/pull/4997) |
| 84 | + |
| 85 | +- Don't consider `:= *` to be a definite assignment for non-ghost variables of a `(00)` type (https://github.com/dafny-lang/dafny/pull/5024) |
| 86 | + |
| 87 | +- Detect the same ghost usage in initializing assignments as in other expressions. The effect of this fix is to allow more iset/imap comprehensions to be compiled. |
| 88 | + |
| 89 | + Also, report errors if the LHS of `:=` in compiled `map`/`imap` comprehensions contains ghosts. |
| 90 | + (https://github.com/dafny-lang/dafny/pull/5041) |
| 91 | + |
| 92 | +- Escape names of nested modules in C# and Java (https://github.com/dafny-lang/dafny/pull/5049) |
| 93 | + |
| 94 | +- A parent trait that is a reference type can now be named via `import opened`. |
| 95 | + |
| 96 | + Implicit conversions between a datatype and its parent traits no longer crashes the verifier. |
| 97 | + |
| 98 | + (Dis)equality expressions of a (co)datatype and its parent traits no longer crashes the verifier. |
| 99 | + (https://github.com/dafny-lang/dafny/pull/5058) |
| 100 | + |
| 101 | +- Fixed support for newtypes as sequence comprehension lengths in Java (https://github.com/dafny-lang/dafny/pull/5065) |
| 102 | + |
| 103 | +- Don't emit an error message for a `function-by-method` with unused type parameters. (https://github.com/dafny-lang/dafny/pull/5068) |
| 104 | + |
| 105 | +- The syntax of a predicate definition must always include parentheses. (https://github.com/dafny-lang/dafny/pull/5069) |
| 106 | + |
| 107 | +- Termination override check for certain non-reference trait implementations (https://github.com/dafny-lang/dafny/pull/5087) |
| 108 | + |
| 109 | +- Malformed Python code for some functions involving lambdas (https://github.com/dafny-lang/dafny/pull/5093) |
| 110 | + |
| 111 | +- Let verifier understand opaque function overrides, supporting both when the overridden function is opaque and non-opaque. Revealing such a function for one overriding type has the effect of revealing it for all overriding types. |
| 112 | + |
| 113 | + Also, forbid the case where a function is opaque in a parent trait and the function override is not opaque. (Previously, this had caused a crash.) |
| 114 | + (https://github.com/dafny-lang/dafny/pull/5111) |
| 115 | + |
5 | 116 | # 4.4.0 |
6 | 117 |
|
7 | 118 | ## New features |
|
0 commit comments