-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat code actions forall calc (#6044)
### What was changed? First, for implicit assertions, if they are surrounded by a declaration that supports by clause (like AssertStmt or CallStmt), the by clause is preferred to inserting the assertion before.  And that works also for well-formedness, since well-formedness is now proved by by-blocks (thanks @keyboardDrummer for that, and @alex-chew for creating Dafny expressions for well-formedness)  Moreover, if a by clause already exist, the code action will insert into it.  Second, assertion of foralls now support a proof sketch by inserting forall statement  Third, assertions of equalities or equivalence now support a proof sketch by inserting a calc statement.   The code for inserting such proof sketches has been refactored so that it will be even more easy to extend in the future. ### How has this been tested? - Tests were updated for the insertion point (var....by) when possible and insert there if it already exist. - Tests were added for foralls, equalities and equivalences, and also new insertion points <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
- Loading branch information
1 parent
18c538a
commit 867e0e2
Showing
5 changed files
with
436 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.